Skip to content

Commit

Permalink
Fix video links (#130)
Browse files Browse the repository at this point in the history
* fix video links

* open video links in a new tab

* fix

* Update learnindex.json

* fix
  • Loading branch information
mikatuo authored Oct 13, 2024
1 parent f7f24b2 commit c25b91f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions _includes/youtube_card.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class='card left compact clickable'>
<div class="center" style="padding-bottom: 1em;">
<iframe width="100%" src="{{ include.link }}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe width="100%" src="{{ include.embed }}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
<div>
<a href="{{ include.link }}"><h5>{{ include.title }}</h5></a>
<a href="{{ include.link }}" target="_blank"><h5>{{ include.title }}</h5></a>
{%- if include.author -%}<p style="font-size: small">{{ include.author }}</p>{%- endif -%}
<a href="{{ include.link }}"><p style="font-size: small">{{ include.description }}</p></a>
<a href="{{ include.link }}" target="_blank"><p style="font-size: small">{{ include.description }}</p></a>
</div>
</div>
2 changes: 1 addition & 1 deletion _layouts/learn.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h3>Videos</h3>
</div>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); grid-gap: 2rem; padding: 0px;">
{%- for video in site.data.learnindex.navigation.videos limit:3 -%}
{% include youtube_card.html title=video.name description=video.description link=video.path author=video.author min-height="250px" image="/images/icons/yt_icon_rgb.svg" %}
{% include youtube_card.html title=video.name description=video.description embed=video.embed link=video.path author=video.author min-height="250px" image="/images/icons/yt_icon_rgb.svg" %}
{%- endfor -%}
</div>
<div class="row">
Expand Down
4 changes: 2 additions & 2 deletions videos.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ <h3>Videos</h3>
{%- assign videos = site.data.learnindex.navigation.videos | where: "author", author -%}
<h3>{{ author }}</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); grid-gap: 2rem; padding: 0px;">
{%- for tutorial in videos -%}
{% include youtube_card.html title=tutorial.name description=tutorial.description link=tutorial.path author=tutorial.author min-height="250px" image="/images/icons/yt_icon_rgb.svg" %}
{%- for video in videos -%}
{% include youtube_card.html title=video.name description=video.description embed=video.embed link=video.path author=video.author min-height="250px" image="/images/icons/yt_icon_rgb.svg" %}
{%- endfor -%}
</div>
{%- endfor -%}
Expand Down

0 comments on commit c25b91f

Please sign in to comment.