diff --git a/hinnen/Sources/Elements/Button.swift b/hinnen/Sources/Elements/Button.swift new file mode 100644 index 0000000..45bc83e --- /dev/null +++ b/hinnen/Sources/Elements/Button.swift @@ -0,0 +1,25 @@ +import Ignite + +struct Button: HTML { + private var name: String + private var link: String + let buttonWidth = 200 + let buttonHeight = 70 + + + init(name: String = "Hinnen", link: String = "Underground") { + self.name = name + self.link = link + } + + var body: some HTML { + Link(name, target: link) + .linkStyle(.button) + .background(.blue) + .border(Color.black, width: 0) + .font(.custom("Futura", size: .em(1))) + .frame(width: buttonWidth, height: buttonHeight) + } + +} + diff --git a/hinnen/Sources/Elements/Mastodon.swift b/hinnen/Sources/Elements/Mastodon.swift index db6e32e..e05aeb4 100644 --- a/hinnen/Sources/Elements/Mastodon.swift +++ b/hinnen/Sources/Elements/Mastodon.swift @@ -9,15 +9,16 @@ import Ignite struct Mastodon: HTML { var body: some HTML { - // ── Mastodon / rel=me links (hidden, for verification) ──────────────── + // ── Mastodon / rel=me links (hidden, for verification) ──────────────── Link("", target: "https://twit.social/@roryh") .relationship(.me) - + .hidden(.responsive(true)) Link("", target: "https://mograph.social/@Roryhinnen") .relationship(.me) - + .hidden(.responsive(true)) Link("", target: "https://cinematheque.social/@Rory") .relationship(.me) + .hidden(.responsive(true)) } } diff --git a/hinnen/Sources/Pages/.swift b/hinnen/Sources/Pages/.swift deleted file mode 100644 index b33bc60..0000000 --- a/hinnen/Sources/Pages/.swift +++ /dev/null @@ -1,7 +0,0 @@ -// -// Battlefleet.swift -// IgniteStarter -// -// Created by Rory on 5/3/26. -// - diff --git a/hinnen/Sources/Pages/Battlefleet.swift b/hinnen/Sources/Pages/Battlefleet.swift index db05c67..c5a94de 100644 --- a/hinnen/Sources/Pages/Battlefleet.swift +++ b/hinnen/Sources/Pages/Battlefleet.swift @@ -12,7 +12,7 @@ struct Battlefleet: StaticPage { VStack { Logo(barTitle: String(title.split(separator: " ").first ?? ""), underTitle: "Sector Scarus") .horizontalAlignment(.center) - Link("Battlefleet Gothic Remastered Digital Rules", target: "BattlefleetGothicDigitalRemaster.epub") + Link("Battlefleet Gothic Remastered Digital Rules", target: "epubs/BattlefleetGothicDigitalRemaster.epub") } } } diff --git a/hinnen/Sources/Pages/DungeonMaster.swift b/hinnen/Sources/Pages/DungeonMaster.swift deleted file mode 100644 index 2ad56da..0000000 --- a/hinnen/Sources/Pages/DungeonMaster.swift +++ /dev/null @@ -1,17 +0,0 @@ -import Ignite - -struct DungeonMaster: StaticPage { - var path = "/dungeonmaster" - let title: String - - init() { - self.title = "Dungeon Master" - } - - var body: some HTML { - VStack { - Logo(barTitle: String(title.split(separator: " ").first ?? ""), underTitle: String(title.split(separator: " ").last ?? "")) - .horizontalAlignment(.center) - } - } -} diff --git a/hinnen/Sources/Pages/Home.swift b/hinnen/Sources/Pages/Home.swift index 7383198..fb11a54 100644 --- a/hinnen/Sources/Pages/Home.swift +++ b/hinnen/Sources/Pages/Home.swift @@ -2,52 +2,42 @@ import Ignite struct Home: StaticPage { var title = "Hinnen Underground" + let buttonWidth = 200 + let buttonHeight = 70 var body: some HTML { VStack{ Logo() .horizontalAlignment(.center) - Grid(alignment: .center) { - Link("Rory", target: "https://rory.hinnen.us") - .linkStyle(.button) + Grid(alignment: .center, spacing: 5) { + Button(name: "Rory", link: "https://rory.hinnen.us") .width(4) - Link("Robin", target: "https://robin.hinnen.us") - .linkStyle(.button) + Button(name: "Robin", link: "https://robin.hinnen.us") .width(4) - Link("Robin's Cancer Blog", target: "https://bab.hinnen.us") - .linkStyle(.button) + Button(name: "Robin's Cancer Blog", link: "https://bab.hinnen.us") .width(4) - Link("MGA", target: "mga/") - .linkStyle(.button) + Button(name: "MGA", link: "/mga/") .width(4) - Link("Drive In", target: "drive-in/") - .linkStyle(.button) + Button(name: "Drive In", link: "/drive-in/") .width(4) - Link("Minecraft", target: "minecraft/") - .linkStyle(.button) + Button(name: "Minecraft", link: "https://treznzelore.hinnen.us") .width(4) - Link("Legends of Dying Mars", target: "lods-dying-mars/") - .linkStyle(.button) + Button(name: "Legends of Dying Mars", link: "/dying-mars/") .width(4) - Link("X-Wing Rules", target: "xwing/") - .linkStyle(.button) + Button(name: "X-Wing Rules", link: "/xwing/") .width(4) - Link("Adventures in Modern Coding", target: "modern-coding/") - .linkStyle(.button) + Button(name: "Adventures in Modern Coding", link: "/modern-coding/") .width(4) - Link("The Library", target: "library/") - .linkStyle(.button) + Button(name: "The Library", link: "/library/") .width(4) - Link("Archeological remains", target: "archeological-remains/") - .linkStyle(.button) + Button(name: "Archeological remains", link: "/archeological-remains/") .width(4) - Link("Battlefleet: Sector Scarus", target: Battlefleet()) - .linkStyle(.button) + Button(name: "Battlefleet: Sector Scarus", link: "/battlefleet/") .width(4) } + Mastodon() } - .frame(maxWidth: .percent(80%)) .horizontalAlignment(.center) - Mastodon() + } } diff --git a/hinnen/Sources/Pages/Library.swift b/hinnen/Sources/Pages/Library.swift new file mode 100644 index 0000000..59386a0 --- /dev/null +++ b/hinnen/Sources/Pages/Library.swift @@ -0,0 +1,36 @@ +// +// Library.swift +// IgniteStarter +// +// Created by Rory on 5/5/26. +// + +import Ignite + +struct Library: StaticPage { + var path = "/library" + let title: String + + init() { + self.title = "The Library" + } + + var body: some HTML { + VStack { + Logo(barTitle: title, underTitle: "") + .horizontalAlignment(.center) + Text(""" +I love reading. + +I really don’t get enough time to do that anymore. I’m in the process of creating e-books of some of my favorites +""") + Group{ + Text(""" + Edgar Rice Burrough’s Barsoom Series + Burroughs wrote these in the early part of the last century, and a they can be challenging to modern readers, both for the writing style and the content. They’re straightforward action, mostly focused and beating the bad guys and getting the girl, who seems to spend a lot of time not understanding our poor hero’s intentions. +""") + Link("Battlefleet Gothic Remastered Digital Rules", target: "epubs/BattlefleetGothicDigitalRemaster.epub") + } + } + } +} diff --git a/hinnen/Sources/Site.swift b/hinnen/Sources/Site.swift index 3081cdd..16930b8 100644 --- a/hinnen/Sources/Site.swift +++ b/hinnen/Sources/Site.swift @@ -30,10 +30,8 @@ struct Hinnen: Site { var favicon: URL? { URL(static: "/favicon/favicon.ico") } - var pages: [any StaticPage] { - return [ - Battlefleet(), - DungeonMaster() - ] + var staticPages: [any StaticPage] { + Battlefleet() + Library() } }