File tree Expand file tree Collapse file tree 4 files changed +62
-4
lines changed
Expand file tree Collapse file tree 4 files changed +62
-4
lines changed Original file line number Diff line number Diff line change 1- < h1 > Hello</ h1 >
1+
2+
3+ < html >
4+ < body >
5+ < h1 > You're using a layout</ h1 >
6+ < p >
7+ < h3 > I'm a header</ h3 >
8+ < p > Put things in the header</ p >
9+ < a href ='http://google.com '> This is a link to google</ a >
10+ < a href ='me.html '> Me</ a >
11+
12+ </ p >
13+ < hr />
14+ < div >
15+ < h1 > Hello</ h1 >
216< p >
317 The time is now:
4- 2013-11-09 14:08:47 -0800
18+ 2013-11-09 14:37:56 -0800
519</ p >
620
721< p >
822 My Name is:
923
1024</ p >
1125
26+
27+ </ div >
28+ < hr />
29+ < div >
30+ < h3 > I'm a footer</ h3 >
31+ < p > Put things in the footer</ p >
32+ < a href ='http://google2222222.com '> This is a link to google2222222</ a >
33+ </ div >
34+ </ body >
35+ </ html >
Original file line number Diff line number Diff line change 1- foo
1+
2+
3+ < html >
4+ < body >
5+ < h1 > You're using a layout</ h1 >
6+ < p >
7+ < h3 > I'm a header</ h3 >
8+ < p > Put things in the header</ p >
9+ < a href ='http://google.com '> This is a link to google</ a >
10+ < a href ='me.html '> Me</ a >
11+
12+ </ p >
13+ < hr />
14+ < div >
15+ foo
216poo
317< h1 > watch out!</ h1 >
418< p > dance dance </ p >
@@ -13,4 +27,13 @@ <h1>watch out!</h1>
1327
1428 < li > I like kissing human</ li >
1529
16- </ ul >
30+ </ ul >
31+ </ div >
32+ < hr />
33+ < div >
34+ < h3 > I'm a footer</ h3 >
35+ < p > Put things in the footer</ p >
36+ < a href ='http://google2222222.com '> This is a link to google2222222</ a >
37+ </ div >
38+ </ body >
39+ </ html >
Original file line number Diff line number Diff line change 1010## Capture control+c to shut down the server
1111trap 'INT' do server . shutdown end
1212
13+ server . mount_proc '/' do |req , res |
14+ res . body = 'Hello, world!'
15+ end
1316## Start the server
1417server . start
Original file line number Diff line number Diff line change 1+ <%
2+ def link_to(name, url)
3+ return "<a href='#{url}'>#{name}</a>"
4+ end
5+ %>
6+
17 <html >
28 < body >
39 < h1 > You're using a layout</ h1 >
410 < p >
511 < h3 > I'm a header</ h3 >
612 < p > Put things in the header</ p >
13+ <%= link_to ( 'This is a link to google' , 'http://google.com' ) %>
714 < a href ='me.html '> Me</ a >
815
916 </ p >
1522 < div >
1623 < h3 > I'm a footer</ h3 >
1724 < p > Put things in the footer</ p >
25+ <%= link_to ( 'This is a link to google2222222' , 'http://google2222222.com' ) %>
1826 </ div >
1927 </ body >
2028</ html >
You can’t perform that action at this time.
0 commit comments