pre refactor

This commit is contained in:
2025-11-24 15:48:46 -05:00
parent 84b4487d92
commit e2d31aa734
7 changed files with 71 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ local std = require("core.std")
local M = {}
M.__index = M
function M.site_builder(header, footer)
function M.fes(header, footer)
local config = {}
local site_config = {}
@@ -119,6 +119,7 @@ a:hover{text-decoration:underline}
.muted{color:#9aa6b1}
.lead{font-size:15px;margin-top:8px}
.callout{display:block;margin:10px 0}
.small{font-size:13px;color:#9aa6b1;margin-top:6px}
.highlight{font-weight:700;color:#cde7ff}

19
core/console.lua Normal file
View File

@@ -0,0 +1,19 @@
local M = {}
function M.log(fmt, ...)
print(string.format("[%12f] ", os.clock()) .. string.format(fmt, ...))
end
function M.info(fmt, ...)
print("INFO: " .. string.format(fmt, ...))
end
function M.warn(fmt, ...)
print("WARN: " .. string.format(fmt, ...))
end
function M.error(fmt, ...)
print("ERROR: " .. string.format(fmt, ...))
end
return M

View File

@@ -32,6 +32,10 @@ function M.muted(str)
return '<div class="muted">' .. str .. '</div>'
end
function M.callout(str)
return '<div class="callout">' .. str .. '</div>'
end
function M.h1(str)
return "<h1>" .. (str or "") .. "</h1>"
end
@@ -210,4 +214,8 @@ function M.copyright()
return "&#169;"
end
function M.highlight(str)
return '<span class="highlight">' .. str .. "</span>"
end
return M