Begin statistics creation

This commit is contained in:
Christoph Hagen
2025-08-31 16:27:32 +02:00
parent f972a2c020
commit 96bd07bdb7
33 changed files with 1406 additions and 187 deletions

View File

@@ -4,6 +4,8 @@ struct ImageSet: HtmlProducer {
let image: FileResource
let type: FileType
let maxWidth: Int
let maxHeight: Int
@@ -14,8 +16,9 @@ struct ImageSet: HtmlProducer {
let extraAttributes: String
init(image: FileResource, maxWidth: Int, maxHeight: Int, description: String?, quality: CGFloat = 0.7, extraAttributes: String? = nil) {
init(image: FileResource, type: FileType? = nil, maxWidth: Int, maxHeight: Int, description: String?, quality: CGFloat = 0.7, extraAttributes: String? = nil) {
self.image = image
self.type = type ?? image.type
self.maxWidth = maxWidth
self.maxHeight = maxHeight
self.description = description
@@ -24,8 +27,6 @@ struct ImageSet: HtmlProducer {
}
var jobs: [ImageVersion] {
let type = image.type
let width2x = maxWidth * 2
let height2x = maxHeight * 2