Skip to content

Commit c5a35d1

Browse files
committed
Switch to layout
1 parent ba65af2 commit c5a35d1

File tree

6 files changed

+45
-100
lines changed

6 files changed

+45
-100
lines changed

Diff for: views/countries_view.erb

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<title>List all the things</title>
5-
<!-- Latest compiled and minified CSS -->
6-
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
7-
</head>
8-
<body>
9-
<div class='container'>
1+
<h1>List of countries</h1>
102

11-
<h1>List of countries</h1>
12-
13-
<!-- put your table here -->
14-
15-
</div>
16-
</body>
17-
</html>
3+
<!-- put your table here -->

Diff for: views/fruits_view.erb

+6-21
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<title>List all the things</title>
5-
<!-- Latest compiled and minified CSS -->
6-
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
7-
</head>
8-
<body>
9-
<div class='container'>
1+
<h1>List of fruits</h1>
102

11-
<h1>List of fruits</h1>
12-
13-
<ul>
14-
<% @fruits.each do |fruit| %>
15-
<li><%= fruit %></li>
16-
<% end %>
17-
</ul>
18-
19-
20-
</div>
21-
</body>
22-
</html>
3+
<ul>
4+
<% @fruits.each do |fruit| %>
5+
<li><%= fruit %></li>
6+
<% end %>
7+
</ul>

Diff for: views/index.erb

+17-33
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,18 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<title>List all the things</title>
5-
<!-- Latest compiled and minified CSS -->
6-
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
7-
<style>
8-
h1 { background-color: yellow;}
9-
</style>
10-
</head>
11-
<body>
12-
<div class='container'>
13-
<h1>List all the things</h1>
14-
<p class='text-center'>
15-
<img alt="List all the things" src="http://i.qkme.me/3vctmh.jpg">
16-
</p>
17-
<div class="row">
18-
<div class='col-lg-3'>
19-
<h2><a href='/fruit'>Fruit</a></h2>
20-
</div>
21-
<div class='col-lg-3'>
22-
<h2><a href='/oldest_dogs'>Oldest dogs</a></h2>
23-
</div>
24-
<div class='col-lg-3'>
25-
<h2><a href='/countries'>Countries</a></h2>
26-
</div>
27-
<div class='col-lg-3'>
28-
<h2><a href='/simpsons'>Simpsons</a></h2>
29-
</div>
30-
</div>
31-
1+
<h1 style="background-color: yellow;">List all the things</h1>
2+
<p class='text-center'>
3+
<img alt="List all the things" src="http://i.qkme.me/3vctmh.jpg">
4+
</p>
5+
<div class="row">
6+
<div class='col-lg-3'>
7+
<h2><a href='/fruit'>Fruit</a></h2>
328
</div>
33-
</body>
34-
</html>
9+
<div class='col-lg-3'>
10+
<h2><a href='/oldest_dogs'>Oldest dogs</a></h2>
11+
</div>
12+
<div class='col-lg-3'>
13+
<h2><a href='/countries'>Countries</a></h2>
14+
</div>
15+
<div class='col-lg-3'>
16+
<h2><a href='/simpsons'>Simpsons</a></h2>
17+
</div>
18+
</div>

Diff for: views/layout.erb

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>List all the things</title>
5+
<!-- Latest compiled and minified CSS -->
6+
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
7+
</head>
8+
<body>
9+
<div class='container'>
10+
11+
<%= yield %>
12+
13+
</div>
14+
</body>
15+
</html>

Diff for: views/oldest_dogs_view.erb

+3-16
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<title>List all the things</title>
5-
<!-- Latest compiled and minified CSS -->
6-
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
7-
</head>
8-
<body>
9-
<div class='container'>
1+
<h1>List of oldest dogs</h1>
102

11-
<h1>List of oldest dogs</h1>
3+
<!-- put your list here -->
124

13-
<!-- put your list here -->
145

156

167

17-
18-
<p>For more info see <a href="http://en.wikipedia.org/wiki/List_of_oldest_dogs">here</a>.</p>
19-
</div>
20-
</body>
21-
</html>
8+
<p>For more info see <a href="http://en.wikipedia.org/wiki/List_of_oldest_dogs">here</a>.</p>

Diff for: views/simpsons_view.erb

+2-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<title>List all the things</title>
5-
<!-- Latest compiled and minified CSS -->
6-
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
7-
</head>
8-
<body>
9-
<div class='container'>
10-
<h1>List of Simpsons</h1>
1+
<h1>List of Simpsons</h1>
112

12-
<!-- put your profiles here -->
3+
<!-- put your profiles here -->
134

14-
</div>
15-
</body>
16-
</html>

0 commit comments

Comments
 (0)