forked from finga/onders.org_zola_theme
Create a theme out of my page
This commit is contained in:
commit
c3fd40c135
22 changed files with 452 additions and 0 deletions
67
templates/shortcodes/gallery.html
Normal file
67
templates/shortcodes/gallery.html
Normal file
|
@ -0,0 +1,67 @@
|
|||
<div class="gallery is-flex is-flex-wrap-wrap">
|
||||
{% for path in images %}
|
||||
{% if section %}
|
||||
{% set full_path = section.path ~ path %}
|
||||
{% endif %}
|
||||
{% if page %}
|
||||
{% set full_path = page.path ~ path %}
|
||||
{% endif %}
|
||||
{% set thumb = resize_image(path=full_path, width=120, height=120) %}
|
||||
|
||||
<div class="gallery-item">
|
||||
<a href="#{{ path }}">
|
||||
<img src="{{ thumb.url }}" class="thumbnail" />
|
||||
</a>
|
||||
<div class="lightbox has-text-centered" id="{{ path }}">
|
||||
{% if images | length > 1 %}
|
||||
<span class="spacer"></span>
|
||||
{% if loop.first %}
|
||||
<a href="#{{ images | nth(n=images | length - 1) }}" class="lightbox-nav-previous">
|
||||
⟳
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="#{{ images | nth(n=loop.index0 - 1) }}" class="lightbox-nav-previous">
|
||||
<
|
||||
</a>
|
||||
{% endif %}
|
||||
<img src="{{ path }}" />
|
||||
<a class="delete is-large" href="#"></a>
|
||||
{% if loop.last %}
|
||||
<a href="#{{ images | nth(n=0) }}" class="lightbox-nav-next">
|
||||
⟲
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="#{{ images | nth(n=loop.index) }}" class="lightbox-nav-next">
|
||||
>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="#" class="close">
|
||||
<span class="spacer"></span>
|
||||
<img src="{{ path }}" />
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if images | length > 1 %}
|
||||
{% if loop.first %}
|
||||
<a href="#{{ images | nth(n=images | length - 1) }}" class="is-desktop">
|
||||
<span class="lightbox-previous"></span>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="#{{ images | nth(n=loop.index0 - 1) }}" class="is-desktop">
|
||||
<span class="lightbox-previous"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if loop.last %}
|
||||
<a href="#{{ images | nth(n=0) }}" class="is-desktop">
|
||||
<span class="lightbox-next"></span>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="#{{ images | nth(n=loop.index) }}" class="is-desktop">
|
||||
<span class="lightbox-next"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
19
templates/shortcodes/modal.html
Normal file
19
templates/shortcodes/modal.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{% if section %}
|
||||
{% set full_path = section.path ~ path %}
|
||||
{% endif %}
|
||||
{% if page %}
|
||||
{% set full_path = page.path ~ path %}
|
||||
{% endif %}
|
||||
{% set thumb = resize_image(path=full_path, width=400, height=400, op="fit") %}
|
||||
|
||||
<div class="item">
|
||||
<a href="#{{ path }}">
|
||||
<img src="{{ thumb.url }}"/>
|
||||
</a>
|
||||
<div class="lightbox image has-text-centered" id="{{ path }}">
|
||||
<a href="#" class="close">
|
||||
<span class="spacer"></span>
|
||||
<img src="{{ path }}" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
4
templates/shortcodes/video.html
Normal file
4
templates/shortcodes/video.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<video width="512" height="288" controls>
|
||||
<source src="{{ path }}" type="video/webm">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
1
templates/shortcodes/youtube.html
Normal file
1
templates/shortcodes/youtube.html
Normal file
|
@ -0,0 +1 @@
|
|||
<iframe src="{{ url }}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
Loading…
Add table
Add a link
Reference in a new issue