Skip to content

Commit 95bf007

Browse files
committed
adds bootstrap
1 parent 5321476 commit 95bf007

File tree

9 files changed

+113
-21
lines changed

9 files changed

+113
-21
lines changed

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ gem 'coffee-rails', '~> 4.0.0'
3030
# Use jquery as the JavaScript library
3131
gem 'jquery-rails'
3232

33+
gem "twitter-bootstrap-rails"
34+
gem "therubyracer"
35+
gem "less-rails"
36+
3337
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
3438
gem 'jbuilder', '~> 1.2'
3539

Gemfile.lock

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ GEM
3636
execjs
3737
coffee-script-source (1.7.0)
3838
columnize (0.3.6)
39+
commonjs (0.2.7)
3940
debugger (1.6.5)
4041
columnize (>= 0.3.1)
4142
debugger-linecache (~> 1.2.0)
@@ -60,6 +61,12 @@ GEM
6061
railties (>= 3.0, < 5.0)
6162
thor (>= 0.14, < 2.0)
6263
json (1.8.1)
64+
less (2.5.0)
65+
commonjs (~> 0.2.7)
66+
less-rails (2.5.0)
67+
actionpack (>= 3.1)
68+
less (~> 2.5.0)
69+
libv8 (3.16.14.3)
6370
mail (2.5.4)
6471
mime-types (~> 1.16)
6572
treetop (~> 1.4.8)
@@ -96,6 +103,7 @@ GEM
96103
rake (10.2.2)
97104
rdoc (4.1.1)
98105
json (~> 1.4)
106+
ref (1.0.5)
99107
sass (3.2.19)
100108
sass-rails (4.0.3)
101109
railties (>= 4.0.0, < 5.0)
@@ -115,12 +123,20 @@ GEM
115123
actionpack (>= 3.0)
116124
activesupport (>= 3.0)
117125
sprockets (~> 2.8)
126+
therubyracer (0.12.1)
127+
libv8 (~> 3.16.14.0)
128+
ref
118129
thor (0.19.1)
119130
thread_safe (0.3.3)
120131
tilt (1.4.1)
121132
treetop (1.4.15)
122133
polyglot
123134
polyglot (>= 0.3.1)
135+
twitter-bootstrap-rails (2.2.8)
136+
actionpack (>= 3.1)
137+
execjs
138+
rails (>= 3.1)
139+
railties (>= 3.1)
124140
tzinfo (0.3.39)
125141
uglifier (2.5.0)
126142
execjs (>= 0.3.0)
@@ -134,10 +150,13 @@ DEPENDENCIES
134150
haml-rails
135151
jbuilder (~> 1.2)
136152
jquery-rails
153+
less-rails
137154
mysql2
138155
pg
139156
pry-debugger
140157
rails (= 4.0.2)
141158
sass-rails (~> 4.0.0)
142159
sdoc
160+
therubyracer
161+
twitter-bootstrap-rails
143162
uglifier (>= 1.3.0)

app/assets/javascripts/application.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//= require jquery
1414
//= require jquery_ujs
1515
//= require_tree .
16+
//= require twitter/bootstrap
1617

1718
$(document).ready(function() {
1819
applyMasks();

app/assets/stylesheets/application.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@
1010
*
1111
*= require_self
1212
*= require_tree .
13+
*= require bootstrap_and_overrides
1314
*/
15+
16+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@import "twitter/bootstrap/bootstrap";
2+
@import "twitter/bootstrap/responsive";
3+
4+
// Set the correct sprite paths
5+
@iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings.png");
6+
@iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white.png");
7+
8+
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
9+
// Note: If you use asset_path() here, your compiled bootstrap_and_overrides.css will not
10+
// have the proper paths. So for now we use the absolute path.
11+
@fontAwesomeEotPath: asset-path("fontawesome-webfont.eot?v=3.0.2");
12+
@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot?#iefix&v=3.0.2");
13+
@fontAwesomeWoffPath: asset-path("fontawesome-webfont.woff?v=3.0.2");
14+
@fontAwesomeTtfPath: asset-path("fontawesome-webfont.ttf?v=3.0.2");
15+
16+
// Font Awesome
17+
//@import "fontawesome";
18+
19+
// Glyphicons
20+
//@import "twitter/bootstrap/sprites.less";
21+
22+
// Your custom LESS stylesheets goes here
23+
//
24+
// Since bootstrap was imported above you have access to its mixins which
25+
// you may use and inherit here
26+
//
27+
// If you'd like to override bootstrap's own variables, you can do so here as well
28+
// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
29+
//
30+
// Example:
31+
// @linkColor: #ff0000;
32+
33+
table td.text-center, table th.text-center {
34+
text-align: center !important
35+
}

app/views/financiamento/_imovel.html.haml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
%p
1+
%h5
22
Valor total pago:
33
= number_to_currency valor_total_pago
44

5-
%table{ style: 'width: 800px'}
5+
%table{class: 'table table-striped table-bordered'}
66
%tr
7-
%td #
8-
%td Parcela
9-
%td Saldo Devedor
7+
%th #
8+
%th Parcela
9+
%th Saldo Devedor
1010

1111
- tabela.each_with_index do |parcela, index|
1212
%tr

app/views/financiamento/index.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
= label_tag 'Meses'
99
= text_field_tag 'parcelas', '', mask_it: 'number'
10-
11-
= submit_tag 'Calcular'
10+
%br
11+
= submit_tag 'Calcular', class: 'btn'
1212

1313
#result

app/views/layouts/application.html.erb

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
!!! 5
2+
%html(lang="en")
3+
%head
4+
%meta(charset="utf-8")
5+
%meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
6+
%meta(name="viewport" content="width=device-width, initial-scale=1.0")
7+
%title= content_for?(:title) ? yield(:title) : "Elo"
8+
= csrf_meta_tags
9+
/ Le HTML5 shim, for IE6-8 support of HTML elements
10+
/[if lt IE 9]
11+
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
12+
= stylesheet_link_tag "application", :media => "all"
13+
%link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")
14+
%link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114")
15+
%link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72")
16+
%link(href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed")
17+
/%link(href="favicon.ico" rel="shortcut icon")
18+
19+
20+
%body
21+
.navbar.navbar-fluid-top
22+
.navbar-inner
23+
.container-fluid
24+
%a.btn.btn-navbar(data-target=".nav-collapse" data-toggle="collapse")
25+
%span.icon-bar
26+
%span.icon-bar
27+
%span.icon-bar
28+
%a.brand(href="#") Financiamento
29+
.container.nav-collapse
30+
%ul.nav
31+
%li.divider-vertical
32+
%li=# link_to t('pages.tournaments.my_tournaments'), ''
33+
34+
.container-fluid
35+
36+
.row-fluid{id: "#{controller_name}-#{action_name}"}
37+
.span12
38+
= yield
39+
40+
%footer
41+
/%p &copy; Elo Tournaments
42+
43+
= javascript_include_tag "application"
44+
= yield :js

0 commit comments

Comments
 (0)