Skip to content

Commit 9fa9dfe

Browse files
committed
Added the homepage CTA.
1 parent 1baff1a commit 9fa9dfe

File tree

3 files changed

+57
-7
lines changed

3 files changed

+57
-7
lines changed

FrontEnd/styles/colors.scss

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
--light-green: #68bb13;
3636
--very-light-green: #ebf9de;
3737

38+
--very-dark-purple: #2f1d37;
39+
--dark-purple: #6d17af;
40+
--mid-purple: #aa66de;
41+
--light-purple: #bda0d3;
42+
--very-light-purple: #f8e9ff;
43+
3844
--yellow: #f2b94f;
3945
--orange: #f58e36;
4046
--mid-red: #cc4444;
@@ -173,8 +179,10 @@
173179
--scta-panel-accent: var(--pink);
174180
--ccta-panel-accent: var(--mid-blue);
175181
--ghcta-panel-accent: var(--pink);
176-
--podcast-panel-accent: var(--light-blue);
177182
--podcast-panel-background: var(--very-light-blue);
183+
--podcast-panel-accent: var(--light-blue);
184+
--rfs6-panel-background: var(--very-light-purple);
185+
--rfs6-panel-accent: var(--light-purple);
178186

179187
--avatar-shadow: 0 2px 2px 3px rgba(0, 0, 0, 5%);
180188

@@ -204,6 +212,8 @@
204212
--mid-green: #0ebf4c;
205213
--light-green: #96ff4c;
206214

215+
--mid-purple: #9b42df;
216+
207217
// -------------------------------------------------------------------------
208218
// Semantic colours.
209219
// -------------------------------------------------------------------------
@@ -217,7 +227,9 @@
217227
--panel-underlay-opacity: 0.8;
218228

219229
--podcast-panel-background: var(--very-dark-blue);
220-
--podcast-panel-border: var(--dark-blue);
230+
--podcast-panel-accent: var(--dark-blue);
231+
--rfs6-panel-background: var(--very-dark-purple);
232+
--rfs6-panel-accent: var(--dark-purple);
221233

222234
--green-text: var(--mid-green);
223235

FrontEnd/styles/panel_button.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,30 @@
142142
}
143143
}
144144

145+
&.rfs6 {
146+
--panel-accent: var(--rfs6-panel-accent);
147+
--panel-button-background: var(--rfs6-panel-background);
148+
position: relative;
149+
margin-top: 20px;
150+
151+
p {
152+
margin: 0 15px 0 0;
153+
}
154+
155+
&::before {
156+
content: '';
157+
position: absolute;
158+
top: -17px;
159+
right: -5px;
160+
display: block;
161+
width: 40px;
162+
height: 40px;
163+
background-repeat: no-repeat;
164+
background-size: 100%;
165+
background-image: var(--image-checkered-flag-cta);
166+
}
167+
}
168+
145169
@media screen and (max-width: $mobile-breakpoint) {
146170
max-width: 300px;
147171
margin: 0 auto;

Sources/App/Views/Home/HomeIndex+View.swift

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,25 @@ enum HomeIndex {
5959
.section(
6060
.class("two-column"),
6161
.section(
62-
.panelButton(cssClass: "podcast",
63-
linkUrl: ExternalURL.podcast,
64-
bodyNode: .podcastPanelBody(includeHeading: false),
65-
cta: "Listen Now",
66-
analyticsEvent: "Home - Podcast CTA"),
62+
// ---------------------------------------------------------------
63+
// Temporarily removed until we stop promoting Ready for Swift 6
64+
// .panelButton(cssClass: "podcast",
65+
// linkUrl: ExternalURL.podcast,
66+
// bodyNode: .podcastPanelBody(includeHeading: false),
67+
// cta: "Listen Now",
68+
// analyticsEvent: "Home - Podcast CTA"),
69+
// ---------------------------------------------------------------
70+
.panelButton(cssClass: "rfs6",
71+
linkUrl: SiteURL.readyForSwift6.relativeURL(),
72+
bodyNode: .group(
73+
.p(
74+
.strong("Are the packages you use safe from data races?"),
75+
.text(" "),
76+
.text("We’re tracking progress towards data race safety this summer. Find out which packages are “Ready for Swift 6” and check for packages marked as “Safe from data races” when browsing the index.")
77+
)
78+
),
79+
cta: "Track Progress",
80+
analyticsEvent: "Home - Ready for Swift 6 CTA"),
6781
.section(
6882
.class("recent"),
6983
.div(

0 commit comments

Comments
 (0)