getting closer, but still can't load a second page
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -1 +0,0 @@
|
||||
This is the best place to put images for your build, creating subfolders below here as needed.
|
||||
@@ -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 +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.
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import Foundation
|
||||
import Ignite
|
||||
|
||||
struct MainLayout: Layout {
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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,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) {
|
||||
|
||||
@@ -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()
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 }
|
||||
}
|
||||
Reference in New Issue
Block a user