Skip to content

Commit

Permalink
feat: add author icon to resource card (resolves #214) (#216)
Browse files Browse the repository at this point in the history
* feat: add author icon to resource card

* fix: prevent separator from affecting line height
  • Loading branch information
Ned Zimmerman committed Jan 31, 2020
1 parent 0e5b296 commit bb37e9a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/assets/images/author.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/assets/styles/common/_todo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ input[type="file"] > input[type="button"]::-moz-focus-inner {
}

.separator {
padding-left: 0.325em;
vertical-align: super;
display: inline-block;
padding-left: 0.5ch;
text-indent: 0;
transform: translate(0, -0.5ch);
}
3 changes: 3 additions & 0 deletions src/components/01-atoms/01-icons/icons.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ module.exports = {
{
svg: 'share',
},
{
svg: 'author'
},
{
svg: 'edit',
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/02-molecules/01-card/card--resource.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="{{ href }}">{{ title | safe }}</a>
</h3>
{% if byline %}
<p class="card__byline">By {{ byline | safe }}</p>
<p class="card__byline">{% render '@svg', {svg:'author'}, true %} By {{ byline | safe }}</p>
{% endif %}
</header>
<aside class="card__aside">
Expand Down
2 changes: 1 addition & 1 deletion src/components/02-molecules/01-card/card.njk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% if format %}<span class="card__format">{{ format }}</span><span class="screen-reader-text">: </span>{% endif %}<a {% if externalLink %}rel="external" {% endif %}href="{{ href }}">{{ title | safe }}</a>
</h3>
{% if byline %}
<p class="card__byline">By {{ byline | safe }}</p>
<p class="card__byline">{% render '@svg', {svg:'author'}, true %} By {{ byline | safe }}</p>
{% endif %}
</header>
<aside class="card__aside">
Expand Down

0 comments on commit bb37e9a

Please sign in to comment.