Skip to content

Commit c749fe0

Browse files
committed
schneems#4 Addition of Template and URL links
Added Template and URL links to Google.
1 parent 6a0f541 commit c749fe0

4 files changed

Lines changed: 77 additions & 7 deletions

File tree

public/Ken'sPage.html

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
<h1> Hello</h1>
1+
2+
<html>
3+
<body>
4+
<h1>You're using a layout</h1>
5+
<p>
6+
<h3> I'm a header</h3>
7+
<p>Put things in the header</p>
8+
<a <a href='http://google.com'>This is a link to google</a></a>
9+
10+
</p>
11+
<hr />
12+
<div>
13+
<h1> Hello</h1>
214
<p>
315
The time is now:
4-
2014-02-18 13:43:04 -0700
16+
2014-02-18 13:56:58 -0700
517
</p>
618

719
<p>
@@ -17,4 +29,13 @@ <h1> Hello</h1>
1729

1830
<li>I like to listen to The Devil Wears Prada.</li>
1931

20-
</ul>
32+
</ul>
33+
</div>
34+
<hr />
35+
<div>
36+
<h3> I'm a footer</h3>
37+
<p>Put things in the footer</p>
38+
<a <a href='http://google.com'>This is a link to google</a></a>
39+
</div>
40+
</body>
41+
</html>

public/index.html

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
1-
<h1> Hello</h1>
1+
2+
<html>
3+
<body>
4+
<h1>You're using a layout</h1>
5+
<p>
6+
<h3> I'm a header</h3>
7+
<p>Put things in the header</p>
8+
<a <a href='http://google.com'>This is a link to google</a></a>
9+
10+
</p>
11+
<hr />
12+
<div>
13+
<h1> Hello</h1>
214
<p>
315
The time is now:
4-
2014-02-18 13:43:04 -0700
16+
2014-02-18 13:56:58 -0700
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+
<a <a href='http://google.com'>This is a link to google</a></a>
31+
</div>
32+
</body>
33+
</html>

public/me.html

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
foo
1+
2+
<html>
3+
<body>
4+
<h1>You're using a layout</h1>
5+
<p>
6+
<h3> I'm a header</h3>
7+
<p>Put things in the header</p>
8+
<a <a href='http://google.com'>This is a link to google</a></a>
9+
10+
</p>
11+
<hr />
12+
<div>
13+
foo
14+
</div>
15+
<hr />
16+
<div>
17+
<h3> I'm a footer</h3>
18+
<p>Put things in the footer</p>
19+
<a <a href='http://google.com'>This is a link to google</a></a>
20+
</div>
21+
</body>
22+
</html>

views/layouts/application.html.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
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>
49
<p>
510
<h3> I'm a header</h3>
611
<p>Put things in the header</p>
7-
<a href='me.html'>Me</a>
12+
<a <%= link_to('This is a link to google', 'http://google.com') %></a>
813

914
</p>
1015
<hr />
@@ -15,6 +20,7 @@
1520
<div>
1621
<h3> I'm a footer</h3>
1722
<p>Put things in the footer</p>
23+
<a <%= link_to('This is a link to google', 'http://google.com') %></a>
1824
</div>
1925
</body>
2026
</html>

0 commit comments

Comments
 (0)