feat: Updates to network article.
All checks were successful
CI / release (push) Successful in 6m9s

This commit is contained in:
2025-04-08 13:36:39 -04:00
parent d0383b0d4e
commit a53e808aec
10 changed files with 122 additions and 50 deletions

View File

@@ -20,7 +20,7 @@ func baseLayout(
return [
.documentType("html"),
html(lang: "en-US") {
generateHeader(pageTitle, extraHeader)
generateHead(pageTitle, extraHeader)
body(class: "text-white text-lg pb-5 font-avenir \(section.rawValue)") {
siteHeader(section)
@@ -80,19 +80,16 @@ private func footer(_ rssLink: String) -> Node {
"("
%a(
class: "[&:hover]:border-b border-green-400",
href: "https://github.com/m-housh/mhoush.com",
href: "https://git.housh.dev/homelab/docs",
rel: "nofollow",
target: "_blank"
) { "source" }
%")."
}
script(src: "https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js")
script(src: "https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/keep-markup/prism-keep-markup.min.js")
script(src: "https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js")
}
}
private func generateHeader(_ pageTitle: String, _ extraHeader: NodeConvertible) -> Node {
private func generateHead(_ pageTitle: String, _ extraHeader: NodeConvertible) -> Node {
head {
meta(charset: "utf-8")
meta(content: "#0e1112", name: "theme-color", customAttributes: ["media": "(prefers-color-scheme: dark)"])
@@ -128,8 +125,6 @@ private func generateHeader(_ pageTitle: String, _ extraHeader: NodeConvertible)
link(href: "/static/output.css", rel: "stylesheet")
link(href: "/articles/feed.xml", rel: "alternate", title: SiteMetadata.name, type: "application/rss+xml")
extraHeader
// script(src: "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js")
//
Node.raw("""
<script src="/pagefind/pagefind-ui.js"></script>
<link href="/pagefind/pagefind-ui.css" rel="stylesheet">

View File

@@ -46,12 +46,15 @@ extension HomeLink: NodeConvertible {
}
private func internalLink() -> Node {
a(class: "bg-orange-400 border-2 border-green-600 p-4 rounded-lg [&:hover]:bg-orange-500", href: href) {
a(
class: "bg-orange-400 border-2 border-green-600 p-4 rounded-lg [&:hover]:bg-orange-500",
href: href
) {
div(class: "flex text-3xl") {
i(class: "mt-1", customAttributes: ["data-lucide": icon])
p(class: "ps-2") { title }
span(class: "ps-2") { title }
}
p(class: "text-sm") { description }
span(class: "text-sm") { description }
}
}
@@ -64,9 +67,9 @@ extension HomeLink: NodeConvertible {
) {
div(class: "flex text-3xl") {
i(class: "mt-1", customAttributes: ["data-lucide": icon])
p(class: "ps-2") { title }
span(class: "ps-2") { title }
}
p(class: "text-sm") { description }
span(class: "text-sm") { description }
}
}
}

View File

@@ -37,14 +37,7 @@ func renderHome(body: String) -> Node {
"Articles",
icon: "newspaper",
href: "/articles/",
description: "Click here to view articles."
)
HomeLink.external(
"Service Monitor",
icon: "heart-pulse",
href: "https://uptime.housh.dev/status/housh-dev",
description: "Click here to view the service status."
description: "Click here to view all articles."
)
HomeLink.external(
@@ -55,17 +48,10 @@ func renderHome(body: String) -> Node {
)
HomeLink.external(
"Excalidraw",
icon: "pen-tool",
href: "https://draw.housh.dev",
description: "A drawing utility."
)
HomeLink.external(
"Gitea",
icon: "git-branch",
href: "https://git.housh.dev/explore/repos",
description: "Explore source code."
"Service Monitor",
icon: "heart-pulse",
href: "https://uptime.housh.dev/status/housh-dev",
description: "Server and services uptime status page."
)
HomeLink.external(
@@ -75,12 +61,33 @@ func renderHome(body: String) -> Node {
description: "Network management."
)
HomeLink.external(
"Excalidraw",
icon: "pen-tool",
href: "https://draw.housh.dev",
description: "A drawing utility that runs locally in your browser."
)
HomeLink.external(
"Gitea",
icon: "git-branch",
href: "https://git.housh.dev/explore/repos",
description: "Explore source code."
)
HomeLink.external(
"Legacy Purchase Orders",
icon: "file-archive",
href: "https://legach-po.housh.dev",
description: "Legacy purchase order application (pre-2025)."
)
HomeLink.external(
"HVAC Toolbox",
icon: "hammer",
href: "https://hvac-toolbox.com",
description: "A collection of HVAC calculators."
)
}
}
script(src: "https://unpkg.com/lucide@latest")