mirror of
https://github.com/ParkerTenBroeck/ParkerTenBroeck.github.io.git
synced 2026-06-07 05:18:40 -04:00
added pictures/gallery. organized media better
This commit is contained in:
parent
b0d420c311
commit
4886fa19c9
65 changed files with 318 additions and 112 deletions
31
templates/macros/figures.html
Normal file
31
templates/macros/figures.html
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{% macro image(src, caption, class="") %}
|
||||
<figure class="{% if class %} {{ class }} {% endif %}">
|
||||
<img src="{{ get_url(path=src) }}" loading="lazy" alt="{{caption | default(value='')}}" decoding="async" class="zoomable">
|
||||
{% if caption != "" %}
|
||||
<figcaption>{{ caption | markdown() | safe }}</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
|
||||
{% macro video(src, caption, loop=false, controls=true, autoplay=false, poster="", class="") %}
|
||||
<figure class="{% if class %} {{ class }} {% endif %}">
|
||||
<video
|
||||
{% if poster %} poster="{{ poster }}"{% endif %}
|
||||
{% if loop | default(value=false) %} loop {% endif %}
|
||||
{% if controls | default(value=true) %} controls {% endif %}
|
||||
preload="metadata"
|
||||
muted
|
||||
{% if autoplay | default(value=false) %} autoplay {% endif %}
|
||||
playsinline
|
||||
alt="{{caption | default(value='')}}"
|
||||
>
|
||||
<source src="{{ get_url(path=src) }}">
|
||||
</video>
|
||||
{% if caption != "" %}
|
||||
<figcaption>{{ caption | markdown() | safe }}</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
|
||||
{% endmacro %}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{% macro figure(src, caption="", class="") %}
|
||||
<figure class="image {{ class }}">
|
||||
<img src="{{ src }}" loading="lazy" decoding="async">
|
||||
{% if caption != "" %}
|
||||
<figcaption>{{ caption }}</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
{% endmacro %}
|
||||
|
|
@ -1,29 +1,36 @@
|
|||
{%- macro excerpt(page) -%}
|
||||
{% macro tags(page) %}
|
||||
{% if page.taxonomies %}{% if page.taxonomies.tags %}
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
{% set url = get_taxonomy_url(kind="tags", name=tag, lang=page.lang) %}
|
||||
• <a href = "{{url}}">#{{tag}}</a>
|
||||
{% endfor %}
|
||||
{% endif %}{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro excerpt(page) %}
|
||||
<article class="excerpt">
|
||||
<h1><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h1>
|
||||
<p><time>{{page.date | date(format="%b %d, %Y")}}</time>
|
||||
{% if page.taxonomies %}{% if page.taxonomies.tags %}
|
||||
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
{% set url = get_taxonomy_url(kind="tags", name=tag, lang=page.lang) %}
|
||||
• <a href = "{{url}}">#{{tag}}</a>
|
||||
{% endfor %}
|
||||
{% endif %}{% endif %}
|
||||
</p>
|
||||
<p><time datetime="{{ page.date }}">{{page.date | date(format="%b %d, %Y")}}</time>{{self::tags(page=page)}}</p>
|
||||
<div class="description">
|
||||
{{page.description | markdown | safe}}
|
||||
</div>
|
||||
<a href="{{ page.permalink }}">Read more -></a>
|
||||
</article>
|
||||
{%- endmacro -%}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro page_link(path) %}
|
||||
{% set p = get_page(path=path) %}
|
||||
<a href="{{ p.permalink }}">{{ p.title }}</a>
|
||||
{% if p.date %}
|
||||
<time datetime="{{ p.date }}">
|
||||
{{ p.date | date(format="%b %d, %Y") }}
|
||||
</time>
|
||||
<time datetime="{{ p.date }}">{{ p.date | date(format="%b %d, %Y") }}</time>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro page_title(page) %}
|
||||
<div class="title">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<p><time>{{page.date}}</time>{{self::tags(page=page)}}</p>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue