Mercurial Hosting > chat
view src/lib/Shared.luan @ 0:fddd11ae516c
start
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 23 Oct 2024 13:13:07 -0600 |
parents | |
children | b116b6ef07bf |
line wrap: on
line source
local Luan = require "luan:Luan.luan" local error = Luan.error local ipairs = Luan.ipairs or error() local Shared = {} function Shared.head() %> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> @import "/site.css"; </style> <% end local function header(crumbs) %> <div header> <a href="/">Reactionary Chat</a> <% for _, crumb in ipairs(crumbs or {}) do %> / <%=crumb%> <% end %> </div> <% end Shared.header = header function Shared.private_header() header{ [[<a href="/private/">private</a>]] [[<a href="/private/tools/">tools</a>]] } end return Shared