diff --git a/hinnen/Assets/BattlefleetGothicDigitalRemaster.epub b/hinnen/Assets/epubs/BattlefleetGothicDigitalRemaster.epub similarity index 100% rename from hinnen/Assets/BattlefleetGothicDigitalRemaster.epub rename to hinnen/Assets/epubs/BattlefleetGothicDigitalRemaster.epub diff --git a/hinnen/Assets/favicon/favicon.ico b/hinnen/Assets/favicon/favicon.ico new file mode 100644 index 0000000..23c7e12 Binary files /dev/null and b/hinnen/Assets/favicon/favicon.ico differ diff --git a/hinnen/Assets/images/Images.txt b/hinnen/Assets/images/Images.txt deleted file mode 100644 index 5fb2ad6..0000000 --- a/hinnen/Assets/images/Images.txt +++ /dev/null @@ -1 +0,0 @@ -This is the best place to put images for your build, creating subfolders below here as needed. \ No newline at end of file diff --git a/hinnen/Content/Content.txt b/hinnen/Content/Content.txt deleted file mode 100644 index 47aea1c..0000000 --- a/hinnen/Content/Content.txt +++ /dev/null @@ -1,3 +0,0 @@ -If you want Ignite to generate pages based on Markdown files, you should place them in here. You can group your content however, you want – category, year, etc – just by placing them into subfolders of Content. - -The same path (minus "Content") is used to place your rendered Markdown files in the Build folder, but you can also use the "path" YAML front matter to customize this. \ No newline at end of file diff --git a/hinnen/Includes/Includes.txt b/hinnen/Includes/Includes.txt deleted file mode 100644 index 08d3c15..0000000 --- a/hinnen/Includes/Includes.txt +++ /dev/null @@ -1 +0,0 @@ -If you need to import some pre-written HTML, you can place files here then bring them into your project using Include("YourFilename.html"). The Include element automatically looks in this Includes folder. \ No newline at end of file diff --git a/hinnen/Sources/Elements/Logo.swift b/hinnen/Sources/Elements/Logo.swift index 46d2a3e..69ea701 100644 --- a/hinnen/Sources/Elements/Logo.swift +++ b/hinnen/Sources/Elements/Logo.swift @@ -1,8 +1,16 @@ -import Foundation import Ignite struct Logo: HTML { + private var barTitle: String + private var underTitle: String + + init(barTitle: String = "Hinnen", underTitle: String = "Underground") { + self.barTitle = barTitle + self.underTitle = underTitle + } + var body: some HTML { + // ── Logo ────────────────────────────────────────────────────────────── // Simplified Underground logo using ZStack and SwiftUI-like modifiers VStack { @@ -24,7 +32,7 @@ struct Logo: HTML { // Blue bar with "Hinnen" VStack { Spacer() - Text("Hinnen".uppercased()) + Text(barTitle.uppercased()) .foregroundStyle(.white) .font(.custom("Futura", size: 33)) Spacer() @@ -35,7 +43,7 @@ struct Logo: HTML { .horizontalAlignment(.center) } // "Underground" label beneath - Text("Underground".uppercased()) + Text(underTitle.uppercased()) .font(.custom("Futura", size: 25)) .frame(width: 214, alignment: .top) .horizontalAlignment(.center) diff --git a/hinnen/Sources/Elements/Mastodon.swift b/hinnen/Sources/Elements/Mastodon.swift index 87f13f2..db6e32e 100644 --- a/hinnen/Sources/Elements/Mastodon.swift +++ b/hinnen/Sources/Elements/Mastodon.swift @@ -5,12 +5,10 @@ // Created by Rory on 5/5/26. // -import Foundation import Ignite struct Mastodon: HTML { var body: some HTML { - // ── Mastodon / rel=me links (hidden, for verification) ──────────────── Link("", target: "https://twit.social/@roryh") .relationship(.me) diff --git a/hinnen/Sources/Layouts/MainLayout.swift b/hinnen/Sources/Layouts/MainLayout.swift index 21476b8..37c650e 100644 --- a/hinnen/Sources/Layouts/MainLayout.swift +++ b/hinnen/Sources/Layouts/MainLayout.swift @@ -1,4 +1,3 @@ -import Foundation import Ignite struct MainLayout: Layout { diff --git a/hinnen/Sources/Pages/Battlefleet.swift b/hinnen/Sources/Pages/Battlefleet.swift index ecec573..db05c67 100644 --- a/hinnen/Sources/Pages/Battlefleet.swift +++ b/hinnen/Sources/Pages/Battlefleet.swift @@ -1,14 +1,18 @@ -import Foundation import Ignite struct Battlefleet: StaticPage { - var title = "Battlefleet: Scarus" + var path = "/battlefleet" + let title: String + + init() { + self.title = "Battlefleet: Sector Scarus" + } var body: some HTML { - Text(title) - .font(.title1) + VStack { + Logo(barTitle: String(title.split(separator: " ").first ?? ""), underTitle: "Sector Scarus") + .horizontalAlignment(.center) + Link("Battlefleet Gothic Remastered Digital Rules", target: "BattlefleetGothicDigitalRemaster.epub") + } } } - - - diff --git a/hinnen/Sources/Pages/DungeonMaster.swift b/hinnen/Sources/Pages/DungeonMaster.swift new file mode 100644 index 0000000..2ad56da --- /dev/null +++ b/hinnen/Sources/Pages/DungeonMaster.swift @@ -0,0 +1,17 @@ +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 ae194f4..7383198 100644 --- a/hinnen/Sources/Pages/Home.swift +++ b/hinnen/Sources/Pages/Home.swift @@ -1,11 +1,10 @@ -import Foundation import Ignite struct Home: StaticPage { var title = "Hinnen Underground" var body: some HTML { - Group{ + VStack{ Logo() .horizontalAlignment(.center) Grid(alignment: .center) { diff --git a/hinnen/Sources/Site.swift b/hinnen/Sources/Site.swift index e7f4361..3081cdd 100644 --- a/hinnen/Sources/Site.swift +++ b/hinnen/Sources/Site.swift @@ -1,4 +1,4 @@ -import Foundation + import Ignite @main @@ -16,7 +16,7 @@ struct IgniteWebsite { struct Hinnen: Site { var name = "Hinnen Underground" - var titleSuffix = " – My Awesome Site" + var titleSuffix = "" var url = URL(static: "https://www.hinnen.us") var builtInIconsEnabled = true @@ -24,4 +24,16 @@ struct Hinnen: Site { var homePage = Home() var layout = MainLayout() + + var lightTheme: (any Theme)? = LightTheme() + var darkTheme: (any Theme)? = DarkTheme() + + var favicon: URL? { URL(static: "/favicon/favicon.ico") } + + var pages: [any StaticPage] { + return [ + Battlefleet(), + DungeonMaster() + ] + } } diff --git a/hinnen/Sources/Themes/Themes.swift b/hinnen/Sources/Themes/Themes.swift new file mode 100644 index 0000000..840a198 --- /dev/null +++ b/hinnen/Sources/Themes/Themes.swift @@ -0,0 +1,64 @@ +// +// Themes.swift +// IgniteStarter +// +// Created by Rory on 5/5/26. +// + +import Ignite + +protocol BaseTheme: Theme {} + +// Default implementation for shared values +extension BaseTheme { + var siteWidth: ResponsiveValues { .init(small: .px(770)) } + + // Prefer Avenir Next for the core font + var font: Font { .init(name: "Avenir Next, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, Liberation Sans, sans-serif", weight: .regular) } + + // Prefer Menlo for monospaced font (code blocks) + var monospaceFont: Font { .init(name: "Menlo, SFMono-Regular, Monaco, Consolas, Liberation Mono, Courier New, monospace", weight: .regular) } + + var codeBlockFontSize: LengthUnit { .px(16) } + var inlineCodeFontSize: LengthUnit { .px(16) } + + var h1Size: ResponsiveValues { .init(LengthUnit.px(32)) } // 1.78x + var h2Size: ResponsiveValues { .init(LengthUnit.px(28)) } // 1.56x + var h3Size: ResponsiveValues { .init(LengthUnit.px(22)) } // 1.22x + var h4Size: ResponsiveValues { .init(LengthUnit.px(20)) } // 1.11x + var h5Size: ResponsiveValues { .init(LengthUnit.px(18)) } // Same as body + var h6Size: ResponsiveValues { .init(LengthUnit.px(16)) } // 0.89x body + + var bodyFontSize: ResponsiveValues { .init(LengthUnit.px(18)) } + var lineSpacing: LengthUnit { .em(1.5) } + var headingLineSpacing: LengthUnit { .em(2) } +} + +// Values not set here default to stock light theme colors +struct LightTheme: BaseTheme { + var colorScheme: ColorScheme = .light + + var accent: Color { Color(hex: "#6366f1") } // blue ribbon + var secondaryAccent: Color { Color(hex: "#6366f1") } // blue ribbon + var secondary: Color { Color(hex: "#6b7280") } // pale sky + var secondaryBackground: Color { Color(hex: "#f8fafc") } // alabaster + var link: Color { Color(hex: "#6366f1") } // blue ribbon + var hoveredLink: Color { Color(hex: "#4f46e5") } // purple heart + + var syntaxHighlighterTheme: HighlighterTheme { .solarizedLight } +} + +// Values not set here default to stock dark theme colors +struct DarkTheme: BaseTheme { + var colorScheme: ColorScheme = .dark + + var accent: Color { Color(hex: "#7dd3fc") } // malibu blue + var secondaryAccent: Color { Color(hex: "#e2e8f0") } // mystic gray + var secondary: Color { Color(hex: "#9ca3af") } // gray chateau + var background: Color { Color(hex: "#1e293b") } // ebony clay + var secondaryBackground: Color { Color(hex: "#334155") } // pickled bluewood + var link: Color { Color(hex: "#7dd3fc") } // malibu + var hoveredLink: Color { Color(hex: "#38bdf8") } // picton blue + + var syntaxHighlighterTheme: HighlighterTheme { .githubDark } +}