Skip to content

Commit 371f407

Browse files
set rev version
1 parent 8da89bf commit 371f407

14 files changed

+32
-29
lines changed

Package.resolved

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let package = Package(
99
.executable(name: "AdaEngineWebsite", targets: ["AdaEngineWebsite"])
1010
],
1111
dependencies: [
12-
.package(url: "https://github.com/twostraws/Ignite.git", branch: "main"),
12+
.package(url: "https://github.com/twostraws/Ignite.git", revision: "024f32c00352e3bd3f9ad9ab86db12bbccd0ec00"),
1313
.package(url: "https://github.com/pointfreeco/swift-dependencies.git", from: "1.9.2")
1414
],
1515
targets: [

Sources/AdaEngineWebsite/Components/AEImage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Dependencies
99
import Ignite
1010

11-
struct AEImage: DocumentElement {
11+
struct AEImage: HTML {
1212

1313
let path: String
1414
let description: String?

Sources/AdaEngineWebsite/Components/DonateButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Ignite
99

10-
struct DonateButton: DocumentElement {
10+
struct DonateButton: HTML {
1111

1212
var isPrimitive: Bool = true
1313

Sources/AdaEngineWebsite/Components/PreviousArticles.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Ignite
99

10-
struct PreviousArticles: DocumentElement {
10+
struct PreviousArticles: HTML {
1111

1212
let item: Article
1313

Sources/AdaEngineWebsite/Components/SocialList.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Dependencies
99
import Ignite
1010

11-
struct SocialList: DocumentElement {
11+
struct SocialList: HTML {
1212

1313
let socials: [AuthorDTO.Social]
1414

@@ -19,9 +19,7 @@ struct SocialList: DocumentElement {
1919
List(self.socials) { social in
2020
ListItem {
2121
Link(target: social.path) {
22-
Div {
23-
AEImage(path: social.social.logoPath, description: social.social.rawValue)
24-
}
22+
Image(context.image(for: social.social.logoPath) ?? "", description: social.social.rawValue)
2523

2624
Span {
2725
social.username

Sources/AdaEngineWebsite/Components/TagList.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Ignite
99

10-
struct TagList: DocumentElement {
10+
struct TagList: HTML {
1111

1212
let item: Article
1313

Sources/AdaEngineWebsite/Components/WrittenByAuthor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Dependencies
99
import Ignite
1010

11-
struct WrittenByAuthor: DocumentElement {
11+
struct WrittenByAuthor: HTML {
1212

1313
let author: AuthorEntity
1414

@@ -29,9 +29,9 @@ struct WrittenByAuthor: DocumentElement {
2929

3030
Div {
3131
Link(target: self.author.path) {
32-
Text(self.author.name)
33-
.font(.title2)
32+
self.author.name
3433
}
34+
.font(.title2)
3535

3636
SocialList(socials: self.author.socials)
3737
}

Sources/AdaEngineWebsite/Extensions/HTML+Extensions.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ extension HTML {
1515
}
1616
}
1717

18+
extension InlineElement {
19+
func avatarModifier() -> some InlineElement {
20+
self.class("avatar")
21+
}
22+
}
23+
1824
extension HTML {
1925
func background<Content: HTML>(alignment: Alignment = .center, @HTMLBuilder content: () -> Content) -> some HTML {
2026
ZStack(alignment: alignment) {
@@ -42,7 +48,7 @@ extension HTML {
4248
}
4349

4450
extension Link {
45-
init<Content: HTML>(target: URL, @HTMLBuilder content: @escaping () -> Content) {
46-
self.init(target: target.absoluteString, content: content)
51+
init<Content: HTML>(targetURL: URL, @HTMLBuilder content: @escaping () -> Content) {
52+
self.init(target: targetURL.absoluteString, content: content)
4753
}
48-
}
54+
}

Sources/AdaEngineWebsite/Layout/AEFooter.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ extension AEFooter {
103103
.width(2)
104104

105105
HStack(spacing: 12) {
106-
Link(target: URL.github) {
106+
Link(targetURL: URL.github) {
107107
Image(systemName: "github", description: "GitHub")
108108
}
109-
Link(target: URL.mastodon) {
109+
Link(targetURL: URL.mastodon) {
110110
Image(systemName: "mastodon", description: "Mastodon")
111111
}
112112
// Link(target: URL.discord) { Tag("i").class("bi bi-discord") }
113-
Link(target: URL.reddit) {
113+
Link(targetURL: URL.reddit) {
114114
Image(systemName: "reddit", description: "Reddit")
115115
}
116116
// Link(target: "#") { Tag("i").class("bi bi-rss") }

0 commit comments

Comments
 (0)