getting closer, but still can't load a second page

This commit is contained in:
Rory Hinnen
2026-05-05 18:00:28 -05:00
parent bb739a5994
commit b6db6ebef6
13 changed files with 118 additions and 22 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

-1
View File
@@ -1 +0,0 @@
This is the best place to put images for your build, creating subfolders below here as needed.
-3
View File
@@ -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.
-1
View File
@@ -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.
+11 -3
View File
@@ -1,8 +1,16 @@
import Foundation
import Ignite import Ignite
struct Logo: HTML { 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 { var body: some HTML {
// ── Logo ────────────────────────────────────────────────────────────── // ── Logo ──────────────────────────────────────────────────────────────
// Simplified Underground logo using ZStack and SwiftUI-like modifiers // Simplified Underground logo using ZStack and SwiftUI-like modifiers
VStack { VStack {
@@ -24,7 +32,7 @@ struct Logo: HTML {
// Blue bar with "Hinnen" // Blue bar with "Hinnen"
VStack { VStack {
Spacer() Spacer()
Text("Hinnen".uppercased()) Text(barTitle.uppercased())
.foregroundStyle(.white) .foregroundStyle(.white)
.font(.custom("Futura", size: 33)) .font(.custom("Futura", size: 33))
Spacer() Spacer()
@@ -35,7 +43,7 @@ struct Logo: HTML {
.horizontalAlignment(.center) .horizontalAlignment(.center)
} }
// "Underground" label beneath // "Underground" label beneath
Text("Underground".uppercased()) Text(underTitle.uppercased())
.font(.custom("Futura", size: 25)) .font(.custom("Futura", size: 25))
.frame(width: 214, alignment: .top) .frame(width: 214, alignment: .top)
.horizontalAlignment(.center) .horizontalAlignment(.center)
-2
View File
@@ -5,12 +5,10 @@
// Created by Rory on 5/5/26. // Created by Rory on 5/5/26.
// //
import Foundation
import Ignite import Ignite
struct Mastodon: HTML { struct Mastodon: HTML {
var body: some 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") Link("", target: "https://twit.social/@roryh")
.relationship(.me) .relationship(.me)
-1
View File
@@ -1,4 +1,3 @@
import Foundation
import Ignite import Ignite
struct MainLayout: Layout { struct MainLayout: Layout {
+11 -7
View File
@@ -1,14 +1,18 @@
import Foundation
import Ignite import Ignite
struct Battlefleet: StaticPage { struct Battlefleet: StaticPage {
var title = "Battlefleet: Scarus" var path = "/battlefleet"
let title: String
init() {
self.title = "Battlefleet: Sector Scarus"
}
var body: some HTML { var body: some HTML {
Text(title) VStack {
.font(.title1) Logo(barTitle: String(title.split(separator: " ").first ?? ""), underTitle: "Sector Scarus")
.horizontalAlignment(.center)
Link("Battlefleet Gothic Remastered Digital Rules", target: "BattlefleetGothicDigitalRemaster.epub")
}
} }
} }
+17
View File
@@ -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)
}
}
}
+1 -2
View File
@@ -1,11 +1,10 @@
import Foundation
import Ignite import Ignite
struct Home: StaticPage { struct Home: StaticPage {
var title = "Hinnen Underground" var title = "Hinnen Underground"
var body: some HTML { var body: some HTML {
Group{ VStack{
Logo() Logo()
.horizontalAlignment(.center) .horizontalAlignment(.center)
Grid(alignment: .center) { Grid(alignment: .center) {
+14 -2
View File
@@ -1,4 +1,4 @@
import Foundation
import Ignite import Ignite
@main @main
@@ -16,7 +16,7 @@ struct IgniteWebsite {
struct Hinnen: Site { struct Hinnen: Site {
var name = "Hinnen Underground" var name = "Hinnen Underground"
var titleSuffix = " – My Awesome Site" var titleSuffix = ""
var url = URL(static: "https://www.hinnen.us") var url = URL(static: "https://www.hinnen.us")
var builtInIconsEnabled = true var builtInIconsEnabled = true
@@ -24,4 +24,16 @@ struct Hinnen: Site {
var homePage = Home() var homePage = Home()
var layout = MainLayout() 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()
]
}
} }
+64
View File
@@ -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 }
}