// // Story.swift // IgniteSamples // https://www.github.com/twostraws/Ignite // See LICENSE for license information. // import Foundation import Ignite struct Story: ArticlePage { var body: some HTML { Text(article.title) .font(.title1) .horizontalAlignment(.center) if let image = article.image { Image(image, description: article.imageDescription) .resizable() .cornerRadius(20) .frame(maxHeight: 300) } Text(article.text) Divider() 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) } }