comparison 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
comparison
equal deleted inserted replaced
0:8f4df159f06b 1:2776f06236b4
1 local Luan = require "luan:Luan.luan"
2 local error = Luan.error
3 local Io = require "luan:Io.luan"
4 local Http = require "luan:http/Http.luan"
5 local Utils = require "site:/lib/Utils.luan"
6 local base_url = Utils.base_url or error()
7 local Shared = require "site:/lib/Shared.luan"
8 local head = Shared.head or error()
9 local body_header = Shared.body_header or error()
10 local footer = Shared.footer or error()
11 local User = require "site:/lib/User.luan"
12
13
14 return function()
15 local user = User.current_required()
16 if user==nil then return end
17 local url = base_url().."/"..user.name
18 Io.stdout = Http.response.text_writer()
19 %>
20 <!doctype html>
21 <html lang="en">
22 <head>
23 <% head() %>
24 <title>Link My Style</title>
25 <style>
26 div[body] {
27 max-width: 700px;
28 margin-left: auto;
29 margin-right: auto;
30 padding-left: 20px;
31 padding-right: 20px;
32 }
33 </style>
34 </head>
35 <body>
36 <div full>
37 <% body_header() %>
38 <div body>
39 <h1>Source Code</h1>
40
41 <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>
42
43 <p>&nbsp;</p>
44 </div>
45 <% footer() %>
46 </div>
47 </body>
48 </html>
49 <%
50 end