File tree Expand file tree Collapse file tree 3 files changed +34
-8
lines changed Expand file tree Collapse file tree 3 files changed +34
-8
lines changed Original file line number Diff line number Diff line change @@ -71,3 +71,14 @@ body.home {
7171 }
7272 }
7373}
74+
75+ .ccta-availability {
76+ padding : 10px ;
77+ font-size : 13px ;
78+ background-color : var (--panel-button-background );
79+
80+ .support {
81+ margin : 0 0 5px ;
82+ font-weight : bold ;
83+ }
84+ }
Original file line number Diff line number Diff line change 1515import Plot
1616
1717enum ExternalURL : URLRepresentable {
18+ case addNewPackage( _ owner: String , _ repository: String )
19+ case contactMailto
1820 case mastodon
21+ case podcast
1922 case projectGitHub
2023 case projectSponsorship
2124 case raiseNewIssue
22- case podcast
23- case addNewPackage( _ owner: String , _ repository: String )
24-
2525
2626 var description : String {
2727 switch ( self ) {
28+ case let . addNewPackage( owner, repository) :
29+ 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 "
30+ case . contactMailto:
31+ 2832 case . mastodon:
2933 return " https://mas.to/@SwiftPackageIndex "
34+ case . podcast:
35+ return " https://swiftpackageindexing.transistor.fm "
3036 case . projectGitHub:
3137 return " https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server "
3238 case . projectSponsorship:
3339 return " https://github.com/sponsors/SwiftPackageIndex "
3440 case . raiseNewIssue:
3541 return " https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/issues/new/choose "
36- case . podcast:
37- return " https://swiftpackageindexing.transistor.fm "
38- case let . addNewPackage( owner, repository) :
39- 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 "
4042 }
4143 }
4244}
Original file line number Diff line number Diff line change @@ -109,7 +109,20 @@ enum HomeIndex {
109109 analyticsEvent: " Home - Supporters CTA " ) ,
110110 . group(
111111 Supporters . corporate. shuffled ( ) . map ( \. advertisementNode)
112- )
112+ ) ,
113+ . if( Supporters . corporate. count < 2 , . div(
114+ . class( " ccta-availability " ) ,
115+ . p(
116+ . class( " support " ) ,
117+ . text( " Support the Swift Package Index " )
118+ ) ,
119+ . text( " We currently have availability for one additional homepage sponsor. " ) ,
120+ . a(
121+ . href( ExternalURL . contactMailto) ,
122+ . text( " Get in touch for details " )
123+ ) ,
124+ . text( " . " )
125+ ) )
113126 )
114127 }
115128
You can’t perform that action at this time.
0 commit comments