Skip to content

Commit b39883c

Browse files
committed
QA Feedback resolution
1 parent 2ce57b4 commit b39883c

6 files changed

Lines changed: 31 additions & 4 deletions

File tree

libraries/views.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ def get_v3_context_data(self, **kwargs):
108108
"label": "View",
109109
"options": [
110110
("list", "List"),
111-
("grid", "Grid"),
111+
("grid", "Card"),
112112
("categorized", "Category"),
113113
("grading", "Grading"),
114114
],
115115
"selected": self.kwargs.get("library_view_str"),
116-
"width": "narrow",
116+
"width": "category",
117117
},
118118
{
119119
"type": "dropdown",
@@ -349,14 +349,17 @@ def get_results_by_tier(self):
349349
return [
350350
{
351351
"category": "Flagship",
352+
"icon": "flag",
352353
"library_version_list": flagship,
353354
},
354355
{
355356
"category": "Core",
357+
"icon": None,
356358
"library_version_list": core,
357359
},
358360
{
359361
"category": "Other",
362+
"icon": None,
360363
"library_version_list": other,
361364
},
362365
]

static/css/v3/library-filter.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
flex-shrink: 0;
3636
}
3737

38+
.library-filter__field-category {
39+
width: 120px;
40+
}
41+
3842
.library-filter__field-narrow {
3943
width: 104px;
4044
}

static/css/v3/library-page.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@
3737
width: auto;
3838
}
3939

40+
.library-page-hero .hero-image-dark {
41+
display: none;
42+
}
43+
44+
html.dark .library-page-hero .hero-image-light {
45+
display: none;
46+
}
47+
48+
html.dark .library-page-hero .hero-image-dark {
49+
display:block
50+
}
51+
4052
.library-page-hero .hero-title {
4153
grid-area: a;
4254
margin: 0;
@@ -129,6 +141,11 @@
129141
border: 1px solid var(--color-stroke-weak);
130142
}
131143

144+
.library-page__category-header .icon {
145+
display: inline-block;
146+
margin-left: var(--space-large);
147+
}
148+
132149
.grouped .library-item--list:first-child {
133150
border-radius: 0;
134151
border-top: none;
17.5 KB
Loading

templates/includes/icon.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@
9191
<path d="M13.3333 1.33331H1.33325V14.6666H2.66659V2.66665H13.3333V10.6666H3.99992V12H2.66659V13.3333H3.99992V12H14.6666V1.33331H13.3333ZM3.99992 4.66665H11.9999V5.99998H3.99992V4.66665ZM9.33325 7.33331H3.99992V8.66665H9.33325V7.33331Z" />
9292
{% elif icon_name == "github-issues" %}
9393
<path d="M3.33341 1.33331H6.00008V2.66665H4.66675V3.99998H3.33341V1.33331ZM3.33341 7.99998H2.00008V3.99998H3.33341V7.99998ZM4.66675 9.33331H3.33341V7.99998H4.66675V9.33331ZM6.00008 10.6666V9.33331H4.66675V10.6666H2.00008V9.33331H0.666748V10.6666H2.00008V12H4.66675V14.6666H6.00008V12H7.33341V10.6666H6.00008ZM6.00008 10.6666V12H4.66675V10.6666H6.00008ZM10.0001 2.66665V3.99998H6.00008V2.66665H10.0001ZM12.6667 3.99998H11.3334V2.66665H10.0001V1.33331H12.6667V3.99998ZM12.6667 7.99998V3.99998H14.0001V7.99998H12.6667ZM11.3334 9.33331V7.99998H12.6667V9.33331H11.3334ZM10.0001 10.6666V9.33331H11.3334V10.6666H10.0001ZM10.0001 12H8.66675V10.6666H10.0001V12ZM10.0001 12H11.3334V14.6666H10.0001V12Z" />
94+
{% elif icon_name == "flag" %}
95+
<path d="M3 2H13V4H21V18H11V16H5V22H3V2ZM5 14H13V16H19V6H11V4H5V14Z" />
9496
{% endif %}
9597
</svg>
9698
{% endif %}

templates/v3/library_page.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ <h1 class="hero-title">Find a battle-tested library for the problem you're solvi
2424
{% include 'v3/includes/_field_text.html' with label='Search' name='ex_search' placeholder='Keyword, name, etc.' icon_left='search' submit_icon='arrow-right' %}
2525
</div>
2626
<div class="hero-image-container">
27-
<img alt="Excited Cartoon Mascot" class="hero-image" src="{% static 'img/v3/solo-images/beaver-black-and-white.png' %}" loading="lazy" decoding="async" />
27+
<img alt="Excited Cartoon Mascot" class="hero-image hero-image-light" src="{% static 'img/v3/solo-images/beaver-black-and-white.png' %}" loading="lazy" decoding="async" />
28+
<img alt="Excited Cartoon Mascot" class="hero-image hero-image-dark" src="{% static 'img/v3/solo-images/beaver-black-and-white-dark.png' %}" loading="lazy" decoding="async" />
2829
</div>
2930
</section>
3031
<form action="" method="get">
@@ -55,7 +56,7 @@ <h1 class="hero-title">Find a battle-tested library for the problem you're solvi
5556
{% elif library_view_str == 'categorized' or library_view_str == 'grading' %}
5657
{% for result in library_versions_by_category %}
5758
<section>
58-
<h2 class="library-page__category-header">{{ result.category }}</h2>
59+
<h2 class="library-page__category-header">{{ result.category }} {% if result.icon %}{% include "includes/icon.html" with icon_name=result.icon only %}{% endif %}</h2>
5960
<ul class="library-item-list grouped">
6061
{% for item in result.library_version_list %}
6162
{% include 'v3/includes/_library_item.html' with variant='list' library_name=item.library.name library_url=item.library_detail_url_for_version description=item.description categories=item.library.category_tags cpp_version=item.cpp_standard_minimum author=item.author_details doc_url=item.documentation_url version_str=version_str only %}

0 commit comments

Comments
 (0)