pre refactor
This commit is contained in:
@@ -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
19
core/console.lua
Normal 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
|
||||
@@ -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 "©"
|
||||
end
|
||||
|
||||
function M.highlight(str)
|
||||
return '<span class="highlight">' .. str .. "</span>"
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user