annotate src/config.html.luan @ 24:fccbe5554fcc

tinymce work
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 19 Jul 2022 22:07:02 -0600
parents fc2383eb48a9
children
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
2
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents: 1
diff changeset
35 <p>Configuration in <a href="http://www.luan.software/">Luan</a></p>
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents: 1
diff changeset
36 <p><textarea><%= html_encode(Config.text) %></textarea></p>
fc2383eb48a9 set config
Franklin Schmidt <fschmidt@gmail.com>
parents: 1
diff changeset
37 <p><a href="/private/admin/config.html">Edit configuration</a></p>
1
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
38 </div>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
39 <% footer() %>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
40 </body>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
41 </html>
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
42 <%
7c64173643c8 start config
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
43 end