Skip to content

Commit

Permalink
Stylistic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alshedivat committed Aug 6, 2022
1 parent e826799 commit 59382fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
8 changes: 4 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ scholar:
# Filter out certain bibtex entry keywords used internally from the bib output
filtered_bibtex_keywords: [abbr, abstract, arxiv, bibtex_show, html, pdf, selected, supp, blog, code, poster, slides, website, preview]

# Maximum number of authors to be shown, other authors will be visible on hover, leave blank to show all authors
max_author_limit: 3
# Show "and" before "more authors", otherwise before the last author
max_author_separated: true
# Maximum number of authors to be shown for each publication (more authors are visible on click)
max_author_limit: 3 # leave blank to always show all authors
more_authors_animation_delay: 10 # more authors are revealed on click using animation; smaller delay means faster animation


# -----------------------------------------------------------------------------
# Responsive WebP Images
Expand Down
19 changes: 6 additions & 13 deletions _layouts/bib.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,19 @@
{%- endfor -%}
{%- assign more_authors = author_array_size | minus: author_array_limit -%}

{%- if author_array_limit == 0 -%}
{%- assign more_authors_hide = more_authors | append: " more author" -%}
{%- else -%}
{%- assign more_authors_hide = ", and " | append: more_authors | append: " more author" -%}
{%- endif -%}
{%- assign more_authors_hide = more_authors | append: " more author" -%}
{%- if more_authors > 0 -%}
{%- if more_authors > 1 -%}
{%- assign more_authors_hide = more_authors_hide | append: "s" -%}
{%- endif -%}
{%- assign more_authors_show = '' -%}
{%- for author in entry.author_array offset: author_array_limit -%}
{%- if forloop.first and site.max_author_separated -%}
{%- assign more_authors_show = more_authors_show | append: " and " -%}
{%- elsif forloop.last and site.max_author_separated == false -%}
{%- assign more_authors_show = more_authors_show | append: ", and " -%}
{%- else -%}
{%- assign more_authors_show = more_authors_show | append: ", " -%}
{%- endif -%}
{%- assign more_authors_show = more_authors_show | append: author.first | append: " " | append: author.last -%}
{%- unless forloop.last -%}
{%- assign more_authors_show = more_authors_show | append: ", " -%}
{%- endunless -%}
{%- endfor -%}
, and
<span
class="more-authors"
title="click to view {{more_authors_hide}}"
Expand All @@ -101,7 +94,7 @@
if (++cursorPosition == more_authors_text.length){
clearInterval(textAdder);
}
}, 15);
}, '{{site.more_authors_animation_delay}}');
"
>{{more_authors_hide}}</span>
{%- endif -%}
Expand Down

0 comments on commit 59382fc

Please sign in to comment.