Skip to content

Commit ccd6fd9

Browse files
home section with relative positioning
1 parent bbbb9d8 commit ccd6fd9

File tree

17 files changed

+22237
-20393
lines changed

17 files changed

+22237
-20393
lines changed

_includes/grid-promo.html

+155
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
2+
<section id="the-grid-promo">
3+
<style type="text/gss">
4+
#the-grid-promo {
5+
top: == 0 !require;
6+
width: == ::window[width] !strong;
7+
8+
@virtual "area";
9+
@h |-["area"]-| in(::) gap(::[$area-h-gap]);
10+
@v |-["area"]-| in(::) gap(48);
11+
"area"[center-x] == ::[center-x];
12+
"area"[width] <= 1080 !strong;
13+
14+
@virtual "text";
15+
16+
@h |[#the-grid-promo-title]| in("text");
17+
@h |[#the-grid-promo-subtitle]| in("text");
18+
@v |[#the-grid-promo-subtitle]-[#the-grid-promo-title]| in("text") gap(::[$text-v-gap]);
19+
20+
21+
@if ::window[width] < 1080 {
22+
$area-h-gap: == 32 !require;
23+
$text-v-gap: == 8 !require;
24+
25+
@h |["text"]| in("area");
26+
@h |~-~[#the-grid-promo-button]~-~| in("area") gap(0);
27+
@v |["text"]-[#the-grid-promo-button]| in("area") gap(32);
28+
29+
#the-grid-promo-button[center-x] == "area"[center-x];
30+
31+
32+
#the-grid-promo-title {
33+
font-size: == 32 !require;
34+
}
35+
36+
#the-grid-promo-subtitle {
37+
font-size: == 16 !require;
38+
}
39+
40+
#the-grid-promo-button {
41+
font-size: == 16 !require;
42+
}
43+
}
44+
@else {
45+
$area-h-gap: == 64 !require;
46+
$text-v-gap: == 0 !require;
47+
48+
@h |["text"]~-~[#the-grid-promo-button]| in("area") gap(64);
49+
@v |~-~["text"]~-~| in("area") gap(0);
50+
51+
@v |~-~[#the-grid-promo-button]~-~| in("area") gap(0);
52+
#the-grid-promo-button[center-y] == "text"[center-y] == "area"[center-y];
53+
54+
55+
#the-grid-promo-title {
56+
font-size: == 40 !require;
57+
}
58+
59+
#the-grid-promo-subtitle {
60+
font-size: == 16 !require;
61+
}
62+
63+
#the-grid-promo-button {
64+
font-size: == 18 !require;
65+
}
66+
}
67+
}
68+
69+
#the-grid-promo-title {
70+
height: == ::[intrinsic-height];
71+
margin: == 0 !require;
72+
}
73+
74+
#the-grid-promo-subtitle {
75+
height: == ::[intrinsic-height];
76+
margin: == 0 !require;
77+
}
78+
79+
#the-grid-promo-button {
80+
size: == ::[intrinsic-size];
81+
}
82+
</style>
83+
84+
<style type="text/css">
85+
#the-grid-promo {
86+
background-image: url('//s3-us-west-2.amazonaws.com/cdn.thegrid.io/assets/images/responsive.jpg');
87+
background-position: center;
88+
background-size: cover;
89+
position: relative;
90+
}
91+
92+
#the-grid-promo:before {
93+
background-color: hsla(0, 0%, 0%, .6);
94+
content: "";
95+
position: absolute;
96+
width: 100%;
97+
height: 100%;
98+
top: 0;
99+
left: 0;
100+
}
101+
102+
#the-grid-promo-title,
103+
#the-grid-promo-subtitle {
104+
color: hsl(0, 0%, 100%);
105+
letter-spacing: .28em;
106+
position: relative;
107+
text-transform: uppercase;
108+
}
109+
110+
#the-grid-promo-title {
111+
color: hsl(270, 33%, 99%);
112+
font-family: 'National Thin', sans-serif;
113+
}
114+
115+
#the-grid-promo-subtitle {
116+
color: hsl(46, 23%, 56%);
117+
font-family: 'National Book', sans-serif;
118+
}
119+
120+
#the-grid-promo-button {
121+
background-color: transparent;
122+
border: 2px solid hsl(43, 82%, 69%);
123+
color: hsl(43, 82%, 69%);
124+
cursor: pointer;
125+
font-family: 'National Book', sans-serif;
126+
letter-spacing: .1em;
127+
padding: 16px 24px;
128+
position: relative;
129+
text-transform: uppercase;
130+
}
131+
132+
#the-grid-promo-button:hover {
133+
background-color: hsl(43, 82%, 69%) !important;
134+
color: hsl(42, 84%, 8%);
135+
}
136+
137+
@media (max-width: 1079px) {
138+
#the-grid-promo-title,
139+
#the-grid-promo-subtitle {
140+
text-align: center;
141+
}
142+
}
143+
144+
@media (min-width: 1080px) {
145+
#the-grid-promo-title,
146+
#the-grid-promo-subtitle {
147+
text-align: left;
148+
}
149+
}
150+
</style>
151+
152+
<h2 id="the-grid-promo-subtitle">AI websites that design themselves</h2>
153+
<h1 id="the-grid-promo-title">Join the evolution</h1>
154+
<a id="the-grid-promo-button" href="https://thegrid.io" target="_blank">Become a founding member</a>
155+
</section>

0 commit comments

Comments
 (0)