articles, clean up, error fixes
This commit is contained in:
@@ -4,7 +4,14 @@ struct MainLayout: Layout {
|
||||
var body: some Document {
|
||||
Body {
|
||||
content
|
||||
IgniteFooter()
|
||||
HStack {
|
||||
IgniteFooterAlt()
|
||||
Spacer()
|
||||
SocialFooter()
|
||||
Spacer()
|
||||
VersionInfo()
|
||||
}
|
||||
.margin(.top, .xLarge)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user