Skip to content

Commit a05cdf1

Browse files
committed
PR Feedback: Adjust category header style, adjust bottom margin on library lists, use bespoke hero classes, adjust mobile hero size, use tokens for padding
1 parent fd077f5 commit a05cdf1

4 files changed

Lines changed: 71 additions & 29 deletions

File tree

static/css/v3/foundations.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,6 @@ html.v3 code {
134134
max-width: 1440px;
135135
margin-left: auto;
136136
margin-right: auto;
137-
padding-left:.75rem;
138-
padding-right:.75rem;
137+
padding-left:var(--space-large);
138+
padding-right:var(--space-large);
139139
}

static/css/v3/header.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
@media (min-width: 1440px) {
2626
.header {
27-
min-width: var(--header-width);
27+
max-width: var(--header-width);
2828
}
2929
}
3030

static/css/v3/library-page.css

Lines changed: 63 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,65 @@
1-
.library-page-hero .hero-home__block {
2-
padding: 0;
3-
height: fit-content;
1+
/*
2+
=============================================
3+
= Hero Styling =
4+
=============================================
5+
*/
6+
7+
.library-page-hero {
48
margin-top: var(--space-xl);
59
margin-bottom: var(--space-xl);
610
position: relative;
7-
min-height: fit-content;
8-
}
9-
10-
.library-page-hero .hero-home__actions {
11-
width: 100%;
11+
display: grid;
12+
grid-template-columns: 574px 1fr auto;
13+
gap: var(--space-xl);
14+
align-items: center;
15+
grid-template-areas:
16+
"a . c"
17+
"b . c"
18+
;
1219
}
1320

14-
.library-page-hero .hero-home__actions .field {
21+
.library-page-hero .hero-search-bar {
22+
grid-area: b;
1523
width: 75%;
1624
}
1725

18-
.library-page-hero .hero-home__content {
19-
margin: 0;
26+
.library-page-hero .hero-image {
27+
grid-area: c;
2028
}
2129

22-
.library-page-hero .hero-library__image {
30+
.library-page-hero .hero-image,
31+
.library-page-hero .hero-image img {
2332
height: 160px;
2433
width: auto;
2534
}
2635

27-
.library-page-hero .hero-home__headline {
36+
.library-page-hero .hero-title {
37+
grid-area: a;
38+
margin: 0;
39+
color: var(--color-text-primary);
40+
font-family: var(--font-sans);
2841
font-size: var(--font-size-2xl);
29-
letter-spacing: -0.4px;
42+
font-style: normal;
43+
font-weight: var(--font-weight-regular);
44+
line-height: var(--line-height-tight);
45+
letter-spacing: var(--letter-spacing-tight);
3046
}
3147

48+
/*
49+
======================================
50+
= List Styling =
51+
======================================
52+
*/
53+
3254
.library-item-list {
3355
border: 1px solid var(--color-stroke-weak);
3456
border-radius: var(--border-radius-xl);
3557
overflow: hidden;
58+
margin-bottom: var(--space-xxl);
59+
}
60+
61+
.library-item-card-grid {
62+
margin-bottom: var(--space-xxl);
3663
}
3764

3865
.library-item-list .library-item--list:last-child {
@@ -74,6 +101,12 @@
74101
letter-spacing: var(--letter-spacing-tight);
75102
}
76103

104+
/*
105+
=================================================
106+
= Category Display Styling =
107+
=================================================
108+
*/
109+
77110
.library-page__category-header {
78111
grid-column: 1 / -1;
79112
padding: var(--space-large);
@@ -82,6 +115,11 @@
82115
width: 100%;
83116
margin: 0;
84117
max-width: 1408px;
118+
font-weight: var(--font-weight-medium);
119+
letter-spacing: var(--letter-spacing-tight);
120+
line-height: var(--line-height-tight);
121+
font-size: var(--font-size-large);
122+
font-family: var(--font-display);
85123
border-top-left-radius: var(--border-radius-xl);
86124
border-top-right-radius: var(--border-radius-xl);
87125
border: 1px solid var(--color-stroke-weak);
@@ -98,10 +136,20 @@
98136
display: none;
99137
}
100138

101-
.library-page-hero .hero-home__actions .field {
139+
.library-page-hero .hero-search-bar {
102140
width: 100%;
103141
}
104142

143+
.library-page-hero {
144+
grid-template-areas:
145+
"c"
146+
"a"
147+
"b"
148+
;
149+
grid-template-columns: 100%;
150+
justify-items: start;
151+
}
152+
105153
.library-page__container {
106154
margin-left: var(--space-medium);
107155
margin-right: var(--space-medium);

templates/v3/library_page.html

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,13 @@
1818

1919
{% block content %}
2020
<div class="library-page__container">
21-
<section class="library-page-hero hero-home hero-home--no-image" aria-label="Hero">
22-
<div class="hero-home__block">
23-
<div class="hero-home__content">
24-
<h1 class="hero-home__headline">Find a battle-tested library for the problem you're solving right now.</h1>
25-
<div class="hero-home__actions">
21+
<section class="library-page-hero" aria-label="Hero">
22+
<h1 class="hero-title">Find a battle-tested library for the problem you're solving right now.</h1>
23+
<div class="hero-search-bar">
2624
{% include 'v3/includes/_field_text.html' with label='Search' name='ex_search' placeholder='Keyword, name, etc.' icon_left='search' submit_icon='arrow-right' %}
2725
</div>
28-
</div>
29-
<div class="hero-library__image">
30-
<img alt="" class="hero-library__img" src="{% static 'img/v3/solo-images/beaver-black-and-white.png' %}" loading="lazy" decoding="async" />
31-
</div>
32-
</div>
33-
</section>
26+
<img alt="Excited Cartoon Mascot" class="hero-image" src="{% static 'img/v3/solo-images/beaver-black-and-white.png' %}" loading="lazy" decoding="async" />
27+
</section>
3428
<form action="" method="get">
3529
<div id="library-page-filter-container" class="mb-xl">
3630
{% include 'v3/includes/_library_filter.html' with filter_id='library-page-filter' fields=library_filter_fields %}

0 commit comments

Comments
 (0)