From 1503f8c5406e06609fd67cfcffd0ad145eec08bf Mon Sep 17 00:00:00 2001 From: Saskia Hiltemann Date: Fri, 20 Dec 2024 11:59:42 +0100 Subject: [PATCH] upate styling of small contributor badges --- _includes/contributor-badge.html | 10 +++++----- _includes/news-card.html | 8 +++----- assets/css/main.scss | 5 +++++ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/_includes/contributor-badge.html b/_includes/contributor-badge.html index 02b68829c51e89..fa94c6b7552174 100644 --- a/_includes/contributor-badge.html +++ b/_includes/contributor-badge.html @@ -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 %} - - {{ contributor_badge_entity | fetch_entity_avatar:include.id, 36 }} + {%- if include.small -%} + + {{- contributor_badge_entity | fetch_entity_avatar:include.id, 36 -}} - {% else %} + {%- else -%} {%- if contributor_badge_entity.orcid -%}orcid logo{%- endif -%} {{ contributor_badge_entity | fetch_entity_avatar:include.id, 36 }} @@ -16,5 +16,5 @@ {%- include _includes/contributor-human-icons.html activity=include.activity -%} {%- endif -%} - {% endif %} + {%- endif -%} {%- endif -%} diff --git a/_includes/news-card.html b/_includes/news-card.html index af2bfcd825d662..6e09585cb59321 100644 --- a/_includes/news-card.html +++ b/_includes/news-card.html @@ -28,13 +28,11 @@
{{n.title}}
+ {% for id in n.contributions.authorship %} + {% include _includes/contributor-badge.html id=id small=true %} + {% endfor %}
{{ n.date | date: "%-d %B %Y" }} -
- {% for id in n.contributions.authorship %} - {% include _includes/contributor-badge.html id=id small=true %} - {% endfor %} -
diff --git a/assets/css/main.scss b/assets/css/main.scss index 686ae4b333bbf2..e414dab75ee7de 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -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;