semi-functinal statae
This commit is contained in:
@@ -18,6 +18,7 @@ function M.site_builder(header, footer)
|
|||||||
local self = {
|
local self = {
|
||||||
version = site_config.version or "",
|
version = site_config.version or "",
|
||||||
title = site_config.title or "Document",
|
title = site_config.title or "Document",
|
||||||
|
copyright = site_config.copyright or "© The Copyright Holder",
|
||||||
header = header or [[
|
header = header or [[
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@@ -45,6 +46,10 @@ h1,h2,h3,h4,h5,h6{
|
|||||||
margin:0 0 12px 0
|
margin:0 0 12px 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
summary {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
details {
|
details {
|
||||||
background:#17191b;
|
background:#17191b;
|
||||||
border:1px solid rgba(255,255,255,.06);
|
border:1px solid rgba(255,255,255,.06);
|
||||||
@@ -72,8 +77,12 @@ details summary::before {
|
|||||||
color:#68a6ff;
|
color:#68a6ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
details[open] summary::before {
|
summary::after {
|
||||||
transform:rotate(90deg);
|
content: "Expand description";
|
||||||
|
}
|
||||||
|
|
||||||
|
details[open] summary::after {
|
||||||
|
content: "Close description";
|
||||||
}
|
}
|
||||||
|
|
||||||
details > *:not(summary) {
|
details > *:not(summary) {
|
||||||
@@ -193,12 +202,32 @@ tr:hover{background:rgba(255,255,255,.02)}
|
|||||||
|
|
||||||
strong,b{font-weight:600;color:#f0f6f8}
|
strong,b{font-weight:600;color:#f0f6f8}
|
||||||
em,i{font-style:italic}
|
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>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
]],
|
]],
|
||||||
footer = footer or [[
|
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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -442,7 +471,8 @@ end
|
|||||||
|
|
||||||
function M:build()
|
function M:build()
|
||||||
local header = self.header:gsub("{{TITLE}}", self.title or "Document")
|
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
|
end
|
||||||
|
|
||||||
M.__tostring = function(self)
|
M.__tostring = function(self)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ local docs = {}
|
|||||||
local template = [[
|
local template = [[
|
||||||
<span class="highlight">%s</span>
|
<span class="highlight">%s</span>
|
||||||
<details>
|
<details>
|
||||||
<summary>Expand description</summary>
|
<summary></summary>
|
||||||
<span class="highlight">%s</span>
|
<span class="highlight">%s</span>
|
||||||
<br>
|
<br>
|
||||||
%s
|
%s
|
||||||
|
|||||||
Reference in New Issue
Block a user