comparison website/src/pil.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() %>
24 <% Html.simply_html_body_bottom() %> 23 <% Html.simply_html_body_bottom() %>
25 </body> 24 </body>
26 </html> 25 </html>
27 <% 26 <%
28 end 27 end
29
30 return M