Skip to content

Commit

Permalink
GW-38 Move author to metadata
Browse files Browse the repository at this point in the history
Move card metadata into the list of metadata as this is semantically correct, rather
than just being a div within the article
  • Loading branch information
ediblecode committed Feb 2, 2018
1 parent a769d6c commit b161108
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions src/components/card/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
@include font-size(-1);
color: $colour-nice-dark-grey;
margin: rem(0 0 $spacing-x-small 0);

dd {
display: block;
margin: 0;
}
}

&__summary {
Expand Down
14 changes: 7 additions & 7 deletions src/components/card/card.njk
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
{{ card.summary }}
</p>
{% endif %}
{% if card.author %}
<div class="card__author">
<span class="visually-hidden">Written by: </span>
{{ card.author }}
</div>
{% endif %}
{% if card.metadata %}
{% if card.metadata or card.author %}
<dl class="card__metadata">
{% if card.author %}
<div class="card__author">
<dt class="visually-hidden">Written by: </dt>
<dd>{{ card.author }}</dd>
</div>
{% endif %}
{% if card.tag %}
<div class="card__metadatum">
<dt>
Expand Down

0 comments on commit b161108

Please sign in to comment.