Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
jorge-barreto committed Jan 30, 2020
0 parents commit e34cdc5
Show file tree
Hide file tree
Showing 100 changed files with 6,372 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
BUNDLE_PATH: "vendor/bundle"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.history/
.byebug_history
/vendor/
/tmp/*
54 changes: 54 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.3.6'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
# gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'bigdecimal'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
gem 'guard', require: false
gem 'guard-livereload', require: false
gem 'rack-livereload'
gem 'rb-fsevent', require: false
end

group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'better_errors'
gem 'binding_of_caller'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
64 changes: 64 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme

## Uncomment and set this to only include directories you want to watch
# directories %w(app lib config test spec features) \
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}

## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
#
# $ mkdir config
# $ mv Guardfile config/
# $ ln -s config/Guardfile .
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"

guard 'livereload' do
extensions = {
css: :css,
scss: :css,
sass: :css,
js: :js,
coffee: :js,
html: :html,
png: :png,
gif: :gif,
jpg: :jpg,
jpeg: :jpeg,
# less: :less, # uncomment if you want LESS stylesheets done in browser
}

rails_view_exts = %w(erb haml slim)

# file types LiveReload may optimize refresh for
compiled_exts = extensions.values.uniq
watch(%r{public/.+\.(#{compiled_exts * '|'})})

extensions.each do |ext, type|
watch(%r{
(?:app|vendor)
(?:/assets/\w+/(?<path>[^.]+) # path+base without extension
(?<ext>\.#{ext})) # matching extension (must be first encountered)
(?:\.\w+|$) # other extensions
}x) do |m|
path = m[1]
"/assets/#{path}.#{type}"
end
end

# file needing a full reload of the page anyway
watch(%r{app/views/.+\.(#{rails_view_exts * '|'})$})
watch(%r{app/helpers/.+\.rb})
watch(%r{config/locales/.+\.yml})

# from https://mattbrictson.com/lightning-fast-sass-reloading-in-rails
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" }
watch(%r{(app|vendor)(/assets/\w+/(.+)\.(scss))}) { |m| "/assets/#{m[3]}.css" }
end
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# App Academy Times
6 changes: 6 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

Rails.application.load_tasks
Binary file added app/assets/images/AA_Times_Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/new_office.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
20 changes: 20 additions & 0 deletions app/assets/javascripts/components/dropdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* global $ */

// dropdown function that removes "hidden" class from dropdown while
// adding hideDropdown listener to document and cleaning up out-of-date listener
const revealDropdown = (event) => {
event.stopPropagation(); // prevent event from being picked up by body
$('#gear-dropdown').removeClass('hidden');
$('#gear-dropdown-btn').off('click', revealDropdown);
$(document).on('click', hideDropdown);
};

// add "hidden" class to dropdown and update event listeners
const hideDropdown = () => {
$('#gear-dropdown').addClass('hidden');
$('#gear-dropdown-btn').on('click', revealDropdown);
$(document).off('click', hideDropdown);
};

// Add click listener to gear icon which invokes reveal function
$(() => $('#gear-dropdown-btn').on('click', revealDropdown));
17 changes: 17 additions & 0 deletions app/assets/javascripts/components/modal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* global $ */

const toggleModal = () => {
$("#search-modal").toggleClass('expand')
$("#overlay").toggleClass('hidden')
};

// Add click listener to search icon which invokes sidebar function
$(() => $('#search-modal-btn').on('click', toggleModal));

// Add click listener to overlay
$(() => $('#overlay').on('click', toggleModal));

// Add click listener to close button
$(() => $('.close').on('click', toggleModal));


23 changes: 23 additions & 0 deletions app/assets/javascripts/components/sidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* global $ */

// dropdown function that applies or removes 'expand' class to the sections-sidebar nav
const toggleSidebar = () => {
$("#sections-sidebar").toggleClass('expand');
}

const toggleSideBarIfExpanded = (e) => {
e.preventDefault();
if(e.currentTarget.className === 'sections-sidebar expand') {
setTimeout(toggleSidebar, 1000);
}
}

// Add click listener to hamburger icon which invokes sidebar function
$(() => $('#sections-sidebar-btn').on('click', toggleSidebar));


// Close an expanded sidebar after 1 second if mouse leaves sidebar element
// Incomplete feature because sidebar does not remain open if mouse reenters element
$(() => $('#sections-sidebar').mouseleave(toggleSideBarIfExpanded));


28 changes: 28 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
*= require_self
*/

// CSS Reset
@import "base/reset.scss";

// Core
@import "base/colors.scss";
@import "base/fonts.scss";
@import "base/layout.scss";

// Grid
@import "base/grid.scss";

// Components
@import "components/*";
11 changes: 11 additions & 0 deletions app/assets/stylesheets/base/colors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$lightest-gray: #f7f7f5;
$light-gray: #e2e2e2;
$gray: #999;
$dark-gray: #6f6f6f;

$lightest-blue: #f0f8fc;
$light-blue: #6288a5;
$blue: #326891;
$dark-blue: #4d7b9f;
$darkest-blue: #265e8b;

2 changes: 2 additions & 0 deletions app/assets/stylesheets/base/fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$serif: georgia,"times new roman",times,serif;
$sans-serif: arial, helvetica, sans-serif;
19 changes: 19 additions & 0 deletions app/assets/stylesheets/base/grid.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.col {
// ...
}

/* Attribute selector targeting all elements
with a class attribute containing 'col-' */
[class*='col-'] {
// ...
}

[class*='col-']:last-of-type {
// ...
}

@media all and (max-width: 1000px) {
[class*='col-'] {
// width:
}
}
67 changes: 67 additions & 0 deletions app/assets/stylesheets/base/layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/* Define application-wide selectors here!*/

html {
position: relative;
height: 100%;
}

body {
width: 80%;
margin: 0 auto;
font-family: serif;
font-size: 12px;
// background-color: black;
}

button {
background-color: #334086;
// border-color: #334086;
color: white;
font-weight: bold;
padding: 1px;
border-radius: 3px;
// margin: 1px;
border: 2px solid #334086;
font-family: Arial, Helvetica, sans-serif;
// transition: ease-in-out;
// text-transform:
font-variant: small-caps;
// font-size:
// text-align:
}

button:hover {
background-color: #02105f;
border-color: #01072c;
}

a:hover {
text-decoration: underline;
}

/*
Header Rules
*/

hr {
border: 0;
height: 1px;
background-color: $light-gray;
}

.hr-top, .hr-bottom {
width: 100%;
margin: 0;
}

.hr-top {
height: 2px;
margin-bottom: 1px;
}

.hidden {
visibility: hidden;
position: absolute;
bottom: 100%;
right: 100%;
}
Loading

0 comments on commit e34cdc5

Please sign in to comment.