Skip to content

Commit 78b2214

Browse files
committed
refactor: tighten hero section and use single ruby polygon
1 parent a4cd0a5 commit 78b2214

2 files changed

Lines changed: 21 additions & 43 deletions

File tree

_layouts/meetup.html

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -54,34 +54,12 @@ <h1 class="hero__title">
5454

5555
<div class="hero__right" aria-hidden="true">
5656
<div class="hero__illustration">
57-
<svg viewBox="0 0 320 220" xmlns="http://www.w3.org/2000/svg">
58-
<g fill="#3967D1" opacity="0.16">
59-
{% for row in (0..7) %}
60-
{% for col in (0..8) %}
61-
<circle cx="{{ col | times: 20 | plus: 145 }}" cy="{{ row | times: 20 | plus: 15 }}" r="2"/>
62-
{% endfor %}
63-
{% endfor %}
64-
</g>
65-
<g transform="translate(160, 110)">
66-
<polygon points="-140,-20 -90,-90 90,-90 140,-20 0,90"
67-
fill="#E63946"
68-
stroke="#9B1F2D"
69-
stroke-width="1.6"
70-
stroke-linejoin="round"/>
71-
<polygon points="-80,-20 -45,-90 45,-90 80,-20"
72-
fill="#FF6B7A"
73-
fill-opacity="0.55"/>
74-
<polygon points="-140,-20 140,-20 0,90"
75-
fill="#9B1F2D"
76-
fill-opacity="0.2"/>
77-
<g stroke="#9B1F2D" stroke-width="0.9" fill="none" opacity="0.42">
78-
<line x1="-80" y1="-20" x2="-45" y2="-90"/>
79-
<line x1="80" y1="-20" x2="45" y2="-90"/>
80-
<line x1="-80" y1="-20" x2="0" y2="90"/>
81-
<line x1="80" y1="-20" x2="0" y2="90"/>
82-
<line x1="-140" y1="-20" x2="140" y2="-20"/>
83-
</g>
84-
</g>
57+
<svg viewBox="0 0 280 185" xmlns="http://www.w3.org/2000/svg">
58+
<polygon points="0,70 50,0 230,0 280,70 140,185"
59+
fill="#E63946"
60+
stroke="#9B1F2D"
61+
stroke-width="2"
62+
stroke-linejoin="round"/>
8563
</svg>
8664
</div>
8765
</div>

_sass/view_meetup.scss

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $vm-pad-x: 4rem;
3434
align-items: center;
3535
display: flex;
3636
gap: 1rem;
37-
height: 88px;
37+
height: 48px;
3838
justify-content: space-between;
3939
margin: 0 auto;
4040
max-width: $vm-container;
@@ -99,7 +99,7 @@ $vm-pad-x: 4rem;
9999
grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
100100
margin: 0 auto;
101101
max-width: $vm-container;
102-
padding: 2.25rem $vm-pad-x 2rem;
102+
padding: 0.75rem $vm-pad-x 0.75rem;
103103
width: 100%;
104104
}
105105

@@ -128,16 +128,16 @@ $vm-pad-x: 4rem;
128128
flex: 0 0 auto;
129129
flex-direction: column;
130130
font-weight: 700;
131-
height: 152px;
131+
height: 120px;
132132
justify-content: center;
133-
min-width: 104px;
133+
min-width: 90px;
134134
padding: 0.75rem;
135135
text-align: center;
136-
width: 104px;
136+
width: 90px;
137137
}
138138

139139
.date-badge__day {
140-
font-size: 2.5rem;
140+
font-size: 2rem;
141141
line-height: 1;
142142
}
143143

@@ -202,19 +202,19 @@ $vm-pad-x: 4rem;
202202
}
203203

204204
.hero__right {
205-
align-items: center;
205+
align-items: flex-start;
206206
display: flex;
207-
justify-content: center;
207+
justify-content: flex-end;
208208
min-width: 0;
209209
position: relative;
210210
}
211211

212212
.hero__illustration {
213213
align-items: center;
214214
display: flex;
215-
height: 196px;
215+
height: 110px;
216216
justify-content: center;
217-
max-width: 280px;
217+
max-width: 160px;
218218
width: 100%;
219219
}
220220

@@ -229,7 +229,7 @@ $vm-pad-x: 4rem;
229229
.hero__inner {
230230
grid-template-columns: 1fr;
231231
gap: 2rem;
232-
padding: 1.75rem 2rem 1.75rem;
232+
padding: 1rem 2rem 1rem;
233233
}
234234

235235
.hero__left {
@@ -248,13 +248,13 @@ $vm-pad-x: 4rem;
248248
}
249249

250250
.date-badge {
251-
height: 128px;
252-
min-width: 96px;
253-
width: 96px;
251+
height: 104px;
252+
min-width: 84px;
253+
width: 84px;
254254
}
255255

256256
.date-badge__day {
257-
font-size: 2.125rem;
257+
font-size: 1.75rem;
258258
}
259259
}
260260
}

0 commit comments

Comments
 (0)