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

Commit e762a2f

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

9 files changed

Lines changed: 117 additions & 35 deletions

File tree

Gemfile

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

7373
# required on windows
7474
gem "tzinfo-data"
75+
76+
# Style with style
77+
gem 'bootstrap-sass', '~> 3.2.0'
78+
gem 'autoprefixer-rails'

Gemfile.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ GEM
2929
tzinfo (~> 1.1)
3030
arel (5.0.1.20140414130214)
3131
ast (2.0.0)
32+
autoprefixer-rails (2.2.0.20140804)
33+
execjs
3234
bcrypt (3.1.7)
35+
bootstrap-sass (3.2.0.1)
36+
sass (~> 3.2)
3337
builder (3.2.2)
3438
celluloid (0.15.2)
3539
timers (~> 1.1.0)
@@ -198,6 +202,8 @@ GEM
198202
coffee-rails
199203
tzinfo (1.2.1)
200204
thread_safe (~> 0.1)
205+
tzinfo-data (1.2014.6)
206+
tzinfo (>= 1.0.0)
201207
uglifier (2.5.3)
202208
execjs (>= 0.3.0)
203209
json (>= 1.8.0)
@@ -206,6 +212,8 @@ PLATFORMS
206212
ruby
207213

208214
DEPENDENCIES
215+
autoprefixer-rails
216+
bootstrap-sass (~> 3.2.0)
209217
codeclimate-test-reporter
210218
coffee-rails (~> 4.0.0)
211219
guard-rspec
@@ -224,4 +232,5 @@ DEPENDENCIES
224232
spring
225233
sqlite3
226234
turbolinks
235+
tzinfo-data
227236
uglifier (>= 1.3.0)

Templates/bootstrap-3.2.0-dist/index.html

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

99
<!-- Bootstrap -->
1010
<link href="css/bootstrap.min.css" rel="stylesheet">
11-
<link href="css/bootstrap-theme.min.css" rel="stylesheet">
11+
<link href="css/bootstrap-theme.min.css" rel="stylesheet">
12+
<link href="css/eigene.css" rel="stylesheet">
1213

1314
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
1415
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@@ -132,4 +133,4 @@ <h2>Food Court</h2>
132133
<!-- Include all compiled plugins (below), or include individual files as needed -->
133134
<script src="js/bootstrap.min.js"></script>
134135
</body>
135-
</html>
136+
</html>

app/assets/javascripts/application.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
//= require jquery_ujs
1515
//= require jquery-ui
1616
//= require turbolinks
17+
//= require bootstrap-sprockets
1718
//= require_tree .

app/assets/stylesheets/application.css

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@import "bootstrap-sprockets";
2+
@import "bootstrap";
3+
@import "bootstrap/theme";
4+
5+
.navbar-default .navbar-nav > .active > a {
6+
background-image: linear-gradient(to bottom, #ff6600 0%, #ffd89a 100%);
7+
}
8+
9+
.navbar-inverse {
10+
border-color: #ffd89a;
11+
background-image: linear-gradient(to bottom, #ffd89a 0%, #ffd89a 100%);
12+
}
13+
14+
.navbar-inverse .navbar-nav > .active > a {
15+
background-image: linear-gradient(to bottom, #ff6600 0%, #ffbb00 100%);
16+
}
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+
<ul class="nav navbar-nav">
50+
<li class="active"><%= link_to "Overview", root_path %></li>
51+
<li><%= link_to "People", people_path %></li>
52+
<li><%= link_to "Projects", projects_path %></li>
53+
</ul>
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
<h1>Welcome#index</h1>
1+
<% content_for :title do "Overview" end -%>
2+
<div class="row">
3+
<div class="col-xs-8 col-xs-offset-1">
4+
<h2>Holidays</h2>
5+
Christine (bis 1.9.)<br />
6+
Andrea (ab Montag)
7+
</div>
8+
<div class="col-xs-3">
9+
<h2>Links</h2>
10+
<a href="http://10.43.1.18/MediaWiki/index.php/Hauptseite">World Vision Wiki</a><br />
11+
<a href="http://10.43.1.18/glpi/">IT Tickets</a><br />
12+
<a href="http://10.43.1.18/TeamPass/">Passwort Datenbank</a><br />
13+
</div>
14+
</div>
15+
<div class="row">
16+
<div class="col-xs-8 col-xs-offset-1">
217
<ul>
318
<li><%= link_to 'New Person', new_person_path %></li>
419
<li><%= link_to 'New Project', new_project_path %></li>
520
</ul>
21+
</div>
22+
</div>

public/images/worldvision.png

4.25 KB
Loading

0 commit comments

Comments
 (0)