Skip to content

Commit

Permalink
upate styling of small contributor badges
Browse files Browse the repository at this point in the history
  • Loading branch information
shiltemann committed Dec 20, 2024
1 parent e29d449 commit 1503f8c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
10 changes: 5 additions & 5 deletions _includes/contributor-badge.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
{%- else -%}
{%- assign contributor_badge_entity = site | fetch_contributor: include.id -%}
{%- assign name = contributor_badge_entity.short_name | default: contributor_badge_entity.name | default: include.id -%}
{% if include.small %}
<a href="{{ site.baseurl }}/hall-of-fame/{{ include.id }}/" class="contributor-badge contributor-{{ include.id }}">
{{ contributor_badge_entity | fetch_entity_avatar:include.id, 36 }}
{%- if include.small -%}
<a href="{{ site.baseurl }}/hall-of-fame/{{ include.id }}/" class="contributor-badge contributor-badge-small contributor-{{ include.id }}">
{{- contributor_badge_entity | fetch_entity_avatar:include.id, 36 -}}
</a>
{% else %}
{%- else -%}
<a href="{{ site.baseurl }}/hall-of-fame/{{ include.id }}/" class="contributor-badge contributor-{{ include.id }}">
{%- if contributor_badge_entity.orcid -%}<img src="{% link assets/images/orcid.png %}" alt="orcid logo" width="36" height="36"/>{%- endif -%}
{{ contributor_badge_entity | fetch_entity_avatar:include.id, 36 }}
Expand All @@ -16,5 +16,5 @@
{%- include _includes/contributor-human-icons.html activity=include.activity -%}
{%- endif -%}
</a>
{% endif %}
{%- endif -%}
{%- endif -%}
8 changes: 3 additions & 5 deletions _includes/news-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@
<div class="card-body d-flex flex-column">
<h5 class="card-title">{{n.title}}</h5>
<div class="card-text">
{% for id in n.contributions.authorship %}
{% include _includes/contributor-badge.html id=id small=true %}
{% endfor %}
<div class="text-muted">
{{ n.date | date: "%-d %B %Y" }}
<br/>
{% for id in n.contributions.authorship %}
{% include _includes/contributor-badge.html id=id small=true %}
{% endfor %}

</div>

<a href="{% if n.external %}{{ n.link }}{% else %}{{site.baseurl}}{{n.url}}{% endif %}">
Expand Down
5 changes: 5 additions & 0 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,11 @@ nav[data-toggle='toc'] {
}
}

.contributor-badge-small{
border: none;
padding-right: 0em;
}

.contributor-badge-inline {
/* prevent breaking across lines */
white-space: nowrap;
Expand Down

0 comments on commit 1503f8c

Please sign in to comment.