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

feat: content card updates #95

Merged
merged 25 commits into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
84e2be4
components update
chr1se Dec 9, 2020
2f18854
components update
chr1se Dec 9, 2020
99d3416
update: brand guidelines link
rolorogan Dec 9, 2020
25c48b9
Merge pull request #44 from wmcadigital/nr/feature/images
rolorogan Dec 9, 2020
f86b1d6
added last few components
chr1se Dec 17, 2020
5c1f15f
coomit after pull
chr1se Dec 17, 2020
67bd43f
update: shields
rolorogan Dec 17, 2020
468d4d5
update: ds preview image
rolorogan Dec 17, 2020
4dc4638
update: cdn links with version
rolorogan Dec 17, 2020
68b1ae8
Merge pull request #62 from wmcadigital/ds1.1.2
rolorogan Dec 17, 2020
f1e7b71
update: banner bg colour to transparent
rolorogan Dec 17, 2020
aa30b06
update: remove header v2 and cards from patterns
rolorogan Dec 17, 2020
6fd1aec
remove: custom accordion
rolorogan Dec 17, 2020
32316f4
update: make table bg transparent
rolorogan Dec 17, 2020
8362ab4
update: dropdown arrow data:image
rolorogan Dec 17, 2020
cd83dbf
Merge pull request #63 from wmcadigital/nr/feat/readme-badges
rolorogan Dec 17, 2020
c478b6d
Merge pull request #64 from wmcadigital/nr/fix/styling-amends
rolorogan Dec 17, 2020
64f7c27
Merge pull request #65 from wmcadigital/ds1.1
rolorogan Dec 17, 2020
af9eeaa
Revert "feat: Ds1.1 - Design System Updates"
rolorogan Dec 17, 2020
6d950a1
Merge pull request #66 from wmcadigital/revert-65-ds1.1
rolorogan Dec 17, 2020
7775a69
Revert "Revert "feat: Ds1.1 - Design System Updates"" (#74)
rolorogan Jan 7, 2021
bb2e3be
Merge branch 'master' into release
rolorogan Jan 7, 2021
761ee8a
fix: build directory (#80)
rolorogan Jan 7, 2021
61325bd
Merge branch 'master' into release
Feb 17, 2021
959a81a
update: content cards (#94)
rolorogan Feb 17, 2021
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
10 changes: 5 additions & 5 deletions src/wmcads/components/content-card/_content-card.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
{# HTML content #}
{% set html = params.html if params.html else "
<div class=\"wmcads-p-sm\">
<h3>Where the adventure starts</h3>
<p>Whatever your plans this holiday, get there with our great range of family tickets and discount vouchers.</p>
<h2>Lorem ipsum dolor sit amet</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
" %}

{# This macro checks if it's being called inside a {% call %} tag #}
{# It's an easier way to pass in larger html content #}
<{{tag}}{{attributes | safe}} class="wmcads-content-card{{" blue" if params.isCta else "" }}">
<{{tag}}{{attributes | safe}} class="wmcads-content-card{{"--blue" if params.isCta else "" }}">
{% if(params.src) %}
<img src="https://www.wmca.org.uk/media/3415/wmca-bournville-131.jpg?anchor=center&mode=crop&width=590&height=150&rnd=132122595620000000" alt="content image">
<img src="https://www.wmca.org.uk/media/3415/wmca-bournville-131.jpg?anchor=center&mode=crop&width=1180&height=300&rnd=132122595620000000" alt="content image">
{% endif %}
{% if(params.isCta) %}
<div class="wmcads-p-sm">
<svg>
<use xlink:href="#wmcads-general-toolkit" href="#wmcads-general-toolkit"></use>
</svg>
<h3>Where the adventure starts</h3>
<h2>Lorem ipsum dolor sit amet</h2>
</div>
{% else %}
{%- if caller -%}
Expand Down
44 changes: 35 additions & 9 deletions src/wmcads/components/content-card/_content-card.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//accessibility styles
@mixin accessibility-hover {
h2 {
text-decoration: underline;
}

&:hover,
&:focus {
box-shadow: inset 0 0 0 1px get-color(primary);
}
}

.wmcads-content-card {
display: block;
min-height: 150px;
Expand All @@ -6,15 +18,29 @@
background-color: $white;
text-decoration: none;

svg {
width: 60px;
height: 60px;
fill: $white;
@at-root a#{&} {
display: block;
color: get-color(text);
text-decoration: none;
@include accessibility-hover;
}

// Modifiers
&--blue {
display: block;
border-bottom: 0;
color: $white;
background: get-color(cta);

h2 {
color: $white;
}

svg {
width: 60px;
height: 60px;
fill: $white;
}
}
}

.wmcads-content-card.blue {
border-bottom: 0;
color: $white;
background: get-color(cta);
}