diff --git a/Gemfile b/Gemfile index 8b18d3b..290dfa7 100644 --- a/Gemfile +++ b/Gemfile @@ -9,8 +9,8 @@ gem 'twitter' gem 'twitter-text' gem 'tweetstream', '~> 1.0' gem 'foreman' -gem 'twitter-bootstrap-rails' -gem 'therubyracer' +gem 'bootstrap-sass', '~> 2.3.0.1' +gem 'font-awesome-rails' gem 'will_paginate' gem 'bootstrap-will_paginate' gem 'sidekiq', '~> 2.12.3' @@ -25,11 +25,13 @@ gem 'unicorn' gem 'simple_form' gem 'bootstrap-datetimepicker-rails' gem "less-rails" +gem 'therubyracer' group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'uglifier', '>= 1.0.3' + gem "compass-rails" end gem 'jquery-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 592dc3e..86e25da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,7 +28,6 @@ GEM activesupport (3.2.12) i18n (~> 0.6) multi_json (~> 1.0) - addressable (2.3.2) airbrake (3.1.12) activesupport builder @@ -40,6 +39,8 @@ GEM binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) bootstrap-datetimepicker-rails (0.0.11) + bootstrap-sass (2.3.0.1) + sass (~> 3.2) bootstrap-will_paginate (0.0.9) will_paginate builder (3.0.4) @@ -51,93 +52,106 @@ GEM net-ssh-gateway (>= 1.1.0) capistrano-unicorn (0.1.9) capistrano - capybara (2.0.2) + capybara (2.1.0) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) - selenium-webdriver (~> 2.0) - xpath (~> 1.0.0) + xpath (~> 2.0) celluloid (0.14.1) timers (>= 1.0.0) - childprocess (0.3.6) - ffi (~> 1.0, >= 1.0.6) - coderay (1.0.8) + childprocess (0.3.9) + ffi (~> 1.0, >= 1.0.11) + chunky_png (1.2.8) + coderay (1.0.9) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) coffee-script (2.2.0) coffee-script-source execjs - coffee-script-source (1.4.0) + coffee-script-source (1.6.2) commonjs (0.2.6) + compass (0.12.2) + chunky_png (~> 1.2) + fssm (>= 0.2.7) + sass (~> 3.1) + compass-rails (1.0.3) + compass (>= 0.12.2, < 0.14) connection_pool (1.1.0) daemons (1.1.9) - database_cleaner (0.9.1) + database_cleaner (1.0.1) debug_inspector (0.0.2) - diff-lcs (1.1.3) + diff-lcs (1.2.4) dotenv (0.8.0) dotenv-rails (0.8.0) dotenv (= 0.8.0) erubis (2.7.0) - eventmachine (1.0.0) + eventmachine (1.0.3) execjs (1.4.0) multi_json (~> 1.0) - factory_girl (4.1.0) + factory_girl (4.2.0) activesupport (>= 3.0.0) - factory_girl_rails (4.1.0) - factory_girl (~> 4.1.0) + factory_girl_rails (4.2.1) + factory_girl (~> 4.2.0) railties (>= 3.0.0) - faraday (0.8.4) + faraday (0.8.7) multipart-post (~> 1.1) - ffi (1.2.0) - foreman (0.60.2) + ffi (1.9.0) + font-awesome-rails (3.2.1.1) + railties (>= 3.2, < 5.0) + foreman (0.63.0) + dotenv (>= 0.7) thor (>= 0.13.6) + formatador (0.2.4) + fssm (0.2.10) growl (1.0.3) - guard (1.6.1) - listen (>= 0.6.0) + guard (1.8.1) + formatador (>= 0.2.4) + listen (>= 1.0.0) lumberjack (>= 1.0.2) pry (>= 0.9.10) thor (>= 0.14.6) - guard-rspec (2.3.3) - guard (>= 1.1) - rspec (~> 2.11) - guard-spork (1.4.0) + guard-rspec (3.0.2) + guard (>= 1.8) + rspec (~> 2.13) + guard-spork (1.5.1) childprocess (>= 0.2.3) guard (>= 1.1) spork (>= 0.8.4) - hashie (1.2.0) + hashie (2.0.5) highline (1.6.19) hike (1.2.3) http_parser.rb (0.5.3) i18n (0.6.4) journey (1.0.4) - jquery-rails (2.1.4) + jquery-rails (3.0.1) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) json (1.8.0) - kgio (2.7.4) - less (2.2.2) + kgio (2.8.0) + less (2.3.2) commonjs (~> 0.2.6) - less-rails (2.2.6) + less-rails (2.3.3) actionpack (>= 3.1) - less (~> 2.2.0) + less (~> 2.3.1) libnotify (0.8.0) ffi (>= 1.0.11) libv8 (3.11.8.17) - libwebsocket (0.1.7.1) - addressable - websocket - listen (0.7.0) - lumberjack (1.0.2) + listen (1.2.2) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + rb-kqueue (>= 0.2) + lumberjack (1.0.4) mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) method_source (0.8.1) - mime-types (1.21) + mime-types (1.23) + mini_portile (0.5.0) multi_json (1.7.7) - multipart-post (1.1.5) + multipart-post (1.2.0) net-scp (1.1.1) net-ssh (>= 2.6.5) net-sftp (2.1.2) @@ -145,27 +159,28 @@ GEM net-ssh (2.6.7) net-ssh-gateway (1.2.0) net-ssh (>= 2.6.5) - nokogiri (1.5.6) + nokogiri (1.6.0) + mini_portile (~> 0.5.0) oauth (0.4.7) - omniauth (1.1.1) - hashie (~> 1.2) + omniauth (1.1.4) + hashie (>= 1.2, < 3) rack omniauth-oauth (1.0.1) oauth omniauth (~> 1.0) - omniauth-twitter (0.0.14) + omniauth-twitter (1.0.0) multi_json (~> 1.3) omniauth-oauth (~> 1.0) pg (0.15.1) polyglot (0.3.3) - pry (0.9.10) + pry (0.9.12.2) coderay (~> 1.0.5) method_source (~> 0.8) - slop (~> 3.3.1) + slop (~> 3.4) rack (1.4.5) rack-cache (1.2) rack (>= 0.4) - rack-protection (1.3.2) + rack-protection (1.5.0) rack rack-ssl (1.3.3) rack @@ -186,10 +201,12 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - raindrops (0.10.0) + raindrops (0.11.0) rake (10.0.3) rb-fsevent (0.9.3) - rb-inotify (0.8.8) + rb-inotify (0.9.0) + ffi (>= 0.5.0) + rb-kqueue (0.2.0) ffi (>= 0.5.0) rdoc (3.12.2) json (~> 1.4) @@ -199,38 +216,31 @@ GEM ref (1.0.5) rest-client (1.6.7) mime-types (>= 1.16) - rspec (2.12.0) - rspec-core (~> 2.12.0) - rspec-expectations (~> 2.12.0) - rspec-mocks (~> 2.12.0) - rspec-core (2.12.2) - rspec-expectations (2.12.1) - diff-lcs (~> 1.1.3) - rspec-mocks (2.12.1) - rspec-rails (2.12.0) + rspec (2.13.0) + rspec-core (~> 2.13.0) + rspec-expectations (~> 2.13.0) + rspec-mocks (~> 2.13.0) + rspec-core (2.13.1) + rspec-expectations (2.13.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.13.1) + rspec-rails (2.13.2) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 2.12.0) - rspec-expectations (~> 2.12.0) - rspec-mocks (~> 2.12.0) - rubyzip (0.9.9) - sass (3.2.4) - sass-rails (3.2.5) + rspec-core (~> 2.13.0) + rspec-expectations (~> 2.13.0) + rspec-mocks (~> 2.13.0) + sass (3.2.9) + sass-rails (3.2.6) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) - selenium-webdriver (2.27.2) - childprocess (>= 0.2.5) - libwebsocket (~> 0.1.3) - multi_json (~> 1.0) - rubyzip - sextant (0.2.2) - activesupport (>= 3.2) + sextant (0.2.4) rails (>= 3.2) - shoulda-matchers (1.1.0) + shoulda-matchers (2.2.0) activesupport (>= 3.0.0) - sidekiq (2.12.3) + sidekiq (2.12.4) celluloid (>= 0.14.1) connection_pool (>= 1.0.0) json @@ -240,28 +250,28 @@ GEM actionpack (~> 3.0) activemodel (~> 3.0) simple_oauth (0.1.9) - sinatra (1.3.3) - rack (~> 1.3, >= 1.3.6) - rack-protection (~> 1.2) + sinatra (1.4.3) + rack (~> 1.4) + rack-protection (~> 1.4) + tilt (~> 1.3, >= 1.3.4) + slim (2.0.0) + temple (~> 0.6.5) tilt (~> 1.3, >= 1.3.3) - slim (1.3.5) - temple (~> 0.5.5) - tilt (~> 1.3.3) - slop (3.3.3) + slop (3.4.5) spork (0.9.2) sprockets (2.2.2) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - temple (0.5.5) + temple (0.6.5) therubyracer (0.11.4) libv8 (~> 3.11.8.12) ref thor (0.18.1) - tilt (1.3.7) + tilt (1.4.1) timers (1.1.0) - treetop (1.4.12) + treetop (1.4.14) polyglot polyglot (>= 0.3.1) tweetstream (1.1.5) @@ -272,28 +282,25 @@ GEM faraday (~> 0.8) multi_json (~> 1.3) simple_oauth (~> 0.1.6) - twitter-bootstrap-rails (2.2.7) - actionpack (>= 3.1) - execjs - rails (>= 3.1) - railties (>= 3.1) twitter-stream (0.1.16) eventmachine (>= 0.12.8) http_parser.rb (~> 0.5.1) simple_oauth (~> 0.1.4) - twitter-text (1.5.0) - activesupport - tzinfo (0.3.35) - uglifier (1.3.0) + twitter-text (1.6.1) + unf (~> 0.0.5) + tzinfo (0.3.37) + uglifier (2.1.1) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) - unicorn (4.5.0) + unf (0.0.5) + unf_ext + unf_ext (0.0.6) + unicorn (4.6.3) kgio (~> 2.6) rack raindrops (~> 0.7) - websocket (1.0.6) - will_paginate (3.0.3) - xpath (1.0.0) + will_paginate (3.0.4) + xpath (2.0.0) nokogiri (~> 1.3) PLATFORMS @@ -304,14 +311,17 @@ DEPENDENCIES better_errors binding_of_caller bootstrap-datetimepicker-rails + bootstrap-sass (~> 2.3.0.1) bootstrap-will_paginate capistrano capistrano-unicorn capybara coffee-rails (~> 3.2.1) + compass-rails database_cleaner dotenv-rails (= 0.8.0) factory_girl_rails + font-awesome-rails foreman growl guard-rspec @@ -337,7 +347,6 @@ DEPENDENCIES therubyracer tweetstream (~> 1.0) twitter - twitter-bootstrap-rails twitter-text uglifier (>= 1.0.3) unicorn diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index e118946..4aab0b1 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -12,9 +12,8 @@ # # = require jquery # = require jquery_ujs -# = require twitter/bootstrap # = require bootstrap-datetimepicker -# = require_tree . +# = require bootstrap $('#datetimepicker').datetimepicker({ language: 'en', diff --git a/app/assets/javascripts/bootstrap.js.coffee b/app/assets/javascripts/bootstrap.js.coffee deleted file mode 100644 index 5e71889..0000000 --- a/app/assets/javascripts/bootstrap.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -jQuery -> - $("a[rel=popover]").popover() - $("img[rel=popover]").popover({ - placement: 'right' - }); $(".tooltip").tooltip() - $("a[rel=tooltip]").tooltip() - $('.dropdown-toggle').dropdown() diff --git a/app/assets/stylesheets/application.css.less b/app/assets/stylesheets/application.css.scss similarity index 73% rename from app/assets/stylesheets/application.css.less rename to app/assets/stylesheets/application.css.scss index 0c16135..beb327e 100644 --- a/app/assets/stylesheets/application.css.less +++ b/app/assets/stylesheets/application.css.scss @@ -9,19 +9,23 @@ * compiled file, but it's generally better to create a new file per style scope. * - *= require bootstrap_and_overrides - *= require stories - *= require bootstrap-datetimepicker *= require_self */ +@import 'colors'; -@lightYellow: #fdfcf7; -@darkYellow: darken(@lightYellow, 50%); -@lightGray: #f9f9f9; +@import 'compass'; +@import "bootstrap_and_overrides"; + +@import "bootstrap"; +body { padding-top: 80px; } +@import "bootstrap-responsive"; +@import 'font-awesome'; +@import 'stories'; +@import 'bootstrap-datetimepicker'; body { // background: url(/assets/cork.png) top left; - background: @lightGray; + background: $lightGray; } .score{ @@ -47,13 +51,17 @@ body { .navbar-inner { box-shadow: none; - ul.nav li a { - text-shadow: none; + // ul.nav li a { + // text-shadow: none; - &:hover { - color: darken(@lightYellow, 90%); - } - } + // &:hover { + // color: darken(@lightYellow, 90%); + // } + // } +} + +i.icon-twitter{ + font-size: 20px; } .pagination { @@ -71,7 +79,7 @@ body { p { font-size: 10px; - color: darken(@lightYellow, 90%); + color: darken($lightYellow, 90%); img { margin: 0 10px; diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less deleted file mode 100644 index 120787f..0000000 --- a/app/assets/stylesheets/bootstrap_and_overrides.css.less +++ /dev/null @@ -1,31 +0,0 @@ -@import "twitter/bootstrap/bootstrap"; -body { padding-top: 80px; } - -@import "twitter/bootstrap/responsive"; - -// Set the correct sprite paths -// @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png'); -// @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png'); - -// Font Awesome -@fontAwesomeEotPath: asset-url("fontawesome-webfont.eot"); -@fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot?#iefix"); -@fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff"); -@fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf"); -@fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular"); -@import "fontawesome/font-awesome"; - -@yellowMustard: #df9b53; -@vegasRed: #db3c21; -@vegasBlue: #407fd3; -@lightGray: #f9f9f9; - -@linkColor: @vegasRed; - -//nav bar -@navbarLinkColor: @lightGray; -@navbarBackground: fade(@vegasBlue, 80%); -@navbarBackgroundHighlight: fade(@vegasBlue, 80%); -@dropdownLinkBackgroundHover: @yellowMustard; -@dropdownLinkColorHover: @white; -@navbarHeight: 60px; \ No newline at end of file diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.scss b/app/assets/stylesheets/bootstrap_and_overrides.css.scss new file mode 100644 index 0000000..af09d60 --- /dev/null +++ b/app/assets/stylesheets/bootstrap_and_overrides.css.scss @@ -0,0 +1,23 @@ + + +$linkColor: $vegasRed; + +//nav bar +$navbarLinkColor: $lightGray; +$navbarLinkBackgroundActive: none; +$navbarBackground: transparentize($vegasBlue, 0.2); +$navbarBackgroundHighlight: transparentize($vegasBlue, 0.2); +$dropdownLinkBackgroundHover: $yellowMustard; +$navbarLinkColorHover: white; +$dropdownLinkColorHover: white; +$navbarHeight: 60px; + +.nav { + + li a { + font-size: 18px; + // font-weight: 400; + text-transform: uppercase; + // margin-top: 3px; + } +} diff --git a/app/assets/stylesheets/colors.css.scss b/app/assets/stylesheets/colors.css.scss new file mode 100644 index 0000000..caa8a6b --- /dev/null +++ b/app/assets/stylesheets/colors.css.scss @@ -0,0 +1,6 @@ +$yellowMustard: #df9b53; +$vegasRed: #db3c21; +$vegasBlue: #407fd3; +$lightGray: #f9f9f9; +$lightYellow: #fdfcf7; +$darkYellow: darken($lightYellow, 50%); diff --git a/app/assets/stylesheets/stories.css.less b/app/assets/stylesheets/stories.css.scss similarity index 80% rename from app/assets/stylesheets/stories.css.less rename to app/assets/stylesheets/stories.css.scss index 601edb8..f36c375 100644 --- a/app/assets/stylesheets/stories.css.less +++ b/app/assets/stylesheets/stories.css.scss @@ -1,7 +1,4 @@ -@import "twitter/bootstrap/mixins"; -@lightYellow: #fdfcf7; -@darkYellow: darken(@lightYellow, 50%); .story { margin-bottom: 20px; @@ -24,7 +21,7 @@ } .content { - #gradient > .vertical(darken(@lightYellow, 1%), darken(@lightYellow, 2%)); + // #gradient > .vertical(darken(@lightYellow, 1%), darken(@lightYellow, 2%)); box-shadow: 0px 3px 15px rgba(0,0,0,.1); font-size: 20px; @@ -33,17 +30,17 @@ padding: 25px; .vote { - .border-radius(5px); + @include border-radius(5px); float: right; - background: @darkYellow; + background: $darkYellow; padding: 15px; margin: 0 0 25px 20px; font-size: 200%; width: 30px; &:hover { text-decoration: none; - background: darken(@darkYellow, 15%); + background: darken($darkYellow, 15%); } i { @@ -57,10 +54,10 @@ } .voted { - background: lighten(grey, 35%); + background: lighten(gray, 35%); &:hover { text-decoration: none; - background: lighten(grey, 35%); + background: lighten(gray, 35%); } } @@ -91,7 +88,7 @@ margin-top: 25px; img { - .border-radius(10px); + @include border-radius(10px); float: left; margin-right: 10px; } @@ -133,7 +130,7 @@ margin-top: 30px; img { - .border-radius(10px); + @include border-radius(10px); width: 200px; } } diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb new file mode 100644 index 0000000..a25a628 --- /dev/null +++ b/app/controllers/events_controller.rb @@ -0,0 +1,10 @@ +class EventsController < ApplicationController + + def index + @tag = Tag.find(1) + @stories = @tag.stories.order('start_time ASC').within_past_month.events_in_the_furture.ranked.page(params[:page]).limit(50) + @events_per_day = @stories.group_by{ |s| s.start_time.beginning_of_day } + + end + +end \ No newline at end of file diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index d085429..2f866cf 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -2,7 +2,7 @@ class TagsController < ApplicationController def show @tag = Tag.find(params[:id]) - @stories = @tag.stories.within_past_month.ranked.page(params[:page]).limit(50) + @stories = @tag.stories.within_past_month.events_in_the_furture.ranked.page(params[:page]).limit(50) end end \ No newline at end of file diff --git a/app/models/story.rb b/app/models/story.rb index 5ba4b0f..ea3b6dc 100644 --- a/app/models/story.rb +++ b/app/models/story.rb @@ -3,7 +3,6 @@ class Story < Post has_many :taggings has_many :tags, through: :taggings - validates :twitter_id, :uniqueness => true # after_create :queue_reply_checker @@ -11,6 +10,12 @@ class Story < Post attr_accessible :twitter_id, :twitter_profile_image_url, :tag_ids, :start_time + def self.events_in_the_furture + # where('start_time IS NOT NULL AND start_time > ?', Time.zone.now ) + where('start_time > ?', Time.zone.now ) + + end + def self.create_from_tweet(tweet) story = self.create( twitter_id: tweet.id.to_s, diff --git a/app/views/events/index.html.slim b/app/views/events/index.html.slim new file mode 100644 index 0000000..e8cfb62 --- /dev/null +++ b/app/views/events/index.html.slim @@ -0,0 +1 @@ +=render 'shared/events_index' diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index ac066c6..78f267e 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -39,14 +39,18 @@ html .container.nav-collapse ul.nav.pull-right - li= link_to "Current", root_url + li= link_to "Current", root_url li= link_to "Recent", recent_path - li= link_to "Events", tag_path('1') - li= link_to "Q&A", tag_path('2') - li= link_to "Advice", tag_path('3') - / li= link_to "Photos", photos_path - li= link_to "Best of week", best_of_week_path - li= link_to "Jobs", "http://hirevegastech.com", target: 'new' + li= link_to "Events", events_path + li.dropdown.visible-desktop + = link_to "More Stuff ".html_safe, '#', :class => 'dropdown-toggle', "data-toggle" => "dropdown" + ul.dropdown-menu + li= link_to "Q&A", tag_path('2') + li= link_to "Advice", tag_path('3') + / li= link_to "Photos", photos_path + li= link_to "Best of week", best_of_week_path + li= link_to "Jobs", "http://hirevegastech.com", target: 'new' + / li.dropdown.visible-desktop / = link_to "Calendars", '#', :class => 'dropdown-toggle', "data-toggle" => "dropdown" / ul.dropdown-menu @@ -69,9 +73,9 @@ html li= link_to('Reaching 10 Points', rss_path(10), target: 'new') li= link_to('Reaching 20 Points', rss_path(20), target: 'new') - li.hidden-desktop= link_to 'VegasTech.com Events Calendar', 'http://vegastech.com/events/', target: 'new' - li.hidden-desktop= link_to 'Work In Progress', 'http://workinprogress.lv/events/', target: 'new' - li.hidden-desktop= link_to 'TBAN Events Calendar', 'http://www.tban.us/calendar/', target: 'new' + / li.hidden-desktop= link_to 'VegasTech.com Events Calendar', 'http://vegastech.com/events/', target: 'new' + / li.hidden-desktop= link_to 'Work In Progress', 'http://workinprogress.lv/events/', target: 'new' + / li.hidden-desktop= link_to 'TBAN Events Calendar', 'http://www.tban.us/calendar/', target: 'new' - if logged_in? @@ -83,7 +87,7 @@ html li.divider li= link_to "Sign out", "/sessions/destroy", method: 'delete' - else - li= link_to(image_tag('bird_black_16_0.png', class: 'black_bird') + "Sign in", "/auth/twitter") + li= link_to(" Sign in".html_safe, "/auth/twitter") .container .content diff --git a/app/views/shared/_events_index.html.slim b/app/views/shared/_events_index.html.slim new file mode 100644 index 0000000..d8aafa9 --- /dev/null +++ b/app/views/shared/_events_index.html.slim @@ -0,0 +1,9 @@ +h1 Upcoming Events + +- @events_per_day.each do |date, events_for_day| + + .date-time-header + h3= l date, format: :day_of_week + .event + - events_for_day.each do |event| + = render partial: 'stories/story', :locals => { :story => event } diff --git a/app/views/stories/_story.html.slim b/app/views/stories/_story.html.slim index 3ef5a2d..7ce74f1 100644 --- a/app/views/stories/_story.html.slim +++ b/app/views/stories/_story.html.slim @@ -9,7 +9,7 @@ = auto_link(story.content, url_target: '_blank').html_safe .metadata a href="= link_from_handle(story.twitter_handle) " target="_blank" - image_tag story.twitter_profile_image_url + = image_tag(story.twitter_profile_image_url) span.handle= link_to(story.twitter_handle, link_from_handle(story.twitter_handle), target: '_blank') span.age @@ -36,7 +36,7 @@ br.clear -.modal.hide id={'retweet-modal-' + story.twitter_id} +.modal.hide id="#{'retweet-modal-' + story.twitter_id}" .modal-header button type="button" class="close" data-dismiss="modal" | × diff --git a/app/views/tags/show.html.slim b/app/views/tags/show.html.slim index 2068239..54c9ea9 100644 --- a/app/views/tags/show.html.slim +++ b/app/views/tags/show.html.slim @@ -1 +1,2 @@ -=render 'shared/story_index' \ No newline at end of file +=render 'shared/story_index' + diff --git a/config/application.rb b/config/application.rb index 068ca89..73cb6e8 100644 --- a/config/application.rb +++ b/config/application.rb @@ -36,7 +36,7 @@ class Application < Rails::Application # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - config.time_zone = 'UTC' + config.time_zone = "Pacific Time (US & Canada)" # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] diff --git a/config/locales/en.yml b/config/locales/en.yml index 179c14c..ac82967 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2,4 +2,68 @@ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. en: - hello: "Hello world" + date: + formats: + default: "%Y-%m-%d" + short: "%b %d" + long: "%B %d, %Y" + + day_names: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + abbr_day_names: + - Sun + - Mon + - Tue + - Wed + - Thu + - Fri + - Sat + + month_names: + - ~ + - January + - February + - March + - April + - May + - June + - July + - August + - September + - October + - November + - December + abbr_month_names: + - ~ + - Jan + - Feb + - Mar + - Apr + - May + - Jun + - Jul + - Aug + - Sep + - Oct + - Nov + - Dec + order: + - :year + - :month + - :day + + time: + formats: + default: "%a, %d %b %Y %H:%M:%S %z" + day_of_week: "%A - %B %d, %Y" + short: "%b %e, %G - %l:%M %p %Z" + long: "%B %d, %Y %l:%M %p %Z" + short_date: "%b %d, %Y" + am: "am" + pm: "pm" \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 668fa2c..eaf10ec 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -14,6 +14,7 @@ get 'sessions/create' resources :tags, only: :show + resources :events, only: :index resources :posts do resources :votes