view src/config.html.luan @ 2:fc2383eb48a9

set config
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 16 Jun 2022 20:52:24 -0600
parents 7c64173643c8
children
line wrap: on
line source

local Luan = require "luan:Luan.luan"
local error = Luan.error
local Html = require "luan:Html.luan"
local html_encode = Html.encode or error()
local Io = require "luan:Io.luan"
local Http = require "luan:http/Http.luan"
local Shared = require "site:/lib/Shared.luan"
local head = Shared.head or error()
local header = Shared.header or error()
local footer = Shared.footer or error()
local Forum = require "site:/lib/Forum.luan"
local Config = require "site:/lib/Config.luan"


return function()
	Io.stdout = Http.response.text_writer()
%>
<!doctype html>
<html>
	<head>
<%		head() %>
		<title><%=Forum.title%> - Configuration</title>
		<style>
			textarea {
				width: 90%;
				height: 20em;
			}
		</style>
	</head>
	<body>
<%		header() %>
		<div content>
			<h1>Configuration</h2>

			<p>Configuration in <a href="http://www.luan.software/">Luan</a></p>
			<p><textarea><%= html_encode(Config.text) %></textarea></p>
			<p><a href="/private/admin/config.html">Edit configuration</a></p>
		</div>
<%		footer() %>
	</body>
</html>
<%
end