@@ -5,9 +5,45 @@ import WordPressAuthenticator
5
5
/// The colors in here intentionally do not support light or dark modes since they're the same on both.
6
6
///
7
7
struct JetpackPrologueStyleGuide {
8
- static let backgroundColor = FeatureFlag . newLandingScreen. enabled ?
9
- UIColor ( light: . muriel( color: . jetpackGreen, . shade5) , dark: . muriel( color: . jetpackGreen, . shade100) ) :
10
- UIColor ( red: 0.00 , green: 0.11 , blue: 0.18 , alpha: 1.00 )
8
+ // Background colors
9
+ // old
10
+ static let oldBackgroundColor = UIColor ( red: 0.00 , green: 0.11 , blue: 0.18 , alpha: 1.00 )
11
+ // new
12
+ static let newBackgroundColor = UIColor ( light: . muriel( color: . jetpackGreen, . shade5) , dark: . muriel( color: . jetpackGreen, . shade100) )
13
+ // combined
14
+ static let backgroundColor = FeatureFlag . newLandingScreen. enabled ? newBackgroundColor : oldBackgroundColor
15
+
16
+ // Continue with WordPress button colors
17
+ // old
18
+ static let oldContinueHighlightedFillColor = UIColor ( red: 1.00 , green: 1.00 , blue: 1.00 , alpha: 0.90 )
19
+ // new
20
+ static let newContinueFillColor = UIColor . muriel ( color: . jetpackGreen, . shade50)
21
+ static let newContinueHighlightedFillColor = UIColor . muriel ( color: . jetpackGreen, . shade90)
22
+
23
+ // combined
24
+ static let continueFillColor = FeatureFlag . newLandingScreen. enabled ? newContinueFillColor : . white
25
+ static let continueHighlightedFillColor = FeatureFlag . newLandingScreen. enabled ? newContinueHighlightedFillColor : oldContinueHighlightedFillColor
26
+ static let continueTextColor = FeatureFlag . newLandingScreen. enabled ? . white : oldBackgroundColor
27
+ static let continueHighlightedTextColor = FeatureFlag . newLandingScreen. enabled ? whiteWithAlpha07 : oldBackgroundColor
28
+
29
+
30
+ // Enter your site address button
31
+ // old
32
+ static let oldSiteBorderColor = UIColor ( red: 1.00 , green: 1.00 , blue: 1.00 , alpha: 0.40 )
33
+ static let oldSiteHighlightedBorderColor = UIColor ( red: 1.00 , green: 1.00 , blue: 1.00 , alpha: 0.20 )
34
+ // combined
35
+ static let siteFillColor = FeatureFlag . newLandingScreen. enabled ? . white : backgroundColor
36
+ static let siteBorderColor = FeatureFlag . newLandingScreen. enabled ? . white : oldSiteBorderColor
37
+ static let siteTextColor = FeatureFlag . newLandingScreen. enabled ? UIColor . black : UIColor . white
38
+ static let siteHighlightedFillColor = FeatureFlag . newLandingScreen. enabled ? whiteWithAlpha07 : backgroundColor
39
+ static let siteHighlightedBorderColor = FeatureFlag . newLandingScreen. enabled ? whiteWithAlpha07 : oldSiteHighlightedBorderColor
40
+ static let siteHighlightedTextColor = FeatureFlag . newLandingScreen. enabled ? . black : whiteWithAlpha07
41
+
42
+ // Color used in both old and versions
43
+ static let whiteWithAlpha07 = UIColor . white. withAlphaComponent ( 0.7 )
44
+
45
+
46
+
11
47
12
48
struct Title {
13
49
static let font : UIFont = WPStyleGuide . fontForTextStyle ( . title3, fontWeight: . semibold)
@@ -24,32 +60,27 @@ struct JetpackPrologueStyleGuide {
24
60
]
25
61
}
26
62
27
- static let continueButtonStyle = NUXButtonStyle ( normal: . init( backgroundColor: . white,
28
- borderColor: . white,
29
- titleColor: FeatureFlag . newLandingScreen. enabled ? . black: Self . backgroundColor) ,
30
-
31
- highlighted: . init( backgroundColor: UIColor ( red: 1.00 , green: 1.00 , blue: 1.00 , alpha: 0.90 ) ,
32
- borderColor: UIColor ( red: 1.00 , green: 1.00 , blue: 1.00 , alpha: 0.90 ) ,
33
- titleColor: FeatureFlag . newLandingScreen. enabled ? . black: Self . backgroundColor) ,
63
+ static let continueButtonStyle = NUXButtonStyle ( normal: . init( backgroundColor: continueFillColor,
64
+ borderColor: continueFillColor,
65
+ titleColor: continueTextColor) ,
66
+ highlighted: . init( backgroundColor: continueHighlightedFillColor,
67
+ borderColor: continueHighlightedFillColor,
68
+ titleColor: continueHighlightedTextColor) ,
34
69
35
- disabled: . init( backgroundColor: . white,
36
- borderColor: . white,
37
- titleColor: Self . backgroundColor) )
70
+ disabled: . init( backgroundColor: . white,
71
+ borderColor: . white,
72
+ titleColor: backgroundColor) )
38
73
39
- static let siteAddressButtonStyle = NUXButtonStyle ( normal: . init( backgroundColor: FeatureFlag . newLandingScreen. enabled ?
40
- UIColor . muriel ( color: . jetpackGreen, . shade50) :
41
- Self . backgroundColor,
42
- borderColor: FeatureFlag . newLandingScreen. enabled ? . clear : UIColor ( red: 1.00 , green: 1.00 , blue: 1.00 , alpha: 0.40 ) ,
43
- titleColor: . white) ,
74
+ static let siteAddressButtonStyle = NUXButtonStyle ( normal: . init( backgroundColor: siteFillColor,
75
+ borderColor: siteBorderColor,
76
+ titleColor: siteTextColor) ,
44
77
45
- highlighted: . init( backgroundColor: FeatureFlag . newLandingScreen. enabled ?
46
- UIColor . muriel ( color: . jetpackGreen, . shade90) :
47
- Self . backgroundColor,
48
- borderColor: FeatureFlag . newLandingScreen. enabled ? . clear : UIColor ( red: 1.00 , green: 1.00 , blue: 1.00 , alpha: 0.20 ) ,
49
- titleColor: UIColor . white. withAlphaComponent ( 0.7 ) ) ,
78
+ highlighted: . init( backgroundColor: siteHighlightedFillColor,
79
+ borderColor: siteHighlightedBorderColor,
80
+ titleColor: siteHighlightedTextColor) ,
50
81
51
82
disabled: . init( backgroundColor: . white,
52
83
borderColor: . white,
53
- titleColor: Self . backgroundColor) )
84
+ titleColor: backgroundColor) )
54
85
55
86
}
0 commit comments