diff src/source.html.luan @ 1:2776f06236b4

add source.html
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 11 Jul 2025 21:17:19 -0600
parents src/job.html.luan@8f4df159f06b
children e32e4120dc70
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/source.html.luan	Fri Jul 11 21:17:19 2025 -0600
@@ -0,0 +1,50 @@
+local Luan = require "luan:Luan.luan"
+local error = Luan.error
+local Io = require "luan:Io.luan"
+local Http = require "luan:http/Http.luan"
+local Utils = require "site:/lib/Utils.luan"
+local base_url = Utils.base_url or error()
+local Shared = require "site:/lib/Shared.luan"
+local head = Shared.head or error()
+local body_header = Shared.body_header or error()
+local footer = Shared.footer or error()
+local User = require "site:/lib/User.luan"
+
+
+return function()
+	local user = User.current_required()
+	if user==nil then return end
+	local url = base_url().."/"..user.name
+	Io.stdout = Http.response.text_writer()
+%>
+<!doctype html>
+<html lang="en">
+	<head>
+<%		head() %>
+		<title>Link My Style</title>
+		<style>
+			div[body] {
+				max-width: 700px;
+				margin-left: auto;
+				margin-right: auto;
+				padding-left: 20px;
+				padding-right: 20px;
+			}
+		</style>
+	</head>
+	<body>
+	<div full>
+<%		body_header() %>
+		<div body>
+			<h1>Source Code</h1>
+
+			<p>Link My Style is written in <a href="https://www.luan.software/">Luan</a> and uses <a href="https://dad.reactionary.software/">Reactionary Drag and Drop</a>.  Here is <a href="https://hg.reactionary.software/repo/linkmystyle/">the source code</a>.</p>
+
+			<p>&nbsp;</p>
+		</div>
+<%		footer() %>
+	</div>
+	</body>
+</html>
+<%
+end