Mercurial Hosting > luan
comparison website/src/index.html.luan @ 505:7bc63886d4f2
web page modules now return a function
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Thu, 21 May 2015 01:45:49 -0600 |
| parents | 92c3d22745b8 |
| children | 7cc9d4a53d3b |
comparison
equal
deleted
inserted
replaced
| 504:dbdf4b8193a8 | 505:7bc63886d4f2 |
|---|---|
| 1 local Io = require "luan:Io" | 1 local Io = require "luan:Io" |
| 2 local Html = require "luan:Html" | 2 local Html = require "luan:Html" |
| 3 local Http = require "luan:http/Http" | 3 local Http = require "luan:http/Http" |
| 4 | 4 |
| 5 local M = {} | |
| 6 | 5 |
| 7 function M.respond() | 6 return function() |
| 8 Io.stdout = Http.response.text_writer() | 7 Io.stdout = Http.response.text_writer() |
| 9 %> | 8 %> |
| 10 <html> | 9 <html> |
| 11 <head> | 10 <head> |
| 12 <% Html.simply_html_head() %> | 11 <% Html.simply_html_head() %> |
| 30 <% Html.simply_html_body_bottom() %> | 29 <% Html.simply_html_body_bottom() %> |
| 31 </body> | 30 </body> |
| 32 </html> | 31 </html> |
| 33 <% | 32 <% |
| 34 end | 33 end |
| 35 | |
| 36 return M |
