Mercurial Hosting > chat
diff src/private/tools/config.html.luan @ 101:0fc454beff08 default tip
use Config.luan
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 30 Jun 2025 23:49:10 -0600 |
parents | 0e3b22ece2fc |
children |
line wrap: on
line diff
--- a/src/private/tools/config.html.luan Mon Jun 30 22:32:26 2025 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -local Luan = require "luan:Luan.luan" -local error = Luan.error -local stringify = Luan.stringify 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.private_header or error() -local config = Shared.config or error() - - -return function() - Io.stdout = Http.response.text_writer() -%> -<!doctype html> -<html lang="en"> - <head> -<% head() %> - <style> - [content] { - max-width: 90%; - width: 700px; - padding: 0; - } - textarea { - width: 100%; - height: 20em; - } - </style> - </head> - <body> -<% header() %> - <div content> - <h1>Configure</h1> - <form method=post action="save_config.txt"> - <p> - <textarea name=config autofocus><%= stringify(config).."\n" %></textarea> - </p> - <p> - <input type=submit value="Update"> - </p> - </form> - </div> - </body> -</html> -<% -end