Mercurial Hosting > luan
diff web/src/luan/modules/web/web_run.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 |
line wrap: on
line diff
--- a/web/src/luan/modules/web/web_run.luan Tue Dec 02 06:17:45 2014 +0000 +++ b/web/src/luan/modules/web/web_run.luan Wed Dec 03 02:26:19 2014 +0000 @@ -18,17 +18,31 @@ end end +local function basic_style() %> + body {font-family:'Arial',sans-serif;font-size:16px;text-align:center} + input,textarea {padding:.5em;border-radius:10px;border:1px solid #ccc;font-size:16px;display:block} + textarea {width:50%;margin:0 auto} + input.btn {background:#3B619D;color:#FFF;padding:.5em 2em;font-size:20px;margin:.5em auto} + h1 {font-weight:bold;font-size: 20px} + p {margin:1em 0 .2em} +<% end + local function form() %> -<html> -<body> -<form method="post"> -<input type="hidden" name="content_type" value="text/plain" /> -<input type="submit" value="Execute Luan code below"> -<br /> -<textarea name="code" rows="30" cols="90" wrap="off"> -</textarea> -</form> -</body> +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Run Luan Code</title> + <style><% basic_style() %></style> + </head> + <body> + <h1>Run Luan Code</h1> + <form name="form0" method="post"> + <input type="hidden" name="content_type" value="text/plain" /> + <textarea name="code" rows="20" cols="90" wrap="off"></textarea> + <input type="submit" class="btn" value="Execute Luan Code"/> + </form> + <script>document.form0.code.focus();</script> + </body> </html> <% end