Skip to content

Commit d62044d

Browse files
committed
Mess with styles
1 parent 34d2a41 commit d62044d

File tree

3 files changed

+90
-29
lines changed

3 files changed

+90
-29
lines changed

src/components/Layout/index.scss

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,11 +1124,90 @@ svg.MarketingDivide {
11241124
// Sponsor Page
11251125

11261126
.tier-row {
1127+
background-color: white;
1128+
padding: 2rem 1rem;
1129+
border-radius: 12px;
1130+
border: 4px solid #1b1b3d;
1131+
color: #1b3955;
1132+
}
1133+
1134+
.tier-item-container {
1135+
display: flex;
1136+
flex-direction: row;
1137+
gap: 1rem;
1138+
align-items: stretch;
1139+
}
1140+
1141+
.tier-break {
1142+
width: 1px;
1143+
background-color: #777;
1144+
align-self: stretch;
11271145
}
11281146

1147+
.tier {
1148+
display: flex;
1149+
flex-direction: column;
1150+
justify-items: space-between;
1151+
align-content: flex-start;
1152+
flex: 1 0 0;
1153+
}
1154+
.tier h3, .tier .price-line {
1155+
text-align: center;
1156+
}
1157+
.tier .tc .button--solid {
1158+
width: 100%;
1159+
}
1160+
.tier h3:first-child {
1161+
padding-top: 0;
1162+
margin-top: 0;
1163+
}
1164+
.tier ul:last-child {
1165+
padding-bottom: 0;
1166+
margin-bottom: 0;
1167+
}
11291168
.tier {
11301169
}
11311170

11321171
.tier a {
11331172
color: #4a68b4;
11341173
}
1174+
1175+
.tier.highlight {
1176+
h3 {
1177+
color: red;
1178+
}
1179+
a {
1180+
color: red;
1181+
&:hover {
1182+
color: red;
1183+
}
1184+
&:visited {
1185+
color: red;
1186+
}
1187+
}
1188+
.tc .button--solid {
1189+
background-color: red;
1190+
border-color: red;
1191+
}
1192+
}
1193+
1194+
@media screen and (max-width: 64rem) {
1195+
.tier-row {
1196+
background-color: transparent;
1197+
border: none;
1198+
padding: 0;
1199+
}
1200+
.tier-item-container {
1201+
display: block;
1202+
gap: 0;
1203+
}
1204+
.tier {
1205+
background-color: white;
1206+
padding: 1rem 1rem;
1207+
border-radius: 12px;
1208+
border: 4px solid #1b1b3d;
1209+
color: #1b3955;
1210+
margin: 1rem 0;
1211+
}
1212+
1213+
}

src/components/MarketingTier.js

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,27 @@ import React from "react";
22

33
export default function MarketingTiers({ children }) {
44
return (
5-
<div
6-
className="tier-row"
7-
style={{
8-
display: "flex",
9-
flexDirection: "row",
10-
gap: "1rem",
11-
alignItems: "stretch",
12-
}}
13-
>
14-
{children}
5+
<div className="tier-row">
6+
<div className="tier-item-container">
7+
{children.flatMap((c, i) =>
8+
i === 0 ? [c] : [<div className="tier-break" />, c]
9+
)}
10+
</div>
1511
</div>
1612
);
1713
}
1814

1915
export class Tier extends React.Component {
2016
render() {
21-
const { name, price, tagline, href, description } = this.props;
17+
const { name, price, tagline, href, description, highlight } = this.props;
2218

2319
return (
24-
<div
25-
className="tier"
26-
style={{
27-
display: "flex",
28-
flexDirection: "column",
29-
justifyItems: "space-between",
30-
alignContent: "flex-start",
31-
backgroundColor: "white",
32-
margin: "0.5em",
33-
padding: "1rem",
34-
borderRadius: "12px",
35-
border: "4px solid #1b1b3d",
36-
color: "#1b3955",
37-
flex: "0 0 33%",
38-
}}
39-
>
20+
<div className={`tier ${highlight ? "highlight" : ""}`}>
4021
<h3>{name}</h3>
41-
<span>
22+
<div className="price-line">
4223
<span style={{ fontSize: "1.5rem" }}>{price}</span>{" "}
4324
<span style={{ fontSize: "0.8rem" }}>/month</span>
44-
</span>
25+
</div>
4526
<div className="tc">
4627
<a className="button--solid" href={href}>
4728
Join on GitHub Sponsors{" "}

src/pages/sponsor.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ with more benefits.
250250
/>
251251
<Tier
252252
name="Production Sponsor"
253+
highlight
253254
price="$100"
254255
tagline="Support sustainability"
255256
href="https://github.com/sponsors/benjie/sponsorships?tier_id=368"

0 commit comments

Comments
 (0)