Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TWE-13 | FE | Icon Keypoints #347

Open
wants to merge 2 commits into
base: feature/twe-13-keypoints-wicons
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
{% load wagtailcore_tags wagtailimages_tags %}
<div>
{# Section heading #}
<h2>{{ value.title }}</h2>
<div class="grid__keypoints keypoints">
{% if value.title %}
<h2 class="heading heading--two">{{ value.title }}</h2>
{% endif %}
{% if value.intro %}
<div class="text text--five">{{ value.intro|richtext }}</div>
{% endif %}

{# Section intro #}
<div>{{ value.intro|richtext }}</div>

{# Key points #}
<ul>
<ul class="keypoints__list">
{% for key_point in value.key_points %}
<li>
{% include "patterns/atoms/icons/icon.html" with name=key_point.icon classname=key_point.icon %}
<p>
<b>Icon:</b> {{ key_point.icon }}<br>
<b>Icon Label:</b> {{ key_point.icon_label }}<br>
<b>Heading:</b> {{ key_point.heading }}
</p>
<div>{{ key_point.description|richtext }}</div>
<li class="keypoints__item">
<div class="keypoints__wrapper">
<p class="keypoints__label">{{ key_point.icon_label }}</p>
{% include "patterns/atoms/icons/icon.html" with name=key_point.icon classname="keypoints__icon key_point.icon" %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Do we need to pass key_point.icon as a classname here?

</div>
{# header title is optional, so heading here may be h2 #}
<{% if value.title %}h3{% else %}h2{% endif %} class="keypoints__heading">
{{ key_point.heading }}
{% if value.title %}</h3>{% else %}</h2>{% endif %}
<div class="keypoints__description">{{ key_point.description|richtext }}</div>
</li>
{% endfor %}
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ <h2 class="underline mt-8 mb-2">Homepage Showcase</h2>
{% include "patterns/molecules/streamfield/blocks/showcase_block.html" with is_homepage_showcase=True %}
</div>

<div>
<h2 class="underline mt-8 mb-2">Icon keypoints</h2>
{% include "patterns/molecules/streamfield/blocks/icon_keypoints_block.html" %}
</div>

<div>
<h2 class="underline mt-8 mb-2">Featured Case Study</h2>
{% include "patterns/molecules/streamfield/blocks/featured_case_study.html" %}
Expand Down
3 changes: 2 additions & 1 deletion tbx/static_src/sass/components/_grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
}

&__division-signpost,
&__featured-services {
&__featured-services,
&__keypoints {
grid-column: 2 / span 4;
margin-bottom: $spacer;

Expand Down
68 changes: 68 additions & 0 deletions tbx/static_src/sass/components/_keypoints.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
@use 'config' as *;

.keypoints {
&__list {
display: flex;
flex-direction: column;
gap: $spacer-medium;

@include media-query(medium) {
gap: $spacer;
}
}

&__item {
display: grid;
grid-template-columns: repeat(12, 1fr);
}

&__icon {
width: 115px;
height: 105px;
}

&__wrapper {
border-top: 1px solid var(--color--border);
padding-top: $spacer-mini-plus;
grid-column: 1 / span 9;
grid-row: 1;

@include media-query(medium) {
margin-right: $spacer-medium;
grid-column: 1 / span 3;
grid-row: span 2;
}
}

&__label {
@include font-size(size-four);
font-weight: $weight--semibold;
color: var(--color--theme-primary);
}

&__heading {
@include font-size(size-two);
font-weight: $weight--semibold;
color: var(--color--heading);
padding: $spacer-mini-plus 0 $spacer-mini;
align-self: flex-start;
grid-column: 1 / span 12;

@include media-query(medium) {
padding: 0 0 $spacer-mini-plus;
grid-column: 4 / span 6;
grid-row: 1;
}
}

&__description {
@include font-size(size-four);
font-weight: $weight--light;
color: var(--color--heading);
grid-column: 1 / span 12;

@include media-query(medium) {
grid-column: 4 / span 8;
}
}
}
1 change: 1 addition & 0 deletions tbx/static_src/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
@use 'components/image';
@use 'components/instagram-gallery';
@use 'components/intro-with-images';
@use 'components/keypoints';
@use 'components/link';
@use 'components/listing';
@use 'components/listing-avatar';
Expand Down
Loading