Skip to content

Commit 1be005b

Browse files
committed
Add introductiona and styles page links FE
1 parent 764b5e4 commit 1be005b

File tree

2 files changed

+53
-13
lines changed

2 files changed

+53
-13
lines changed

tbx/project_styleguide/templates/patterns/molecules/title-filters/title-filters.html

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
{% load wagtailcore_tags %}
22

3-
<div class="title-filters {% if hide_tags %}title-filters--no-tags{% endif %}">
3+
<div class="title-filters {% if introduction or page_links %}title-filters--no-tags{% endif %}">
44
<div class="title-filters__title">
55
<h1 class="heading heading--mega">{{ item.title }}</h1>
66
</div>
77

8-
{% if introduction %}
9-
<div class="">
10-
<p>{{ introduction|linebreaksbr }}</p>
11-
</div>
12-
{% endif %}
8+
{% if introduction or page_links %}
9+
<div class="title-filters__info">
10+
{% if introduction %}
11+
<div class="title-filters__introduction">
12+
<p>{{ introduction|linebreaksbr }}</p>
13+
</div>
14+
{% endif %}
1315

14-
{% if page_links %}
15-
<div class="styled-page-links">
16-
{% for block in page_links %}
17-
{% include_block block %}
18-
{% endfor %}
16+
{% if page_links %}
17+
<div class="title-filters__styled-page-links styled-page-links">
18+
{% for block in page_links %}
19+
{% include_block block %}
20+
{% endfor %}
21+
</div>
22+
{% endif %}
1923
</div>
2024
{% endif %}
2125

22-
{% if tags and not hide_tags %}
26+
{% if tags and not introduction and not page_links %}
2327
<div class="title-filters__tags">
2428
<div class="tags">
2529
<p class="sr-only">Filter by category</p>

tbx/static_src/sass/components/_title-filters.scss

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,43 @@
4848
}
4949

5050
&--no-tags {
51+
@include media-query(large) {
52+
flex-direction: column;
53+
display: grid;
54+
grid-template-columns: auto 1fr;
55+
grid-template-rows: auto auto;
56+
}
57+
5158
#{$root}__title {
5259
@include media-query(large) {
53-
flex-grow: 1;
60+
flex-grow: 0;
61+
}
62+
}
63+
64+
&::before {
65+
@include media-query(large) {
66+
grid-column: 1;
67+
grid-row: 1;
5468
}
5569
}
5670
}
5771

72+
&__introduction {
73+
@include font-size('size-four');
74+
font-weight: $weight--light;
75+
}
76+
77+
&__styled-page-links {
78+
margin-top: $spacer-small-plus;
79+
}
80+
81+
&__info {
82+
@include media-query(large) {
83+
grid-column: 2;
84+
grid-row: 2;
85+
}
86+
}
87+
5888
&__title {
5989
margin-bottom: $spacer-small;
6090

@@ -66,6 +96,12 @@
6696
#{$root}--team & {
6797
flex-basis: 50%;
6898
}
99+
100+
#{$root}--no-tags & {
101+
grid-column: 2;
102+
grid-row: 1;
103+
margin-bottom: $spacer-small-plus;
104+
}
69105
}
70106
}
71107

0 commit comments

Comments
 (0)