annotate src/config.html.luan @ 1:7c64173643c8

start config
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 15 Jun 2022 20:59:13 -0600
parents
children fc2383eb48a9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 local Luan = require "luan:Luan.luan"
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 local error = Luan.error
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 local Html = require "luan:Html.luan"
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 local html_encode = Html.encode or error()
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 local Io = require "luan:Io.luan"
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 local Http = require "luan:http/Http.luan"
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 local Shared = require "site:/lib/Shared.luan"
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 local head = Shared.head or error()
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 local header = Shared.header or error()
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 local footer = Shared.footer or error()
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 local Forum = require "site:/lib/Forum.luan"
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 local Config = require "site:/lib/Config.luan"
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 return function()
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 Io.stdout = Http.response.text_writer()
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 %>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18 <!doctype html>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 <html>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20 <head>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21 <% head() %>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22 <title><%=Forum.title%> - Configuration</title>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23 <style>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24 textarea {
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25 width: 90%;
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26 height: 20em;
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27 }
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
28 </style>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
29 </head>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
30 <body>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
31 <% header() %>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
32 <div content>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
33 <h1>Configuration</h2>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
34
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
35 <textarea><%= html_encode(Config.text) %></textarea>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
36 </div>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
37 <% footer() %>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
38 </body>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
39 </html>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
40 <%
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
41 end