Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make video embeddings optional. #2337

Merged
merged 3 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _bibliography/papers.bib
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ @article{PhysRev.47.777
altmetric={248277},
dimensions={true},
google_scholar_id={qyhmnyLat1gC},
video={https://www.youtube-nocookie.com/embed/aqz-KE-bpKQ},
selected={true}
}

Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ enable_navbar_social: false # enables displaying social links in the navbar on t
enable_project_categories: true # enables categorization of projects into multiple categories
enable_medium_zoom: true # enables image zoom feature (as on medium.com)
enable_progressbar: true # enables a horizontal progress bar linked to the vertical scroll position
enable_video_embedding: false # enables video embedding for bibtex entries. If false, the button opens a the video link in a new window.
CheariX marked this conversation as resolved.
Show resolved Hide resolved

# -----------------------------------------------------------------------------
# Library versions
Expand Down
6 changes: 4 additions & 2 deletions _layouts/bib.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@
<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 %}
{% if entry.video and site.enable_video_embedding %}
<a class="abstract btn btn-sm z-depth-0" role="button">Video</a>
{% elsif entry.video %}
<a href="{{ entry.video }}" class="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>
Expand Down Expand Up @@ -297,7 +299,7 @@
</div>
{% endif %}

{% if entry.video %}
{% if entry.video and site.enable_video_embedding %}
<!-- Hidden video block -->
<div class="abstract hidden">
<div style="text-align: center;">{% include video.liquid path=entry.video class="img-fluid rounded z-depth-1" controls=true %}</div>
Expand Down