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 def48d39b62b02..6e09585cb59321 100644 --- a/_includes/news-card.html +++ b/_includes/news-card.html @@ -1,4 +1,3 @@ -
{% assign n = include.news %} {% if n.cover %} @@ -18,38 +17,46 @@ {% assign coverimagealt = "GTN logo with a multi-coloured star and the words Galaxy Training Network" %} {% endif %} -
- -
-
- {{ coverimagealt }} -
-
-
- -
- {{ n.date | date: "%-d %B %Y" }} + +
+
+ +
+ {{ coverimagealt }} +
+
+
+
{{n.title}}
+
+ {% for id in n.contributions.authorship %} + {% include _includes/contributor-badge.html id=id small=true %} + {% endfor %} +
+ {{ n.date | date: "%-d %B %Y" }} +
+ + + + {% if n.external %} + This is an external post, please follow the link to read it. + {% else %} + {{ n.excerpt | strip_html }} + {% endif %} + +
- {% include _includes/contributors-line.html page=n %} +
+ + -
-
+
+ +
-
+ + diff --git a/assets/css/main.scss b/assets/css/main.scss index d340dcb5e67dc4..e414dab75ee7de 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -774,7 +774,7 @@ blockquote { vertical-align: center; } .card-title{ - height: 5rem; + height: 6rem; } .card-header { background: var(--brand-color); @@ -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; diff --git a/news.md b/news.md index 1cc67a73fa4bf2..bb2c769038854c 100644 --- a/news.md +++ b/news.md @@ -7,12 +7,13 @@ Keep an eye on this page for the latest news around the GTN. New tutorials, GTN Want to add your own news here (e.g. new tutorial, event, publication, anything else training related)? Check out how to do that in [this FAQ]({% link faqs/gtn/gtn_news_create_post.md %}) -
-{% for n in site.categories['news'] %} +
+{% for n in site.categories['news'] %} {% include _includes/news-card.html news=n %} {% endfor %} +