-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TWE-19 - BE - Link columns block (Service area page) (#337)
* Add LinkColumnsBlock * Add LinkColumnsBlock to service area page in pattern library * Links columns block FE draft * Add to pattern library and fine-tune styles * Add underline in high contrast mode and add tail so arrow is attached to the last word * TWE-19 | FE | Links columns block (#345) * Add underlines to links, update styles for improved accessibility --------- Co-authored-by: shyusu4 <[email protected]>
- Loading branch information
1 parent
59439eb
commit 1ab0914
Showing
10 changed files
with
152 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...roject_styleguide/templates/patterns/molecules/streamfield/blocks/link_columns_block.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% load wagtailcore_tags wagtailimages_tags %} | ||
<div class="grid__link-columns link-columns"> | ||
<div class="link-columns__header"> | ||
{% include "patterns/atoms/motif-heading/motif-heading.html" with heading_level=2 heading=value.title classes="motif-heading--two motif-heading--static link-columns__title " %} | ||
{% if value.intro %} | ||
<div class="link-columns__intro rich-text">{{ value.intro|richtext }}</div> | ||
{% endif %} | ||
</div> | ||
|
||
<ul class="link-columns__links"> | ||
{% for link in value.links %} | ||
<li class="link-columns__item"> | ||
<a class="link-columns__link" href="{{ link.value.url }}"><span class="link-columns__link-text">{{ link.value.text }}</span><span class="link-columns__tail"> {% include "patterns/atoms/icons/icon.html" with name="arrow" classname="link-columns__arrow" %}</span></a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> |
38 changes: 38 additions & 0 deletions
38
...roject_styleguide/templates/patterns/molecules/streamfield/blocks/link_columns_block.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
context: | ||
value: | ||
title: Optional section title (Link columns) | ||
intro: '<p>Optional section intro</p>' | ||
links: | ||
- value: | ||
text: Digital marketing for charities | ||
url: '#' | ||
- value: | ||
text: Search engine optimisation (SEO) | ||
url: '#' | ||
- value: | ||
text: Website design and development | ||
url: '#' | ||
- value: | ||
text: Strategy, innovation and AI | ||
url: '#' | ||
- value: | ||
text: Google Ad Grants management | ||
url: '#' | ||
- value: | ||
text: Digital marketing creative | ||
url: '#' | ||
- value: | ||
text: Digital marketing training | ||
url: '#' | ||
- value: | ||
text: Wagtail CMS services | ||
url: '#' | ||
- value: | ||
text: Email marketing | ||
url: '#' | ||
- value: | ||
text: Pay-per-click (PPC) | ||
url: '#' | ||
- value: | ||
text: Social media management | ||
url: '#' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
@use 'config' as *; | ||
|
||
.link-columns { | ||
&__header { | ||
margin-bottom: $spacer-half; | ||
} | ||
|
||
&__links { | ||
@include media-query(medium) { | ||
columns: 2; | ||
column-gap: $spacer-large; | ||
} | ||
|
||
@include media-query(large) { | ||
columns: 3; | ||
column-gap: $spacer-half; | ||
} | ||
} | ||
|
||
&__item { | ||
padding: $spacer-mini-plus 0; | ||
border-top: 1px solid var(--color--border); | ||
} | ||
|
||
&__link { | ||
display: block; | ||
width: fit-content; | ||
|
||
&:focus { | ||
@include focus-style(); | ||
} | ||
} | ||
|
||
&__link-text { | ||
@include font-size(size-six); | ||
@include link-styles( | ||
$color: var(--color--link), | ||
$interaction-color: var(--color--theme-primary), | ||
$offset: 5px | ||
); | ||
|
||
&:hover { | ||
transition: color $transition-quick; | ||
|
||
@include reduced-motion() { | ||
transition: none; | ||
} | ||
} | ||
} | ||
|
||
&__tail { | ||
// Keep the arrow attached to the last word so it's not orphaned on a new line | ||
white-space: nowrap; | ||
display: inline; | ||
} | ||
|
||
&__arrow { | ||
@include arrow-link-icon-styles( | ||
$width: 18px, | ||
$interaction-color: var(--color--theme-primary) | ||
); | ||
color: var(--color--theme-primary); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters