diff --git a/_layouts/bib.liquid b/_layouts/bib.liquid index d9165533567b..f10c155fc7cb 100644 --- a/_layouts/bib.liquid +++ b/_layouts/bib.liquid @@ -1,331 +1,226 @@ --- --- +
- {% if site.enable_publication_thumbnails %} -
- {%- if entry.abbr -%} - {%- if site.data.venues[entry.abbr] -%} - {% assign venue_style = null %} - {% if site.data.venues[entry.abbr].color != blank %} - {% assign venue_style = site.data.venues[entry.abbr].color | prepend: 'style="background-color:' | append: '"' %} - {%- endif -%} - - {% if site.data.venues[entry.abbr].url %} - {{ entry.abbr }} - {% else %} -
{{- entry.abbr -}}
- {% endif %} -
- {% else %} - {{ entry.abbr }} - {% endif %} - {% endif %} - {% if entry.preview %} - {% if entry.preview contains '://' %} - - {% else %} - {% assign entry_path = entry.preview | prepend: '/assets/img/publication_preview/' %} - {% - include figure.liquid - loading="eager" - path=entry_path - sizes = "200px" - class="preview z-depth-1 rounded" - zoomable=true - alt=entry.preview - %} - {% endif %} - {% endif %} -
- {% endif %} + + +
+ {%- if entry.abbr -%} + {%- if site.data.venues[entry.abbr] -%} + {%- assign venue_style = nil -%} + {%- if site.data.venues[entry.abbr].color != blank -%} + {%- assign venue_style = site.data.venues[entry.abbr].color | prepend: 'style="background-color:' | append: '"' -%} + {%- endif -%} + {{entry.abbr}} + {%- else -%} + {{entry.abbr}} + {%- endif -%} + {%- endif -%} + {%- if entry.preview -%} + {% if entry.preview contains '://' -%} + + {%- else -%} + + {%- endif -%} + {%- endif -%} +
-
+
+ {% if entry.type == "thesis" -%} + {{reference}} + {%- else %} -
{{ entry.title }}
+
{{entry.title}}
- {% assign author_array_size = entry.author_array | size %} + {% assign author_array_size = entry.author_array | size %} - {% assign author_array_limit = author_array_size %} - {% if site.max_author_limit and author_array_size > site.max_author_limit %} - {% assign author_array_limit = site.max_author_limit %} - {% endif %} + {% assign author_array_limit = author_array_size %} + {%- if site.max_author_limit and author_array_size > site.max_author_limit %} + {% assign author_array_limit = site.max_author_limit %} + {% endif %} - {%- for author in entry.author_array limit: author_array_limit -%} - {% assign author_is_self = false %} - {%- assign author_last_name = author.last | remove: '¶' | remove: '&' | remove: '*' | remove: '†' | remove: '^' -%} - {%- if site.scholar.last_name contains author_last_name -%} - {%- if site.scholar.first_name contains author.first -%} - {%- assign author_is_self = true -%} - {%- endif -%} - {%- endif -%} - {% assign coauthor_url = null %} - {%- assign clean_last_name = author_last_name | downcase | remove_accents -%} - {% if site.data.coauthors[clean_last_name] %} - {%- for coauthor in site.data.coauthors[clean_last_name] -%} - {% if coauthor.firstname contains author.first %} - {%- assign coauthor_url = coauthor.url -%} - {% break %} - {% endif %} - {% endfor %} + {%- for author in entry.author_array limit: author_array_limit -%} + {%- assign author_is_self = false -%} + {%- assign author_last_name = author.last | remove: "¶" | remove: "&" | remove: "*" | remove: "†" | remove: "^" -%} + {%- if site.scholar.last_name contains author_last_name -%} + {%- if site.scholar.first_name contains author.first -%} + {%- assign author_is_self = true -%} {%- endif -%} + {%- endif -%} + {%- assign coauthor_url = nil -%} + {%- if site.data.coauthors[author_last_name] -%} + {%- for coauthor in site.data.coauthors[author_last_name] -%} + {%- if coauthor.firstname contains author.first -%} + {%- assign coauthor_url = coauthor.url -%} + {%- break -%} + {%- endif -%} + {%- endfor -%} + {%- endif -%} - {%- if forloop.length > 1 -%} - {% if forloop.first == false %}, {% endif %} - {%- if forloop.last and author_array_limit == author_array_size %}and {% endif -%} - {% endif %} - {%- if author_is_self -%} - {{- author.first }} {{ author.last -}} + {%- if forloop.length > 1 -%} + {%- if forloop.first == false -%}, {%- endif -%} + {%- if forloop.last and author_array_limit == author_array_size -%}and {%- endif -%} + {%- endif -%} + {%- if author_is_self -%} + {{author.first}} {{author.last}} + {%- else -%} + {%- if coauthor_url -%} + {{author.first}} {{author.last}} {%- else -%} - {%- if coauthor_url -%} - - {{- author.first }} - {{ author.last -}} - - {%- else -%} - {{- author.first }} - {{ author.last -}} - {% endif %} + {{author.first}} {{author.last}} {%- endif -%} - {% endfor %} - {%- assign more_authors = author_array_size | minus: author_array_limit -%} + {%- endif -%} + {%- endfor -%} + {%- assign more_authors = author_array_size | minus: author_array_limit -%} - {%- 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 -%} - {% 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 - 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 -%} + {%- 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 + - {{- more_authors_hide -}} - - {% endif %} + >{{more_authors_hide}} + {%- endif -%} +
- {% assign proceedings = 'inproceedings,incollection' | split: ',' %} - {% assign thesis = 'thesis,mastersthesis,phdthesis' | split: ',' %} - {% if entry.type == 'article' %} - {% capture entrytype %}{{entry.journal}}{% endcapture %} - {% elsif proceedings contains entry.type %} - {% capture entrytype %}In {{entry.booktitle}} {% endcapture %} - {% elsif thesis contains entry.type %} - {% capture entrytype %}{{entry.school}} {% endcapture %} - {% else %} - {% capture entrytype %}{% endcapture %} - {% endif %} - {% if entry.month %} - {% capture entrymonth %}{{ " " }}{{ entry.month | capitalize }}{% endcapture %} - {% endif %} - {% if entry.year %} - {% capture entryyear %}{{ " " }}{{entry.year}}{% endcapture %} - {% endif %} - {% if entry.location %} - {% capture entrytype %}{{entrytype}}{{ ", " }}{{entry.location}}{% endcapture %} - {% endif -%} - {% if entry.additional_info %} - {% capture entrytype %}{{entrytype}}{{entry.additional_info | markdownify | remove: '

' | remove: '

' }}{% endcapture %} - {% endif %} - {% capture hook_exists %}{% file_exists _includes/hook/bib.liquid %}{% endcapture %} - {% if hook_exists == 'true' %} - {% include hook/bib.liquid %} - {% endif %} - {% assign entrytype_text = entrytype | strip_html | strip %} - {% capture periodical %}{{ entrytype }}{% if entrytype_text != "" and entryyear != "" %}, {% endif %}{{ entrymonth }}{{ entryyear }}{% endcapture %} + {% if entry.type == "article" -%} + {%- capture entrytype -%}{{entry.journal}}{%- endcapture -%} + {%- elsif ["inproceedings", "incollection"] contains entry.type -%} + {%- capture entrytype -%}In {{entry.booktitle}} {%- endcapture -%} + {%- else -%} + {%- capture entrytype -%}{%- endcapture -%} + {%- endif -%} + {%- if entry.month -%} + {%- capture entrymonth -%}{{ " " }}{{ entry.month | capitalize }}{%- endcapture -%} + {%- endif -%} + {%- if entry.year -%} + {%- capture entryyear -%}{{ " " }}{{entry.year}}{%- endcapture -%} + {%- endif -%} + {%- capture periodical -%}{{ entrytype }}{{ entrymonth }}{{ entryyear }}{%- endcapture -%}
{{ periodical | strip }}
-
- {{ entry.note | strip }} -
+ {%- endif %} - {% if site.enable_publication_badges %} - {% assign entry_has_altmetric_badge = entry.altmetric or entry.doi or entry.eprint or entry.pmid or entry.isbn %} - {% assign entry_has_dimensions_badge = entry.dimensions or entry.doi or entry.pmid %} - {% assign entry_has_google_scholar_badge = entry.google_scholar_id %} - {% if entry_has_altmetric_badge or entry_has_dimensions_badge or entry_has_google_scholar_badge %} -
- {% if site.enable_publication_badges.altmetric and entry_has_altmetric_badge %} - - {% endif %} - {% if site.enable_publication_badges.dimensions and entry_has_dimensions_badge %} - - {% endif %} - {% if site.enable_publication_badges.google_scholar and entry_has_google_scholar_badge %} - - {% google_scholar_citations site.scholar_userid entry.google_scholar_id %} Google Scholar citations - - {% endif %} -
- {% endif %} - {% endif %} - - {% if entry.award %} - - - {% endif %} - {% if entry.abstract %} - - - {% endif %} + {% if entry.abstract -%} + + + {%- endif -%} - {% if entry.bibtex_show %} - - - {% endif %} + {% if entry.tldr -%} + + + {%- endif -%} - {% if entry.video and site.enable_video_embedding %} - - - {% endif %} + {% if entry.bibtex_show -%} + + + {%- endif %}