mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
• `xcconfig` `MACOSX_DEPLOYMENT_TARGET` updated to 13.0 • Removed `@available` annotations for macOS < 13.0 • Removed for Big Sur fixes. This has been built and doesn’t trigger any build settings should be `xcconfig` options.
64 lines
1.5 KiB
Swift
64 lines
1.5 KiB
Swift
//
|
|
// AboutHTML.swift
|
|
// NetNewsWire
|
|
//
|
|
// Created by Stuart Breckenridge on 28/05/2023.
|
|
// Copyright © 2023 Ranchero Software. All rights reserved.
|
|
//
|
|
|
|
import Html
|
|
|
|
struct AboutHTML: LoadableAboutData {
|
|
|
|
private func stylesheet() -> StaticString {
|
|
"""
|
|
body {
|
|
margin: 2em;
|
|
color: #333333;
|
|
background-color: white;
|
|
line-height: 1.1em;
|
|
font-family: -apple-system;
|
|
text-align: center;
|
|
font-size: 12px;
|
|
}
|
|
|
|
h3 { padding-top: 10px; padding-bottom: 8px; }
|
|
@media (prefers-color-scheme: dark) {
|
|
body {
|
|
color: white;
|
|
background-color: #333333;
|
|
}
|
|
|
|
a { color: rgba(94, 158, 244, 1); }
|
|
}
|
|
"""
|
|
}
|
|
|
|
private func document() -> Node {
|
|
return Node.document(
|
|
.html(
|
|
.head(
|
|
.style(safe: stylesheet())
|
|
),
|
|
.body(
|
|
Node.h3(.text(NSLocalizedString("label.text.primary-contributors", comment: "Primary Contributors"))),
|
|
Node.fragment(about.PrimaryContributors.map { .p(.a(attributes: [.href($0.url ?? "")], "\($0.name)")) }),
|
|
Node.h3(.text(NSLocalizedString("label.text.additional-contributors", comment: "Additional Contributors"))),
|
|
Node.fragment(about.AdditionalContributors.map { .p(.a(attributes: [.href($0.url ?? "")], "\($0.name)")) }),
|
|
Node.h3(.text(NSLocalizedString("label.text.thanks", comment: "Thanks"))),
|
|
Node.raw(NSLocalizedString("label.text.thanks-details", comment: "Thanks details"))
|
|
|
|
)
|
|
)
|
|
)
|
|
}
|
|
|
|
func renderedDocument() -> String {
|
|
return render(document())
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|