Skip to content

Commit e2b1b3d

Browse files
fabawimattleblanc
authored andcommitted
Added video button to bib entries (alshedivat#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)
1 parent 74f5196 commit e2b1b3d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

_layouts/bib.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@
164164
<a href="{{ entry.supp | prepend: '/assets/pdf/' | relative_url }}" class="btn btn-sm z-depth-0" role="button">Supp</a>
165165
{%- endif %}
166166
{%- endif %}
167+
{%- if entry.video %}
168+
<a class="abstract btn btn-sm z-depth-0" role="button">Video</a>
169+
{%- endif %}
167170
{%- if entry.blog %}
168171
<a href="{{ entry.blog }}" class="btn btn-sm z-depth-0" role="button">Blog</a>
169172
{%- endif %}
@@ -236,5 +239,13 @@
236239
{% highlight bibtex %}{{ entry.bibtex | hideCustomBibtex }}{% endhighlight %}
237240
</div>
238241
{%- endif %}
242+
243+
{% if entry.video -%}
244+
<!-- Hidden video block -->
245+
<div class="abstract hidden">
246+
<div style="text-align: center;">{% include video.html path=entry.video class="img-fluid rounded z-depth-1" controls=true %}</div>
247+
</div>
248+
{%- endif -%}
249+
239250
</div>
240251
</div>

0 commit comments

Comments
 (0)