Mercurial Hosting > luan
comparison web/src/luan/modules/web/web_shell.luan @ 286:91be4027b2a8
Improve HTML of some tools.
git-svn-id: https://luan-java.googlecode.com/svn/trunk@287 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | hugo.tech@gmail.com <hugo.tech@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Wed, 03 Dec 2014 02:26:19 +0000 |
parents | 582e8db4cdb6 |
children | 5652cdea25f5 |
comparison
equal
deleted
inserted
replaced
285:582e8db4cdb6 | 286:91be4027b2a8 |
---|---|
31 end | 31 end |
32 end | 32 end |
33 | 33 |
34 local write = Http.response.text_writer().write | 34 local write = Http.response.text_writer().write |
35 write(%> | 35 write(%> |
36 <html> | 36 <!DOCTYPE html> |
37 <title>Luan Shell</title> | 37 <html lang="en"> |
38 <head> | |
39 <title>Luan Shell</title> | |
40 <style> | |
41 body {font-family:'Arial',sans-serif;font-size:16px} | |
42 input {padding:.5em;border-radius:10px;border:1px solid #ccc;font-size:16px} | |
43 input.btn {background:#3B619D;color:#FFF;padding:.3em 0;font-size:20px;min-width:4em;} | |
44 h1 {font-weight:bold;font-size: 20px} | |
45 p {margin:1em 0 .2em} | |
46 </style> | |
47 </head> | |
38 <body> | 48 <body> |
39 <p>This is a command shell. Enter commands below. | 49 <h1>Luan Shell</h1> |
50 <p>This is a command shell. Enter commands below.</p> | |
40 <pre><%) | 51 <pre><%) |
41 for _,v in ipairs(history) do | 52 for _,v in ipairs(history) do |
42 write(v) | 53 write(v) |
43 end | 54 end |
44 write(%></pre> | 55 write(%></pre> |
45 <form name='theForm' method='post'> | 56 <form name='form0' method='post'> |
46 % <input name='cmd' size=60> | 57 % <input name='cmd' size="60"> |
47 <input type=submit value=run> | 58 <input type="submit" class="btn" value="run"> |
48 <input type=submit name=clear value=clear> | 59 <input type="submit" class="btn" name="clear" value="clear"> |
49 </form> | 60 </form> |
50 | 61 |
51 <script>document.theForm.cmd.focus();</script> | 62 <script>document.form0.cmd.focus();</script> |
52 | |
53 <p/> | |
54 </body> | 63 </body> |
55 </html> | 64 </html> |
56 <%) | 65 <%) |
57 | 66 |
58 end | 67 end |