Added Esperanto translations
Added beginnings of feed parsing,
may need to switch parser.
Signed-off-by: Louis Hollingworth <louis@hollingworth.ch>
This commit is contained in:
parent
058cf52926
commit
9345b91573
13 changed files with 213 additions and 16 deletions
|
|
@ -8,25 +8,41 @@
|
|||
import SwiftUI
|
||||
|
||||
struct FeedViewCell: View {
|
||||
let title: String
|
||||
let author: String
|
||||
let date: Date
|
||||
let content: String
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
Text("Title")
|
||||
Text(title)
|
||||
.font(.title)
|
||||
HStack {
|
||||
Text("Author")
|
||||
Text(author)
|
||||
Spacer()
|
||||
Text("Date")
|
||||
Text(date, formatter: dateFormatter)
|
||||
}
|
||||
.font(.footnote)
|
||||
Text("Content")
|
||||
Text(content)
|
||||
.font(.body)
|
||||
}
|
||||
.multilineTextAlignment(.leading)
|
||||
}
|
||||
}
|
||||
|
||||
private let dateFormatter: DateFormatter = {
|
||||
let formatter = DateFormatter()
|
||||
formatter.dateStyle = .short
|
||||
formatter.timeStyle = .short
|
||||
return formatter
|
||||
}()
|
||||
|
||||
|
||||
struct FeedViewCell_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
FeedViewCell()
|
||||
FeedViewCell(
|
||||
title: "Test", author: "Test Author", date: Date(),
|
||||
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue