Mercurial Hosting > luan
changeset 560:2f39468680be
remove SimplyHTML from shell
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 23 Jun 2015 07:57:10 -0600 |
parents | bfb2c30324c0 |
children | 363d07e26549 |
files | http/src/luan/modules/http/Shell_mod.luan http/src/luan/modules/http/run.luan |
diffstat | 2 files changed, 73 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
diff -r bfb2c30324c0 -r 2f39468680be http/src/luan/modules/http/Shell_mod.luan --- a/http/src/luan/modules/http/Shell_mod.luan Tue Jun 23 03:25:43 2015 -0600 +++ b/http/src/luan/modules/http/Shell_mod.luan Tue Jun 23 07:57:10 2015 -0600 @@ -6,7 +6,7 @@ local Io = require "luan:Io" local print = Io.print or error() local Http = require "luan:http/Http" -local Html = require "luan:Html" + local M = {} @@ -43,25 +43,51 @@ %> <html> <head> - <% Html.simply_html_head() %> <title>Luan Shell</title> + <style> + body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + margin: 2em 5% 0 5%; + } + pre { + font: inherit; + } + input[type="text"] { + font: inherit; + padding: .5em .8em; + border-radius: 8px; + border-style: groove; + } + input[type="text"]:focus { + border-color: #66afe9; + outline: none; + } + input[type="submit"] { + color: white; + background: #337ab7; + border-color: #337ab7; + font: inherit; + padding: .5em; + border-radius: 4px; + } + input[type="submit"]:hover { + background: #236aa7 !important; + } + </style> </head> <body> - <div container> - <h3>Luan Shell</h3> - <p>This is a command shell. Enter commands below.</p> - <pre><% - for _,v in ipairs(history) do - Io.stdout.write(v) - end - %></pre> - <form name='form0' method='post'> - % <input name='cmd' size="80" autofocus> - <input type="submit" value="run" textcolor="white" bgcolor="#337ab7"> - <input type="submit" name="clear" value="clear" textcolor="white" bgcolor="#337ab7"> - </form> - </div> - <% Html.simply_html_body_bottom() %> + <h2>Luan Shell</h2> + <p>This is a command shell. Enter commands below.</p> + <pre><% + for _,v in ipairs(history) do + Io.stdout.write(v) + end + %></pre> + <form name='form0' method='post'> + % <input type="text" name='cmd' size="80" autofocus> + <input type="submit" value="run"> + <input type="submit" name="clear" value="clear"> + </form> </body> </html> <%
diff -r bfb2c30324c0 -r 2f39468680be http/src/luan/modules/http/run.luan --- a/http/src/luan/modules/http/run.luan Tue Jun 23 03:25:43 2015 -0600 +++ b/http/src/luan/modules/http/run.luan Tue Jun 23 07:57:10 2015 -0600 @@ -28,37 +28,43 @@ <head> <title>Run Luan Code</title> <style> - input[type="submit"]:hover { background: #236aa7 !important } + body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + text-align: center; + margin-top: 1em; + } + h2 { + margin-bottom: .3em; + font-weight: normal; + } + textarea { + font: inherit; + border-radius: 4px; + padding: .5em .8em; + } + input[type="submit"] { + margin-top: .3em; + color: white; + background: #337ab7; + border-color: #337ab7; + font: inherit; + padding: .5em; + border-radius: 4px; + } + input[type="submit"]:hover { + background: #236aa7 !important; + } </style> </head> - <body style=' - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - text-align: center; - margin-top: 1em; - '> - <h2 style=' - margin-bottom: .3em; - font-weight: normal; - '>Run Luan Code</h2> + <body> + <h2>Run Luan Code</h2> <form name="form0" method="post"> <input type="hidden" name="content_type" value="text/plain" /> <div> - <textarea name="code" rows="20" cols="90" wrap="off" autofocus style=' - font: inherit; - border-radius: 4px; - padding: .5em .8em; - '></textarea> + <textarea name="code" rows="20" cols="90" wrap="off" autofocus></textarea> </div> <div> - <input type="submit" value="Execute Luan Code" style=' - margin-top: .3em; - color: white; - background: #337ab7; - border-color: #337ab7; - font: inherit; - padding: .5em; - border-radius: 4px; - '/> + <input type="submit" value="Execute Luan Code"/> </div> </form> </body>