feat: Adds initial icons / favicon
This commit is contained in:
@@ -23,6 +23,22 @@ public struct MainPage<Inner: HTML>: SendableHTMLDocument where Inner: Sendable
|
||||
script(.src("/js/main.js")) {}
|
||||
link(.rel(.stylesheet), .href("/css/output.css"))
|
||||
link(.rel(.icon), .href("/images/favicon.ico"), .custom(name: "type", value: "image/x-icon"))
|
||||
link(
|
||||
.rel(.icon),
|
||||
.href("/images/favicon-32x32.png"),
|
||||
.init(name: "type", value: "image/png")
|
||||
)
|
||||
link(
|
||||
.rel(.icon),
|
||||
.href("/images/favicon-16x16.png"),
|
||||
.init(name: "type", value: "image/png")
|
||||
)
|
||||
link(
|
||||
.rel(.init(rawValue: "apple-touch-icon")),
|
||||
.init(name: "sizes", value: "180x180"),
|
||||
.href("/images/apple-touch-icon.png")
|
||||
)
|
||||
link(.rel(.init(rawValue: "manifest")), .href("/site.webmanifest"))
|
||||
script(
|
||||
.src("https://unpkg.com/htmx-remove@latest"),
|
||||
.crossorigin(.anonymous),
|
||||
|
||||
@@ -6,8 +6,14 @@ struct Navbar: HTML, Sendable {
|
||||
let sidebarToggle: Bool
|
||||
|
||||
var body: some HTML<HTMLTag.nav> {
|
||||
nav(.class("navbar w-full bg-base-300 text-base-content shadow-sm mb-4")) {
|
||||
div(.class("flex-1 space-x-4 items-center")) {
|
||||
nav(
|
||||
.class(
|
||||
"""
|
||||
navbar w-full bg-base-300 text-base-content shadow-sm mb-4
|
||||
"""
|
||||
)
|
||||
) {
|
||||
div(.class("flex flex-1 space-x-4 items-center")) {
|
||||
if sidebarToggle {
|
||||
Tooltip("Open sidebar", position: .right) {
|
||||
label(
|
||||
@@ -20,12 +26,16 @@ struct Navbar: HTML, Sendable {
|
||||
.navButton()
|
||||
}
|
||||
}
|
||||
|
||||
Tooltip("Home", position: .right) {
|
||||
a(
|
||||
.class("w-fit text-xl py-2 px-4"),
|
||||
.class("flex w-fit h-fit text-xl items-end px-4 py-2"),
|
||||
.href(route: .project(.index))
|
||||
) {
|
||||
"Manual-D"
|
||||
img(
|
||||
.src("/images/mand_logo_sm.webp"),
|
||||
)
|
||||
span { "Manual-D" }
|
||||
}
|
||||
.navButton()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user