view src/lib/Shared.luan @ 63:e8122e01e2dd

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 16 Aug 2024 11:00:17 -0400
parents c385a4f75b10
children
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>
			<span breadcrumbs>
				<a href="/">Reactionary Software</a>
<%	for _, crumb in ipairs(crumbs or {}) do %>
				/ <%=crumb%>
<%	end %>
			</span>
			<span>by <a href="https://linkmy.style/fschmidt">fschmidt</a></span>
		</div>
<%
end
Shared.header = header

function Shared.existing_header()
	header{[[<a href="/existing.html">Existing</a>]]}
end

function Shared.needed_header()
	header{[[<a href="/needed.html">Needed</a>]]}
end

return Shared