semi-functinal statae
This commit is contained in:
@@ -18,6 +18,7 @@ function M.site_builder(header, footer)
|
||||
local self = {
|
||||
version = site_config.version or "",
|
||||
title = site_config.title or "Document",
|
||||
copyright = site_config.copyright or "© The Copyright Holder",
|
||||
header = header or [[
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@@ -45,6 +46,10 @@ h1,h2,h3,h4,h5,h6{
|
||||
margin:0 0 12px 0
|
||||
}
|
||||
|
||||
summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
details {
|
||||
background:#17191b;
|
||||
border:1px solid rgba(255,255,255,.06);
|
||||
@@ -72,8 +77,12 @@ details summary::before {
|
||||
color:#68a6ff;
|
||||
}
|
||||
|
||||
details[open] summary::before {
|
||||
transform:rotate(90deg);
|
||||
summary::after {
|
||||
content: "Expand description";
|
||||
}
|
||||
|
||||
details[open] summary::after {
|
||||
content: "Close description";
|
||||
}
|
||||
|
||||
details > *:not(summary) {
|
||||
@@ -193,12 +202,32 @@ tr:hover{background:rgba(255,255,255,.02)}
|
||||
|
||||
strong,b{font-weight:600;color:#f0f6f8}
|
||||
em,i{font-style:italic}
|
||||
|
||||
.footer {
|
||||
background: #1a1c20;
|
||||
margin-top: 36px;
|
||||
padding: 18px 0;
|
||||
border-top: 1px solid rgba(255,255,255,.1);
|
||||
font-size: 14px;
|
||||
color: #d4dde3;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
]],
|
||||
footer = footer or [[
|
||||
<footer class="footer">
|
||||
<a href="https://git.vxserver.dev/fSD/fes" target="_blank">Fes Powered</a>
|
||||
<a href="https://www.lua.org/" target="_blank">Lua Powered</a>
|
||||
<a href="https://git.vxserver.dev/fSD/fes/src/branch/master/COPYING" target="_blank">ISC Licensed</a>
|
||||
<p>{{COPYRIGHT}}</p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -442,7 +471,8 @@ end
|
||||
|
||||
function M:build()
|
||||
local header = self.header:gsub("{{TITLE}}", self.title or "Document")
|
||||
return header .. table.concat(self.parts) .. self.footer
|
||||
local footer = self.footer:gsub("{{COPYRIGHT}}", self.copyright or "© The Copyright Holder")
|
||||
return header .. table.concat(self.parts) .. footer
|
||||
end
|
||||
|
||||
M.__tostring = function(self)
|
||||
|
||||
@@ -21,7 +21,7 @@ local docs = {}
|
||||
local template = [[
|
||||
<span class="highlight">%s</span>
|
||||
<details>
|
||||
<summary>Expand description</summary>
|
||||
<summary></summary>
|
||||
<span class="highlight">%s</span>
|
||||
<br>
|
||||
%s
|
||||
|
||||
Reference in New Issue
Block a user