new Imperial article
This commit is contained in:
@@ -10,24 +10,30 @@ import Ignite
|
||||
|
||||
struct BattlefleetStory: ArticlePage {
|
||||
var body: some HTML {
|
||||
Text(article.title)
|
||||
.font(.title1)
|
||||
.horizontalAlignment(.center)
|
||||
if let image = article.image {
|
||||
Image(image, description: article.imageDescription)
|
||||
.resizable()
|
||||
}
|
||||
|
||||
Text(article.title)
|
||||
.font(.title1)
|
||||
.horizontalAlignment(.center)
|
||||
|
||||
Text(article.text)
|
||||
|
||||
if let tagLinks = article.tagLinks() {
|
||||
HStack(spacing: .xSmall) {
|
||||
ForEach(tagLinks) { link in
|
||||
link.font(.title3)
|
||||
|
||||
Divider()
|
||||
.padding(.bottom, 10)
|
||||
Group {
|
||||
HStack {
|
||||
if let tags = article.tags {
|
||||
Text("Tags: \(tags.joined(separator: ", "))")
|
||||
}
|
||||
Spacer()
|
||||
Text("Length: \(article.estimatedWordCount) words/\(article.estimatedReadingMinutes) minutes to read.")
|
||||
|
||||
}
|
||||
Text("Published: \(article.date)")
|
||||
.horizontalAlignment(.center)
|
||||
}
|
||||
|
||||
.foregroundStyle(.gray)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user