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

Highlight collaboration posts #142

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading