Added video button to bib entries (#2008)

When the video entry is added to bib:

e.g.,

```
{
...
video={https://www.youtube.com/embed/jNQXAC9IVRw}
...
}
```
A dedicated button appears for videos. When clicked, a playable video
appears under the research article (like abstracts and bibtex)
This commit is contained in:
Fares Abawi 2023-12-25 18:50:37 +01:00 committed by GitHub
parent 0795059a4b
commit 45bb74eb43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -302,7 +302,7 @@ enable_publication_badges:
dimensions: true # Dimensions badge (https://badge.dimensions.ai/)
# 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, altmetric]
filtered_bibtex_keywords: [abbr, abstract, arxiv, bibtex_show, html, pdf, selected, supp, blog, code, poster, video, slides, website, preview, altmetric]
# 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

View File

@ -164,6 +164,9 @@
<a href="{{ entry.supp | prepend: '/assets/pdf/' | relative_url }}" class="btn btn-sm z-depth-0" role="button">Supp</a>
{%- endif %}
{%- endif %}
{%- if entry.video %}
<a class="abstract btn btn-sm z-depth-0" role="button">Video</a>
{%- endif %}
{%- if entry.blog %}
<a href="{{ entry.blog }}" class="btn btn-sm z-depth-0" role="button">Blog</a>
{%- endif %}
@ -236,5 +239,13 @@
{% highlight bibtex %}{{ entry.bibtex | hideCustomBibtex }}{% endhighlight %}
</div>
{%- endif %}
{% if entry.video -%}
<!-- Hidden video block -->
<div class="abstract hidden">
<div style="text-align: center;">{% include video.html path=entry.video class="img-fluid rounded z-depth-1" controls=true %}</div>
</div>
{%- endif -%}
</div>
</div>