Mercurial Hosting > luan
comparison web/src/luan/modules/web/shell.luan @ 391:2f5cc9c2cbf0
replace Html.simply_html_page with simply_html_head and simply_html_body_bottom
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 24 Apr 2015 14:05:52 -0600 |
parents | 612a283b3d14 |
children | 199eb7f1b828 |
comparison
equal
deleted
inserted
replaced
390:bfbbce690bba | 391:2f5cc9c2cbf0 |
---|---|
38 } | 38 } |
39 end | 39 end |
40 end | 40 end |
41 | 41 |
42 Io.stdout = Http.response.text_writer() | 42 Io.stdout = Http.response.text_writer() |
43 Html.simply_html_page{ | 43 %> |
44 head = function() %> | 44 <html> |
45 <title>Luan Shell</title> | 45 <head> |
46 <% end; | 46 <% Html.simply_html_head() %> |
47 body = function() %> | 47 <title>Luan Shell</title> |
48 <div container> | 48 </head> |
49 <h3>Luan Shell</h3> | 49 <body> |
50 <p>This is a command shell. Enter commands below.</p> | 50 <div container> |
51 <pre><% | 51 <h3>Luan Shell</h3> |
52 for _,v in ipairs(history) do | 52 <p>This is a command shell. Enter commands below.</p> |
53 Io.stdout.write(v) | 53 <pre><% |
54 end | 54 for _,v in ipairs(history) do |
55 %></pre> | 55 Io.stdout.write(v) |
56 <form name='form0' method='post'> | 56 end |
57 % <input name='cmd' size="80" autofocus> | 57 %></pre> |
58 <input type="submit" value="run" textcolor="white" bgcolor="#337ab7"> | 58 <form name='form0' method='post'> |
59 <input type="submit" name="clear" value="clear" textcolor="white" bgcolor="#337ab7"> | 59 % <input name='cmd' size="80" autofocus> |
60 </form> | 60 <input type="submit" value="run" textcolor="white" bgcolor="#337ab7"> |
61 </div> | 61 <input type="submit" name="clear" value="clear" textcolor="white" bgcolor="#337ab7"> |
62 <% end; | 62 </form> |
63 } | 63 </div> |
64 | 64 <% Html.simply_html_body_bottom() %> |
65 </body> | |
66 </html> | |
67 <% | |
65 end | 68 end |