articles, clean up, error fixes

This commit is contained in:
Rory Hinnen
2026-05-08 11:02:29 -05:00
parent 82b40351f0
commit 0ba6511d14
18 changed files with 189 additions and 202 deletions
@@ -0,0 +1,38 @@
//
// SuggestedArticlePage.swift
// IgniteSamples
// https://www.github.com/twostraws/Ignite
// See LICENSE for license information.
//
import Foundation
import Ignite
struct SuggestedArticleLayout: Layout {
@Environment(\.articles) private var articles
var body: some Document {
Body {
Grid(alignment: .top) {
content
.width(9)
.padding(.vertical, 80)
Section {
Text("Read this next…")
.font(.title3)
if let latest = articles.all.randomElement() {
ArticlePreview(for: latest)
}
}
.width(3)
.position(.stickyTop)
.padding(.top, 80)
}
IgniteFooter()
}
}
}