40 lines
1.0 KiB
Swift
40 lines
1.0 KiB
Swift
//
|
|
// CustomStory.swift
|
|
// IgniteSamples
|
|
// https://www.github.com/twostraws/Ignite
|
|
// See LICENSE for license information.
|
|
//
|
|
|
|
import Foundation
|
|
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.text)
|
|
|
|
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)
|
|
}
|
|
}
|