improvements on the ui

This commit is contained in:
2026-11-25 07:14:49 +01:00
parent 3afdb6d67f
commit b7c72b9e16
249 changed files with 19702 additions and 17358 deletions
+5 -3
View File
@@ -1,8 +1,10 @@
import Foundation
/// The lorem text that `#lorem` puts in the page: an opening sentence of 16 words, two paragraphs and a contact sample.
/// The lorem text that `#lorem` puts in the page: a bookmark, an opening sentence of 16 words, two paragraphs and a contact sample.
public struct LoremText: Equatable, Sendable {
public static let trigger = "#lorem"
/// The first line of the lorem text, so it shows in the bookmark index.
public static let bookmark = "=lorem"
public static let openingWords = 16
public static let paragraphSentences = 3...5
public static let resourceBundleName = "Plak_PlakCore.bundle"
@@ -17,9 +19,9 @@ public struct LoremText: Equatable, Sendable {
self.contacts = contacts
}
/// The sentence, the two paragraphs, the phones, the addresses and the e-mails, with a blank line between each.
/// The bookmark, the sentence, the two paragraphs, the phones, the addresses and the e-mails, with a blank line between each.
public var text: String {
([opening] + paragraphs.map { $0.joined(separator: " ") } + contacts.blocks).joined(separator: "\n\n")
([Self.bookmark, opening] + paragraphs.map { $0.joined(separator: " ") } + contacts.blocks).joined(separator: "\n\n")
}
public static func wordCount(_ sentence: String) -> Int {