Home page
Layout Assets
This commit is contained in:
@@ -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 .
|
||||
@@ -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
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict'
|
||||
|
||||
# jQuery Turbolinks
|
||||
$ ->
|
||||
$('[rel~="tooltip"]').tooltip()
|
||||
@@ -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"}}}};
|
||||
@@ -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";
|
||||
@@ -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";
|
||||
@@ -0,0 +1,13 @@
|
||||
@import "twitter/bootstrap/variables";
|
||||
|
||||
/* ==========================================================================
|
||||
Variables and overrides
|
||||
========================================================================== */
|
||||
|
||||
/* New variables
|
||||
========================================================================== */
|
||||
|
||||
/* Bootstrap variables override
|
||||
========================================================================== */
|
||||
|
||||
@sansFontFamily: "Ubuntu", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
@@ -0,0 +1,5 @@
|
||||
class PagesController < ApplicationController
|
||||
|
||||
def home
|
||||
end
|
||||
end
|
||||
@@ -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
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Starterapp</title>
|
||||
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
||||
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<%= yield %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,37 @@
|
||||
!!!
|
||||
%html{ lang: I18n.locale.to_s }
|
||||
%head
|
||||
%meta{ charset: 'utf-8' }
|
||||
%meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0' }
|
||||
%title= yield_or_default :title, controller.action_name.titlecase
|
||||
= csrf_meta_tags
|
||||
= yield :head
|
||||
/ Le HTML5 shim, for IE6-8 support of HTML elements
|
||||
/[if lt IE 9]
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
||||
|
||||
/ Le styles
|
||||
= stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Ubuntu:400,500,700',
|
||||
'application',
|
||||
media: 'all'
|
||||
|
||||
/ Touch icons
|
||||
%link{ href: asset_path('apple-touch-icon.png'), rel: 'apple-touch-icon' }
|
||||
%link{ href: asset_path('apple-touch-icon-72x72.png'), rel: 'apple-touch-icon', sizes: '72x72' }
|
||||
%link{ href: asset_path('apple-touch-icon-114x114.png'), rel: 'apple-touch-icon', sizes: '114x114' }
|
||||
%link{ href: asset_path('apple-touch-icon-144x144.png'), rel: 'apple-touch-icon', sizes: '144x144' }
|
||||
|
||||
/
|
||||
Le javascript
|
||||
\==================================================
|
||||
/ Placed at the top of the document 'cause of turbolinks
|
||||
= javascript_include_tag 'application'
|
||||
|
||||
%body
|
||||
= render 'shared/navbar'
|
||||
|
||||
#main-container.container
|
||||
.content= yield
|
||||
|
||||
#footer
|
||||
.container= render 'shared/footer'
|
||||
@@ -0,0 +1 @@
|
||||
%h1= t('hello')
|
||||
@@ -0,0 +1 @@
|
||||
%footer.text-center
|
||||
@@ -0,0 +1,4 @@
|
||||
.navbar.navbar-fixed-top
|
||||
.navbar-inner
|
||||
.container
|
||||
= link_to Rails.application.class.parent_name, root_path, class: 'brand'
|
||||
Reference in New Issue
Block a user