Merge remote-tracking branch 'origin/master'

This commit is contained in:
Andreas N 2015-01-14 14:17:33 +01:00
commit 03eb5ad738
6 changed files with 32 additions and 14 deletions

View File

@ -28,6 +28,7 @@ gem 'devise'
gem 'devise-async'
gem 'bootstrap_form'
gem 'font-kit-rails'
gem 'nprogress-rails'
gem 'font-awesome-rails', '~> 4.2.0.0'
gem 'rails-assets-growl'
gem "paperclip", "~> 4.2"

View File

@ -165,6 +165,7 @@ GEM
mini_portile (~> 0.6.0)
nokogumbo (1.2.0)
nokogiri
nprogress-rails (0.1.6.3)
oauth (0.4.7)
omniauth (1.2.2)
hashie (>= 1.2, < 4)
@ -378,6 +379,7 @@ DEPENDENCIES
jquery-rails
jquery-turbolinks
mysql2
nprogress-rails
omniauth
omniauth-tumblr
omniauth-twitter

View File

@ -3,13 +3,16 @@
#= require jquery.turbolinks
#= require turbolinks
#= require bootstrap
#= require nprogress
#= require nprogress-turbolinks
#= require growl
#= require cheet
#= require jquery.guillotine
#= require sweet-alert
#= require_tree .
Turbolinks.enableProgressBar()
NProgress.configure
showSpinner: false
window.showNotification = (text, success=true) ->
args =

View File

@ -7,12 +7,11 @@
*/
@import url(https://fonts.googleapis.com/css?family=Exo+2:400,700);
@import "bootswatch/paper/variables";
$font-family-sans-serif: "Exo 2","Open Sans", "Helvetica Neue", Helvetica, "DejaVu Sans", Arial, sans-serif;
$font-family-serif: Georgia, "DejaVu Serif", "Times New Roman", Times, serif;
//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
$font-family-monospace: Monaco, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace;
$font-family-monospace: "PragmataPro", Monaco, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace;
$font-family-base: $font-family-sans-serif;
$font-size-base: 14px;
@ -26,6 +25,24 @@ $font-size-h4: ceil(($font-size-base * 1.25)); // ~18px
$font-size-h5: $font-size-base;
$font-size-h6: ceil(($font-size-base * 0.85)); // ~12px
$brand-primary: #5e35b1;
$navbar-inverse-bg: #5e35b1;
$navbar-inverse-link-color: #ffffff;
$navbar-inverse-link-hover-color: #bfbfbf;
$navbar-inverse-link-hover-bg: transparent;
$navbar-inverse-link-active-color: #bfbfbf;
$navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 6.5%);
$navbar-inverse-link-disabled-color: darken(#fff, 12.5%);
$navbar-inverse-link-disabled-bg: transparent;
$navbar-inverse-brand-color: $navbar-inverse-link-color;
$navbar-inverse-brand-hover-color: darken($navbar-inverse-link-color, 10%);
$navbar-inverse-brand-hover-bg: transparent;
$navbar-inverse-toggle-hover-bg: #512da8;
$navbar-inverse-toggle-icon-bar-bg: #7e57c2;
$navbar-inverse-toggle-border-color: #512da8;
@import "bootswatch/paper/variables";
@import "bootstrap";
body { padding-top: $navbar-height; }
@import "bootswatch/paper/bootswatch";
@ -34,8 +51,6 @@ body { padding-top: $navbar-height; }
@import "font-awesome";
html.turbolinks-progress-bar::before {
background-color: darken($navbar-inverse-bg, 15%) !important;
box-shadow: 0px 0px 10px darken($navbar-inverse-bg, 15%), 0px 0px 5px darken($navbar-inverse-bg, 15%);
height: 2px !important;
}
$nprogress-color: darken($navbar-inverse-bg, 15%);
@import 'nprogress';
@import 'nprogress-bootstrap';

View File

@ -104,8 +104,7 @@ class User < ActiveRecord::Base
# has the user answered +question+ yet?
# @param question [Question]
def answered?(question)
question.answers.each { |a| return true if a.user_id == self.id }
false
question.answers.pluck(:user_id).include? self.id
end
# smiles an answer
@ -121,9 +120,7 @@ class User < ActiveRecord::Base
end
def smiled?(answer)
# TODO: you know what to do here, nilsding
answer.smiles.each { |s| return true if s.user_id == self.id }
false
answer.smiles.pluck(:user_id).include? self.id
end
def display_website

View File

@ -4,7 +4,7 @@
%meta{charset: 'utf-8'}
%meta{'http-equiv' => 'X-UA-Compatible' ,content: 'IE=edge'}
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1, user-scalable=no'}
%meta{name: 'theme-color', content: '#0C84E4'}
%meta{name: 'theme-color', content: '#5e35b1'}
%meta{name: "mobile-web-app-capable", content: "yes"}
%meta{name: "apple-mobile-web-app-capable", content: "yes"}
%meta{name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent'}