Skip to content
This repository was archived by the owner on Mar 9, 2020. It is now read-only.

Commit 13fae9a

Browse files
committed
First shot at bootstrapifying the layout.
1 parent de5756c commit 13fae9a

File tree

10 files changed

+158
-20
lines changed

10 files changed

+158
-20
lines changed

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,8 @@ gem "scoped_search"
7272

7373
# required on windows
7474
gem "tzinfo-data"
75+
76+
# Styling with style
77+
gem "therubyracer"
78+
gem "less-rails"
79+
gem "twitter-bootstrap-rails", '~> 3.2.0'

Gemfile.lock

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ GEM
4343
coffee-script-source
4444
execjs
4545
coffee-script-source (1.7.1)
46+
commonjs (0.2.7)
4647
diff-lcs (1.2.5)
4748
docile (1.1.5)
4849
erubis (2.7.0)
@@ -72,6 +73,12 @@ GEM
7273
railties (>= 3.2.16)
7374
json (1.8.1)
7475
jwt (1.0.0)
76+
less (2.5.1)
77+
commonjs (~> 0.2.7)
78+
less-rails (2.5.0)
79+
actionpack (>= 3.1)
80+
less (~> 2.5.0)
81+
libv8 (3.16.14.3)
7582
listen (2.7.9)
7683
celluloid (>= 0.15.2)
7784
rb-fsevent (>= 0.9.3)
@@ -128,6 +135,7 @@ GEM
128135
rb-readline (0.5.1)
129136
rdoc (4.1.1)
130137
json (~> 1.4)
138+
ref (1.0.5)
131139
rspec (3.0.0)
132140
rspec-core (~> 3.0.0)
133141
rspec-expectations (~> 3.0.0)
@@ -187,6 +195,9 @@ GEM
187195
activesupport (>= 3.0)
188196
sprockets (~> 2.8)
189197
sqlite3 (1.3.9)
198+
therubyracer (0.12.1)
199+
libv8 (~> 3.16.14.0)
200+
ref
190201
thor (0.19.1)
191202
thread_safe (0.3.4)
192203
tilt (1.4.1)
@@ -196,8 +207,15 @@ GEM
196207
polyglot (>= 0.3.1)
197208
turbolinks (2.2.2)
198209
coffee-rails
210+
twitter-bootstrap-rails (3.2.0)
211+
actionpack (~> 4.1)
212+
execjs (~> 2.2)
213+
rails (~> 4.1)
214+
railties (~> 4.1)
199215
tzinfo (1.2.1)
200216
thread_safe (~> 0.1)
217+
tzinfo-data (1.2014.6)
218+
tzinfo (>= 1.0.0)
201219
uglifier (2.5.3)
202220
execjs (>= 0.3.0)
203221
json (>= 1.8.0)
@@ -212,6 +230,7 @@ DEPENDENCIES
212230
jbuilder (~> 2.0)
213231
jquery-rails
214232
jquery-ui-rails
233+
less-rails
215234
rails (= 4.1.4)
216235
rake
217236
rb-readline
@@ -223,5 +242,8 @@ DEPENDENCIES
223242
sorcery (>= 0.8.6)
224243
spring
225244
sqlite3
245+
therubyracer
226246
turbolinks
247+
twitter-bootstrap-rails (~> 3.2.0)
248+
tzinfo-data
227249
uglifier (>= 1.3.0)

app/assets/javascripts/application.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//
1313
//= require jquery
1414
//= require jquery_ujs
15+
//= require twitter/bootstrap
1516
//= require jquery-ui
1617
//= require turbolinks
1718
//= require_tree .
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
jQuery ->
2+
$("a[rel~=popover], .has-popover").popover()
3+
$("a[rel~=tooltip], .has-tooltip").tooltip()

