Skip to content

Commit

Permalink
Highlight collaboration posts
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkudrna committed Apr 22, 2024
1 parent ddb266f commit 7613b82
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 3 deletions.
4 changes: 4 additions & 0 deletions assets/scss/styles/06-components/_article.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
margin-top: 0.25em; // 1.
}

.article__tags {
display: inline-flex;
}

.article__author {
max-width: 42rem;
margin-left: -0.15em; // 2.
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/styles/06-components/_label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
line-height: typography.line-height(medium);
}

.label--new {
.label--warning {
background-color: map.get(colors.$ui, warning);
}
4 changes: 4 additions & 0 deletions assets/scss/styles/10-utilities/_spacing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

// stylelint-disable declaration-no-important -- Only allow `!important` for utility classes.

.spacing-left-1 {
margin-left: 0.5em !important;
}

.spacing-right-1 {
margin-right: 0.5em !important;
}
Expand Down
2 changes: 1 addition & 1 deletion partials/navigation.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{{label}}
</a>
{{#has slug="slovnik"}}
<span class="navigation__tag label label--small label--new">nové</span>
<span class="navigation__tag label label--small label--warning">nové</span>
{{/has}}
</li>
{{/foreach}}
Expand Down
3 changes: 3 additions & 0 deletions partials/post-card.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
<div class="post-card__meta">
{{#has tag="count:>1"}}
{{tags from=2 to=2}}
{{#has tag="Spolupráce"}}
<a href="/tema/spoluprace" class="label label--warning spacing-left-1">Spolupráce</a>
{{/has}}
{{/has}}
{{reading_time minute=(t "1 min read") minutes=(t "% min read")}}
Expand Down
15 changes: 14 additions & 1 deletion post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,20 @@
{{date format="D. MMMM YYYY"}}
</time>
{{tags from=2}}
{{#if tags}}
<ul class="article__tags list-inline list-unstyled">
{{#foreach tags from="2"}}
<li>
<a
href="{{url}}"
{{#has slug="spoluprace"}}
class="label label--warning"
{{/has}}
>{{name}}</a>{{#unless @last}},{{/unless}}
</li>
{{/foreach}}
</ul>
{{/if}}
{{reading_time minute=(t "1 min read") minutes=(t "% min read")}}
</div>
Expand Down

0 comments on commit 7613b82

Please sign in to comment.