Skip to content

Commit fff7b85

Browse files
committed
fix: improve hero cards section
1 parent 5adeb5a commit fff7b85

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

static/css/v3/v3-examples-section.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
max-width: 80rem;
33
margin-left: auto;
44
margin-right: auto;
5-
padding: var(--space-xl, 32px) var(--space-default, 8px);
5+
padding: 10% var(--space-default, 8px);
66
color: var(--color-text-primary);
77
}
88

templates/base.html

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -362,24 +362,10 @@
362362
{% flag "v3" %}
363363
<div class="bg-slate text-white text-center py-2 font-semibold">v3 flag enabled</div>
364364
{% endflag %}
365-
{% flag "v3" %}
366-
{% include "v3/includes/_header_v3.html" %}
367-
{% if request.resolver_match.url_name == 'v3-homepage' %}
368-
{% include "v3/includes/_hero_home.html" with install_card_id="hero-home-1" hero_image_url=hero_image_url hero_background_image_url=hero_background_image_url %}
369-
{% elif request.resolver_match.url_name == 'v3-demo-components' %}
370-
{% include "v3/includes/_hero_home.html" with hero_background_image_url="" install_card_id="hero-home-1" hero_image_url_light=hero_legacy_image_url_light hero_image_url_dark=hero_legacy_image_url_dark %}
371-
{% include "v3/includes/_hero_home.html" with install_card_id="hero-home-2" hero_image_url=hero_image_url %}
372-
{% include "v3/includes/_hero_home.html" with install_card_id="hero-home-3" hero_image_url="" hero_image_url_light="" hero_image_url_dark="" %}
373-
<div class="v3-demo-heros-spacer" style="margin-top: 3rem;"></div>
374-
{% include "v3/includes/_hero_library.html" with hero_background_image_url="" title="Boost.Beast" description="Portable HTTP, WebSocket, and network operations using only C++11 and Boost.Asio" doc_url="#" source_url="#" slack_url="#" github_url="#" version_tag="C++ 03" added_text="Added in 1.66.0" hero_image_url_light=hero_legacy_image_url_light hero_image_url_dark=hero_legacy_image_url_dark is_flagship_lib=True %}
375-
<div class="v3-demo-heros-spacer" style="margin-top: 3rem;"></div>
376-
{% include "v3/includes/_hero_library.html" with title="Boost.Beast" description="Portable HTTP, WebSocket, and network operations using only C++11 and Boost.Asio" doc_url="#" source_url="#" slack_url="#" github_url="#" version_tag="C++ 03" added_text="Added in 1.66.0" hero_image_url=hero_image_url is_flagship_lib=True %}
377-
{% include "v3/includes/_hero_library.html" with title="Boost.Beast" description="Portable HTTP, WebSocket, and network operations using only C++11 and Boost.Asio" doc_url="#" source_url="#" slack_url="#" github_url="#" version_tag="C++ 03" added_text="Added in 1.66.0" hero_image_url="" hero_image_url_light="" hero_image_url_dark="" %}
378-
{% endif %}
379-
{% endflag %}
380365
{% block main_content_wrapper %}<div class="md:px-3 mx-auto transition-all">{% endblock %}
381366
{% block content_header %}
382367
{% flag "v3" %}
368+
{% include "v3/includes/_header_v3.html" %}
383369
{% else %}
384370
{% include "includes/_header.html" %}
385371
{% endflag %}

templates/v3/examples/_v3_example_section.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@ <h3 class="v3-examples-section__toc-heading">Table of Contents</h3>
3939
<ul class="v3-examples-section__toc-list"></ul>
4040
</nav>
4141

42+
{% with section_title="Hero Cards" %}
43+
<div class="v3-examples-section__block" id="{{ section_title|slugify }}">
44+
<h3>{{ section_title }}</h3>
45+
<div class="v3-examples-section__example-box">
46+
{% include "v3/includes/_hero_home.html" with hero_background_image_url="" install_card_id="hero-home-1" hero_image_url_light=hero_legacy_image_url_light hero_image_url_dark=hero_legacy_image_url_dark %}
47+
{% include "v3/includes/_hero_home.html" with install_card_id="hero-home-2" hero_image_url=hero_image_url %}
48+
{% include "v3/includes/_hero_home.html" with install_card_id="hero-home-3" hero_image_url="" hero_image_url_light="" hero_image_url_dark="" %}
49+
<div class="v3-demo-heros-spacer" style="margin-top: 3rem;"></div>
50+
{% include "v3/includes/_hero_library.html" with hero_background_image_url="" title="Boost.Beast" description="Portable HTTP, WebSocket, and network operations using only C++11 and Boost.Asio" doc_url="#" source_url="#" slack_url="#" github_url="#" version_tag="C++ 03" added_text="Added in 1.66.0" hero_image_url_light=hero_legacy_image_url_light hero_image_url_dark=hero_legacy_image_url_dark is_flagship_lib=True %}
51+
<div class="v3-demo-heros-spacer" style="margin-top: 3rem;"></div>
52+
{% include "v3/includes/_hero_library.html" with title="Boost.Beast" description="Portable HTTP, WebSocket, and network operations using only C++11 and Boost.Asio" doc_url="#" source_url="#" slack_url="#" github_url="#" version_tag="C++ 03" added_text="Added in 1.66.0" hero_image_url=hero_image_url is_flagship_lib=True %}
53+
{% include "v3/includes/_hero_library.html" with title="Boost.Beast" description="Portable HTTP, WebSocket, and network operations using only C++11 and Boost.Asio" doc_url="#" source_url="#" slack_url="#" github_url="#" version_tag="C++ 03" added_text="Added in 1.66.0" hero_image_url="" hero_image_url_light="" hero_image_url_dark="" %}
54+
</div>
55+
</div>
56+
{% endwith %}
57+
4258
{% with section_title="Buttons" %}
4359
<div class="v3-examples-section__block" id="{{ section_title|slugify }}">
4460
<h3>{{ section_title }}</h3>

0 commit comments

Comments
 (0)