diff --git a/README.md b/README.md index 30bc3a3..ce1ed41 100644 --- a/README.md +++ b/README.md @@ -112,13 +112,15 @@ content: affiliation: name: University Name department: Department Name - url: https://example.com + url: https://example.com # (optional) type: Paper authors: - name: First Author - url: https://example.com + url: https://example.com # (optional) + img: /path/to/author-image.jpg # (optional) - name: Second Author - url: https://example.com + url: https://example.com # (optional) + img: /path/to/author-image.jpg # (optional) links: - label: Paper Link url: https://doi.org/10.1145/XXXXXXX.XXXXXXX diff --git a/_includes/author.html b/_includes/author.html new file mode 100644 index 0000000..aeb7934 --- /dev/null +++ b/_includes/author.html @@ -0,0 +1,14 @@ + + {%- if author.img -%} + + {%- endif -%} + {%- if author.url -%} + {{ author.name | escape }} + {%- else -%} + {{ author.name | escape }} + {%- endif -%} + diff --git a/_includes/home-header.html b/_includes/home-header.html index 8226a63..78e46ca 100644 --- a/_includes/home-header.html +++ b/_includes/home-header.html @@ -1,46 +1,50 @@

{{ site.title }}

{% if site.content.authors %} -

- {%- for author in site.content.authors -%} {%- if forloop.first -%} - {{ author.name | escape }} - {%- elsif forloop.last -%} {%- if forloop.length > 1 -%} & {% endif - -%} - {{ author.name | escape }} - {%- else -%} , - {{ author.name | escape }} - {%- endif -%} {%- endfor -%} -

- {% endif %} {% if site.content.affiliation %} -

- {{ site.content.affiliation.department }}, {{ site.content.affiliation.name }} -

+

+ {%- for author in site.content.authors -%} + {%- if forloop.first -%} + {% include author.html author=author %} + {%- elsif forloop.last -%} + {%- if forloop.length > 1 -%} +  &  + {%- endif -%} + {% + include author.html + author=author + %} + {%- elsif forloop.last -%} + {%- else -%} + , {% include author.html author=author %} + {%- elsif forloop.last -%} + {%- endif -%} + {% endfor -%} +

+ {% endif %} + {% if site.content.affiliation %} +

+ + {{- site.content.affiliation.department -}}, {{ site.content.affiliation.name }} +

{% endif %}
-
+
diff --git a/_sass/layout/_home-header.scss b/_sass/layout/_home-header.scss index 9282e69..69068bc 100644 --- a/_sass/layout/_home-header.scss +++ b/_sass/layout/_home-header.scss @@ -23,6 +23,30 @@ .authors { margin-bottom: $spacing * 4; + display: flex; + flex-wrap: wrap; + gap: $spacing 0; + + .author:first-child, + .author:last-child { + margin-left: 0; + } + + .author { + display: flex; + align-items: center; + gap: $spacing; + margin-left: $spacing; + } + + .author-img { + width: 6 * $spacing; + height: 6 * $spacing; + border-radius: 50%; + object-fit: cover; + object-position: center; + display: inline-block; + } } }