diff --git a/Gemfile b/Gemfile index d57c9fc5..ca8211db 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'typhoeus'#, git: 'https://github.com/typhoeus/typhoeus.git', branch: 'maste gem 'draper' gem 'awesome_print' gem 'hashie' -#gem 'friendly_id', github: 'norman/friendly_id', branch: 'rails4' +# gem 'friendly_id', github: 'FriendlyId/friendly_id', branch: 'rails4' gem 'data_migration', github: 'ashmckenzie/data_migration' gem 'rest-client' gem 'coffee-rails', '~> 4.0.0' diff --git a/app/assets/stylesheets/welcome.css.sass b/app/assets/stylesheets/welcome.css.sass index f1d43228..c072f7f8 100644 --- a/app/assets/stylesheets/welcome.css.sass +++ b/app/assets/stylesheets/welcome.css.sass @@ -1,2 +1,48 @@ +/* I dont think I should import whatever application imports but not sure why it cant find the mixins*/ + +@import "utils" +@import "common/widgets" +@import "common/**/*" + #main-container margin-top: -182px + +.latest-bounties + margin-top: 40px + background: palette(2, lighten, 2, true) + + h3 + font-weight: bold + + ul + +clearfix + list-style: none + padding: 0 + margin: 0 0 10px + display: inline-block + + li + float: left + height: 45px + line-height: 45px + width: 250px + margin: 0 2em + + a + +hl-button + color: white + width: 100% + overflow: hidden + $palette-cheat-color: darken(palette(2) + palette(2),25) + background: $palette-cheat-color + &:hover + background: lighten($palette-cheat-color,15) + ++media($phone) + .latest-bounties + width: 0px + height: 0px + display: none + + + diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 536361f9..a155891a 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -1,6 +1,12 @@ class WelcomeController < ApplicationController def index - @users = Queries::RunningLeaderboard.new.query.decorate + @users = Queries::RunningLeaderboard.new.query.decorate + @latest_bounties = latest_bounties(3) + end + + private + def latest_bounties(limit_no) + Bounty.unclaimed.last(limit_no) end end diff --git a/app/views/bounties/_table.html.erb b/app/views/bounties/_table.html.erb index d42ab6a7..e2da9d3e 100644 --- a/app/views/bounties/_table.html.erb +++ b/app/views/bounties/_table.html.erb @@ -19,7 +19,7 @@