Mercurial Hosting > luan
comparison website/src/docs.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 local Shared = require "site:/Shared" | 4 local Shared = require "site:/Shared" |
5 | 5 |
6 local M = {} | |
7 | 6 |
8 function M.respond() | 7 return function() |
9 Io.stdout = Http.response.text_writer() | 8 Io.stdout = Http.response.text_writer() |
10 %> | 9 %> |
11 <html> | 10 <html> |
12 <head> | 11 <head> |
13 <% Html.simply_html_head() %> | 12 <% Html.simply_html_head() %> |
31 <% Html.simply_html_body_bottom() %> | 30 <% Html.simply_html_body_bottom() %> |
32 </body> | 31 </body> |
33 </html> | 32 </html> |
34 <% | 33 <% |
35 end | 34 end |
36 | |
37 return M |