BOOTSTRAP it
This commit is contained in:
parent
45414d7100
commit
23d5a9f627
7 changed files with 158 additions and 10 deletions
4
Gemfile
4
Gemfile
|
@ -20,6 +20,10 @@ group :assets do
|
|||
# gem 'therubyracer', :platforms => :ruby
|
||||
|
||||
gem 'uglifier', '>= 1.0.3'
|
||||
|
||||
gem 'therubyracer', '~> 0.10.2'
|
||||
gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
|
||||
gem "twitter-bootstrap-rails"
|
||||
end
|
||||
|
||||
gem 'jquery-rails'
|
||||
|
|
16
Gemfile.lock
16
Gemfile.lock
|
@ -54,6 +54,7 @@ GEM
|
|||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.6.2)
|
||||
commonjs (0.2.6)
|
||||
daemons (1.1.9)
|
||||
debug_inspector (0.0.2)
|
||||
erubis (2.7.0)
|
||||
|
@ -71,6 +72,12 @@ GEM
|
|||
railties (>= 3.0, < 5.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
json (1.7.7)
|
||||
less (2.3.1)
|
||||
commonjs (~> 0.2.6)
|
||||
less-rails (2.3.2)
|
||||
actionpack (>= 3.1)
|
||||
less (~> 2.3.1)
|
||||
libv8 (3.3.10.4)
|
||||
mail (2.4.4)
|
||||
i18n (>= 0.4.0)
|
||||
mime-types (~> 1.16)
|
||||
|
@ -134,6 +141,8 @@ GEM
|
|||
sqlite3 (1.3.7)
|
||||
temple (0.5.5)
|
||||
terminal-table (1.4.5)
|
||||
therubyracer (0.10.2)
|
||||
libv8 (~> 3.3.10)
|
||||
thin (1.5.1)
|
||||
daemons (>= 1.0.9)
|
||||
eventmachine (>= 0.12.6)
|
||||
|
@ -143,6 +152,10 @@ GEM
|
|||
treetop (1.4.12)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
twitter-bootstrap-rails (2.2.6)
|
||||
actionpack (>= 3.1)
|
||||
execjs
|
||||
railties (>= 3.1)
|
||||
tzinfo (0.3.37)
|
||||
uglifier (1.3.0)
|
||||
execjs (>= 0.3.0)
|
||||
|
@ -157,11 +170,14 @@ DEPENDENCIES
|
|||
brakeman
|
||||
coffee-rails (~> 3.2.1)
|
||||
jquery-rails
|
||||
less-rails
|
||||
meta_request
|
||||
rack-mini-profiler
|
||||
rails (= 3.2.11)
|
||||
rails-footnotes
|
||||
sass-rails (~> 3.2.3)
|
||||
sqlite3
|
||||
therubyracer (~> 0.10.2)
|
||||
thin
|
||||
twitter-bootstrap-rails
|
||||
uglifier (>= 1.0.3)
|
||||
|
|
|
@ -12,4 +12,5 @@
|
|||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require twitter/bootstrap
|
||||
//= require_tree .
|
||||
|
|
4
app/assets/javascripts/bootstrap.js.coffee
Normal file
4
app/assets/javascripts/bootstrap.js.coffee
Normal file
|
@ -0,0 +1,4 @@
|
|||
jQuery ->
|
||||
$("a[rel=popover]").popover()
|
||||
$(".tooltip").tooltip()
|
||||
$("a[rel=tooltip]").tooltip()
|
31
app/assets/stylesheets/bootstrap_and_overrides.css.less
vendored
Normal file
31
app/assets/stylesheets/bootstrap_and_overrides.css.less
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
@import "twitter/bootstrap/bootstrap";
|
||||
@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");
|
||||
|
||||
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
|
||||
// Note: If you use asset_path() here, your compiled bootstrap_and_overrides.css will not
|
||||
// have the proper paths. So for now we use the absolute path.
|
||||
@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");
|
||||
|
||||
// Font Awesome
|
||||
@import "fontawesome";
|
||||
|
||||
// Glyphicons
|
||||
//@import "twitter/bootstrap/sprites.less";
|
||||
|
||||
// Your custom LESS stylesheets goes here
|
||||
//
|
||||
// Since bootstrap was imported above you have access to its mixins which
|
||||
// you may use and inherit here
|
||||
//
|
||||
// If you'd like to override bootstrap's own variables, you can do so here as well
|
||||
// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
|
||||
//
|
||||
// Example:
|
||||
// @linkColor: #ff0000;
|
|
@ -1,14 +1,89 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>MsuCourseAlerter</title>
|
||||
<%= stylesheet_link_tag "application", :media => "all" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><%= content_for?(:title) ? yield(:title) : "MsuCourseAlerter" %></title>
|
||||
<%= csrf_meta_tags %>
|
||||
|
||||
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
|
||||
<%= stylesheet_link_tag "application", :media => "all" %>
|
||||
|
||||
<!-- For third-generation iPad with high-resolution Retina display: -->
|
||||
<!-- Size should be 144 x 144 pixels -->
|
||||
<%= favicon_link_tag 'images/apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
|
||||
|
||||
<!-- For iPhone with high-resolution Retina display: -->
|
||||
<!-- Size should be 114 x 114 pixels -->
|
||||
<%= favicon_link_tag 'images/apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %>
|
||||
|
||||
<!-- For first- and second-generation iPad: -->
|
||||
<!-- Size should be 72 x 72 pixels -->
|
||||
<%= favicon_link_tag 'images/apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %>
|
||||
|
||||
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
|
||||
<!-- Size should be 57 x 57 pixels -->
|
||||
<%= favicon_link_tag 'images/apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %>
|
||||
|
||||
<!-- For all other devices -->
|
||||
<!-- Size should be 32 x 32 pixels -->
|
||||
<%= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon' %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-fluid-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container-fluid">
|
||||
<a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<a class="brand" href="#">MsuCourseAlerter</a>
|
||||
<div class="container-fluid nav-collapse">
|
||||
<ul class="nav">
|
||||
<li><%= link_to "Link1", "/path1" %></li>
|
||||
<li><%= link_to "Link2", "/path2" %></li>
|
||||
<li><%= link_to "Link3", "/path3" %></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<div class="well sidebar-nav">
|
||||
<ul class="nav nav-list">
|
||||
<li class="nav-header">Sidebar</li>
|
||||
<li><%= link_to "Link1", "/path1" %></li>
|
||||
<li><%= link_to "Link2", "/path2" %></li>
|
||||
<li><%= link_to "Link3", "/path3" %></li>
|
||||
</ul>
|
||||
</div><!--/.well -->
|
||||
</div><!--/span-->
|
||||
<div class="span9">
|
||||
<%= bootstrap_flash %>
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div><!--/row-->
|
||||
|
||||
<footer>
|
||||
<p>© Company 2013</p>
|
||||
</footer>
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
||||
<!-- Javascripts
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<%= javascript_include_tag "application" %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
17
config/locales/en.bootstrap.yml
Normal file
17
config/locales/en.bootstrap.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Sample localization file for English. Add more files in this directory for other locales.
|
||||
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
||||
|
||||
en:
|
||||
helpers:
|
||||
actions: "Actions"
|
||||
links:
|
||||
back: "Back"
|
||||
cancel: "Cancel"
|
||||
confirm: "Are you sure?"
|
||||
destroy: "Delete"
|
||||
new: "New"
|
||||
titles:
|
||||
edit: "Edit"
|
||||
save: "Save"
|
||||
new: "New"
|
||||
delete: "Delete"
|
Loading…
Reference in a new issue