app/assets/stylesheets/application.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,16 @@
1313
*= require_tree .
1414
*= require_self
1515
*/
16+
17+
.navbar-default .navbar-nav > .active > a {
18+
background-image: linear-gradient(to bottom, #ff6600 0%, #ffd89a 100%);
19+
}
20+
21+
.navbar-inverse {
22+
border-color: #ffd89a;
23+
background-image: linear-gradient(to bottom, #ffd89a 0%, #ffd89a 100%);
24+
}
25+
26+
.navbar-inverse .navbar-nav > .active > a {
27+
background-image: linear-gradient(to bottom, #ff6600 0%, #ffbb00 100%);
28+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
=require twitter-bootstrap-static/bootstrap
3+
4+
Use Font Awesome icons (default)
5+
To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites"
6+
=require twitter-bootstrap-static/fontawesome
7+
*/
Lines changed: 66 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,75 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en">
33
<head>
4-
<title>Hrdb</title>
5-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6-
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
4+
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title><%= content_for?(:title) ? "#{yield(:title)} | HRDB" : "HRDB" %></title>
77
<%= csrf_meta_tags %>
8+
9+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
10+
<!--[if lt IE 9]>
11+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
12+
<![endif]-->
13+
14+
<%= stylesheet_link_tag "application", :media => "all" %>
15+
16+
<!-- For third-generation iPad with high-resolution Retina display: -->
17+
<!-- Size should be 144 x 144 pixels -->
18+
<%= favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
19+
20+
<!-- For iPhone with high-resolution Retina display: -->
21+
<!-- Size should be 114 x 114 pixels -->
22+
<%= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %>
23+
24+
<!-- For first- and second-generation iPad: -->
25+
<!-- Size should be 72 x 72 pixels -->
26+
<%= favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %>
27+
28+
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
29+
<!-- Size should be 57 x 57 pixels -->
30+
<%= favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %>
31+
32+
<!-- For all other devices -->
33+
<!-- Size should be 32 x 32 pixels -->
34+
<%= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon' %>
35+
36+
<%= javascript_include_tag "application" %>
837
</head>
938
<body>
1039

11-
<%= yield %>
12-
13-
<p>
14-
<%= link_to "People", people_path %> |
15-
<%= link_to "Projects", projects_path %> |
16-
<% if current_user %>
17-
Logged in as <%= current_user.email %>.
18-
<%= link_to "Log out", logout_path %>
19-
<% else %>
20-
<%= link_to "Sign up", signup_path %> or
21-
<%= link_to "log in", login_path %>.
22-
<% end %>
23-
</p>
40+
<div class="navbar navbar-default navbar-static-top" role="navigation">
41+
<div class="container-fluid">
42+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
43+
<span class="icon-bar"></span>
44+
<span class="icon-bar"></span>
45+
<span class="icon-bar"></span>
46+
</button>
47+
<a class="navbar-brand" href="http://www.worldvision.at"><%= image_tag 'worldvision.png', alt: 'www.worldvision.at', height: '50px', style:"margin-top:-15px; margin-left:-10px" %></a>
48+
<div class="navbar-collapse collapse navbar-responsive-collapse">
49+
<%= menu_group do %>
50+
<%= menu_item "Overview", root_path %>
51+
<%= menu_item "People", people_path %>
52+
<%= menu_item "Projects", projects_path %>
53+
<% end %>
54+
</div>
55+
</div>
56+
</div>
57+
58+
<h1 align="center"><%= yield(:title) %></h1>
59+
60+
<div class="container">
61+
<div class="row">
62+
<div class="col-lg-12">
63+
<%= bootstrap_flash %>
64+
</div>
65+
</div><!--/row-->
66+
<%= yield %>
67+
68+
<footer>
69+
<p>&copy; Company 2014</p>
70+
</footer>
71+
72+
</div> <!-- /container -->
2473

2574
</body>
2675
</html>

app/views/welcome/index.html.erb

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1-
<h1>Welcome#index</h1>
2-
<ul>
1+
<% content_for :title do %>
2+
Overview
3+
<% end %>
4+
<div class="row">
5+
<div class="col-xs-8 col-xs-offset-1">
6+
<h2>Holidays</h2>
7+
Christine (bis 1.9.)<br />
8+
Andrea (ab Montag)
9+
310
<li><%= link_to 'New Person', new_person_path %></li>
411
<li><%= link_to 'New Project', new_project_path %></li>
5-
</ul>
12+
</div>
13+
<div class="col-xs-3">
14+
<h2>Links</h2>
15+
<a href="http://10.43.1.18/MediaWiki/index.php/Hauptseite">World Vision Wiki</a><br />
16+
<a href="http://10.43.1.18/glpi/">IT Tickets</a><br />
17+
<a href="http://10.43.1.18/TeamPass/">Passwort Datenbank</a><br />
18+
</div>
19+
20+
</div>

config/locales/en.bootstrap.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Sample localization file for English. Add more files in this directory for other locales.
2+
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3+
4+
en:
5+
breadcrumbs:
6+
application:
7+
root: "Index"
8+
pages:
9+
pages: "Pages"
10+
helpers:
11+
actions: "Actions"
12+
links:
13+
back: "Back"
14+
cancel: "Cancel"
15+
confirm: "Are you sure?"
16+
destroy: "Delete"
17+
new: "New"
18+
edit: "Edit"
19+
titles:
20+
edit: "Edit %{model}"
21+
save: "Save %{model}"
22+
new: "New %{model}"
23+
delete: "Delete %{model}"

public/images/worldvision.png

4.25 KB
Loading

0 commit comments

Comments
 (0)