Skip to content

Commit 8ee647e

Browse files
committed
Excercise 3 Complete
1 parent b5801e0 commit 8ee647e

3 files changed

Lines changed: 54 additions & 8 deletions

File tree

public/index.html

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
1-
<h1> Hello</h1>
1+
2+
<html>
3+
<body>
4+
<h1>You're using a layout</h1>
5+
<div>
6+
<h3> I'm a header</h3>
7+
<p>Navigation:</p>
8+
<a href='index.html'>Home</a>
9+
<a href='me.html'>Me</a>
10+
</div>
11+
<hr />
12+
<div>
13+
<h1> Hello</h1>
214
<p>
315
The time is now:
4-
2013-04-13 14:06:39 -0500
16+
2013-04-13 14:28:50 -0500
517
</p>
618

719
<p>
820
My Name is:
921

1022
</p>
1123

24+
25+
</div>
26+
<hr />
27+
<div>
28+
<h3> I'm a footer</h3>
29+
<p>Put things in the footer</p>
30+
</div>
31+
</body>
32+
</html>

public/me.html

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11

2+
<html>
3+
<body>
4+
<h1>You're using a layout</h1>
5+
<div>
6+
<h3> I'm a header</h3>
7+
<p>Navigation:</p>
8+
<a href='index.html'>Home</a>
9+
<a href='me.html'>Me</a>
10+
</div>
11+
<hr />
12+
<div>
13+
214

315
<div class="header">
416
<h2>This is the 'Me' page. </h2>
@@ -14,4 +26,12 @@ <h2>This is the 'Me' page. </h2>
1426
<li>Cooking</li>
1527

1628
</ul>
17-
</div>
29+
</div>
30+
</div>
31+
<hr />
32+
<div>
33+
<h3> I'm a footer</h3>
34+
<p>Put things in the footer</p>
35+
</div>
36+
</body>
37+
</html>

views/layouts/application.html.erb

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
<%
2+
def link_to(name, url)
3+
return "<a href='#{url}'>#{name}</a>"
4+
end
5+
%>
16
<html>
27
<body>
38
<h1>You're using a layout</h1>
4-
<p>
9+
<div>
510
<h3> I'm a header</h3>
6-
<p>Put things in the header</p>
7-
<a href='me.html'>Me</a>
8-
9-
</p>
11+
<p>Navigation:</p>
12+
<%= link_to('Home', 'index.html') %>
13+
<%= link_to('Me', 'me.html') %>
14+
</div>
1015
<hr />
1116
<div>
1217
<%= yield %>

0 commit comments

Comments
 (0)