diff --git a/README.rdoc b/README.rdoc deleted file mode 100644 index dd4e97e..0000000 --- a/README.rdoc +++ /dev/null @@ -1,28 +0,0 @@ -== README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... - - -Please feel free to use a different markup language if you do not plan to run -rake doc:app. diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js deleted file mode 100644 index 9e83eb5..0000000 --- a/app/assets/javascripts/application.js +++ /dev/null @@ -1,16 +0,0 @@ -// 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 vendor/assets/javascripts of plugins, if any, 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. -// -// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD -// GO AFTER THE REQUIRES BELOW. -// -//= require jquery -//= require jquery_ujs -//= require turbolinks -//= require_tree . diff --git a/app/assets/javascripts/application.js.coffee.erb b/app/assets/javascripts/application.js.coffee.erb new file mode 100644 index 0000000..d55cdb0 --- /dev/null +++ b/app/assets/javascripts/application.js.coffee.erb @@ -0,0 +1,32 @@ +#= require jquery +#= require jquery_ujs +#= require jquery.turbolinks +#= require turbolinks + +# FRONT END +#= require twitter/bootstrap + +# JS TEMPLATES +#= require handlebars.runtime + +# I18n +#= require i18n +#= require i18n/translations + +# ALL THE REST +#= require_tree . + +'use strict' + +I18n.defaultLocale = '<%= I18n.default_locale %>' +I18n.locale = $('html').attr 'lang' + +startSpinner = -> + $('#loading-spinner').show() + +stopSpinner = -> + $('#loading-spinner').fadeOut() + +# Turbolinks Spinner +document.addEventListener 'page:fetch', startSpinner +document.addEventListener 'page:receive', stopSpinner diff --git a/app/assets/javascripts/bootstrap.js.coffee b/app/assets/javascripts/bootstrap.js.coffee new file mode 100644 index 0000000..e36c1f1 --- /dev/null +++ b/app/assets/javascripts/bootstrap.js.coffee @@ -0,0 +1,5 @@ +'use strict' + +# jQuery Turbolinks +$ -> + $('[rel~="tooltip"]').tooltip() diff --git a/app/assets/javascripts/i18n/translations.js b/app/assets/javascripts/i18n/translations.js new file mode 100644 index 0000000..fd74986 --- /dev/null +++ b/app/assets/javascripts/i18n/translations.js @@ -0,0 +1,2 @@ +var I18n = I18n || {}; +I18n.translations = {"en":{"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":[null,"January","February","March","April","May","June","July","August","September","October","November","December"],"abbr_month_names":[null,"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","short":"%d %b %H:%M","long":"%B %d, %Y %H:%M"},"am":"am","pm":"pm"},"datetime":{"distance_in_words":{"half_a_minute":"half a minute","less_than_x_seconds":{"one":"less than 1 second","other":"less than %{count} seconds"},"x_seconds":{"one":"1 second","other":"%{count} seconds"},"less_than_x_minutes":{"one":"less than a minute","other":"less than %{count} minutes"},"x_minutes":{"one":"1 minute","other":"%{count} minutes"},"about_x_hours":{"one":"about 1 hour","other":"about %{count} hours"},"x_days":{"one":"1 day","other":"%{count} days"},"about_x_months":{"one":"about 1 month","other":"about %{count} months"},"x_months":{"one":"1 month","other":"%{count} months"},"about_x_years":{"one":"about 1 year","other":"about %{count} years"},"over_x_years":{"one":"over 1 year","other":"over %{count} years"},"almost_x_years":{"one":"almost 1 year","other":"almost %{count} years"}},"prompts":{"year":"Year","month":"Month","day":"Day","hour":"Hour","minute":"Minute","second":"Seconds"}}}}; \ No newline at end of file diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css.less similarity index 85% rename from app/assets/stylesheets/application.css rename to app/assets/stylesheets/application.css.less index 3192ec8..8d39cc7 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css.less @@ -8,6 +8,9 @@ * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * + *= stub stubs/variables_overrides.css.less *= require_self *= require_tree . */ + +@import "stubs/variables_overrides.css.less"; diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less new file mode 100644 index 0000000..8172bd9 --- /dev/null +++ b/app/assets/stylesheets/bootstrap_and_overrides.css.less @@ -0,0 +1,25 @@ +/* ========================================================================== + Bootstrap and overrides + ========================================================================== */ + +@import "twitter/bootstrap/bootstrap"; + +body { + padding-top: 60px; +} + +@import "twitter/bootstrap/responsive"; + +/* Fontawesome Icons + ========================================================================== */ + +@fontAwesomeEotPath: asset-path("fontawesome-webfont.eot?v=3.0.2"); +@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot?#iefix&v=3.0.2"); +@fontAwesomeWoffPath: asset-path("fontawesome-webfont.woff?v=3.0.2"); +@fontAwesomeTtfPath: asset-path("fontawesome-webfont.ttf?v=3.0.2"); +@import "fontawesome"; + +/* Overriding default variables and loading new ones + ========================================================================== */ + +@import "stubs/variables_overrides.css.less"; diff --git a/app/assets/stylesheets/stubs/variables_overrides.css.less b/app/assets/stylesheets/stubs/variables_overrides.css.less new file mode 100644 index 0000000..d8d8f89 --- /dev/null +++ b/app/assets/stylesheets/stubs/variables_overrides.css.less @@ -0,0 +1,13 @@ +@import "twitter/bootstrap/variables"; + +/* ========================================================================== + Variables and overrides + ========================================================================== */ + +/* New variables + ========================================================================== */ + +/* Bootstrap variables override + ========================================================================== */ + +@sansFontFamily: "Ubuntu", "Helvetica Neue", Helvetica, Arial, sans-serif; diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb new file mode 100644 index 0000000..19e1898 --- /dev/null +++ b/app/controllers/pages_controller.rb @@ -0,0 +1,5 @@ +class PagesController < ApplicationController + + def home + end +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index de6be79..7c1f91e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,2 +1,9 @@ module ApplicationHelper + def title(page_title) + content_for(:title) { page_title.to_s } + end + + def yield_or_default(section, default = '') + content_for?(section) ? content_for(section) : default + end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index 7dacbd4..0000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - -
-