Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sponsor switchover #3622

Merged
merged 4 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions FrontEnd/styles/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,22 @@ body.home {
}
}
}

.ccta-availability {
padding: 15px;
font-size: 13px;
background-color: var(--panel-button-background);

p {
margin: 5px 0;
}

.support {
margin: 0 0 5px;
font-weight: bold;
}

.cta {
text-align: right;
}
}
Binary file removed Public/images/sponsors/contextsdk.png
Binary file not shown.
Binary file removed Public/images/sponsors/contextsdk~dark.png
Binary file not shown.
16 changes: 9 additions & 7 deletions Sources/App/Core/ExternalURL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,30 @@
import Plot

enum ExternalURL: URLRepresentable {
case addNewPackage(_ owner: String, _ repository: String)
case contactMailto
case mastodon
case podcast
case projectGitHub
case projectSponsorship
case raiseNewIssue
case podcast
case addNewPackage(_ owner: String, _ repository: String)


var description: String {
switch(self) {
case let .addNewPackage(owner, repository):
return "https://github.com/SwiftPackageIndex/PackageList/issues/new?labels=Add+Package&template=add_package.yml&title=Add+\(repository)&list=https%3A%2F%2Fgithub.com%2F\(owner)%2F\(repository).git"
case .contactMailto:
return "mailto:[email protected]"
case .mastodon:
return "https://mas.to/@SwiftPackageIndex"
case .podcast:
return "https://swiftpackageindexing.transistor.fm"
case .projectGitHub:
return "https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server"
case .projectSponsorship:
return "https://github.com/sponsors/SwiftPackageIndex"
case .raiseNewIssue:
return "https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/issues/new/choose"
case .podcast:
return "https://swiftpackageindexing.transistor.fm"
case let .addNewPackage(owner, repository):
return "https://github.com/SwiftPackageIndex/PackageList/issues/new?labels=Add+Package&template=add_package.yml&title=Add+\(repository)&list=https%3A%2F%2Fgithub.com%2F\(owner)%2F\(repository).git"
}
}
}
5 changes: 0 additions & 5 deletions Sources/App/Core/Supporters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ enum Supporters {
darkModeUrl: "/images/sponsors/emerge~dark.png"),
url: "https://www.emergetools.com/?utm_source=spi2&utm_medium=sponsor&utm_campaign=emerge",
advertisingCopy: "Join the future of mobile development. Trusted by top companies like Duolingo, Square, DoorDash & more…"),
.init(name: "ContextSDK",
logo: .init(lightModeUrl: "/images/sponsors/contextsdk.png",
darkModeUrl: "/images/sponsors/contextsdk~dark.png"),
url: "https://contextsdk.com",
advertisingCopy: "Intent detection with real-world context. Lean, lightweight and GDPR compliant out of the box."),
]

nonisolated(unsafe) static var infrastructure: [Corporate] = [
Expand Down
19 changes: 18 additions & 1 deletion Sources/App/Views/Home/HomeIndex+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,24 @@ enum HomeIndex {
analyticsEvent: "Home - Supporters CTA"),
.group(
Supporters.corporate.shuffled().map(\.advertisementNode)
)
),
.if(Supporters.corporate.count < 2, .div(
.class("ccta-availability"),
.p(
.class("support"),
.text("Support the Swift Package Index")
),
.p(
.text("We have one homepage sponsorship spot available. Support the project while promoting your company.")
),
.p(
.class("cta"),
.a(
.href(ExternalURL.contactMailto),
.text("Get in touch for details →")
)
)
))
)
}

Expand Down
Loading