mirror of
https://github.com/ParkerTenBroeck/ParkerTenBroeck.github.io.git
synced 2026-06-06 21:14:06 -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
|
|
@ -1,16 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% import "macros/post.html" as post %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="blog-page">
|
||||
<div class="title">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<p><time>{{page.date}}</time>
|
||||
{% if page.taxonomies %}{% if page.taxonomies.tags %}
|
||||
{% for tag in page.taxonomies.tags %} • #{{tag}} {% endfor %}
|
||||
{% endif %}{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{{ post::page_title(page=page) }}
|
||||
{{ page.content | safe }}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% import "macros/post.html" as posts %}
|
||||
{% import "macros/post.html" as post %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
|
||||
<div class="blog">
|
||||
{% for page in section.pages %}
|
||||
{{ posts::excerpt(page=page) }}
|
||||
{{ post::excerpt(page=page) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
16
templates/gallery.html
Normal file
16
templates/gallery.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
|
||||
{% block main %}
|
||||
|
||||
<br><br>
|
||||
<div class="gallery">
|
||||
{% for page in section.pages -%}
|
||||
{% set image = resize_image(path=page.extra.picture_src, width=260*2, height=180*2, op="fit_width") %}
|
||||
<a href="{{ page.permalink }}">
|
||||
<img src="{{ image.url }}" />
|
||||
</a>
|
||||
{%- endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock main %}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% import "macros/post.html" as posts %}
|
||||
{% import "macros/post.html" as post %}
|
||||
|
||||
{% block main %}
|
||||
<p>
|
||||
|
|
@ -20,17 +20,15 @@
|
|||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<p>Heres a list of stuff I'd like you to checkout:</p>
|
||||
<ul>
|
||||
<li>{{ posts::page_link(path="projects/automata.md") }}</li>
|
||||
<li>{{ posts::page_link(path="projects/software-renderer.md") }}</li>
|
||||
<li>{{ posts::page_link(path="projects/ansi.md") }}</li>
|
||||
<li>{{ posts::page_link(path="projects/generators.md") }}</li>
|
||||
<li>{{ posts::page_link(path="projects/fastexpr.md") }}</li>
|
||||
<li>{{ posts::page_link(path="projects/kernel.md") }}</li>
|
||||
<li>{{ posts::page_link(path="blog/first.md") }}</li>
|
||||
<li>{{ post::page_link(path="projects/automata.md") }}</li>
|
||||
<li>{{ post::page_link(path="projects/rasterizer/index.md") }}</li>
|
||||
<li>{{ post::page_link(path="projects/ansi.md") }}</li>
|
||||
<li>{{ post::page_link(path="projects/generators.md") }}</li>
|
||||
<li>{{ post::page_link(path="projects/fastexpr.md") }}</li>
|
||||
<li>{{ post::page_link(path="projects/kernel/index.md") }}</li>
|
||||
<li>{{ post::page_link(path="blog/first.md") }}</li>
|
||||
</ul>
|
||||
|
||||
{% endblock main %}
|
||||
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 %}
|
||||
9
templates/picture.html
Normal file
9
templates/picture.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% import "macros/post.html" as post %}
|
||||
{% import "macros/figures.html" as figures %}
|
||||
|
||||
{% block main %}
|
||||
{{ post::page_title(page=page) }}
|
||||
{{ figures::image(src=page.extra.picture_src, caption=page.description) }}
|
||||
{% endblock main %}
|
||||
|
|
@ -1,6 +1,2 @@
|
|||
<figure class="{% if class %} {{ class }} {% endif %}">
|
||||
<img src="{{ get_url(path=src) }}" loading="lazy" decoding="async" class="zoomable">
|
||||
{% if caption != "" %}
|
||||
<figcaption>{{ caption }}</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
{% import "macros/figures.html" as figures %}
|
||||
{{ figures::image(src=src, caption=caption) }}
|
||||
|
|
@ -1,17 +1,9 @@
|
|||
<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
|
||||
>
|
||||
<source src="{{ get_url(path=src) }}">
|
||||
</video>
|
||||
{% if caption != "" %}
|
||||
<figcaption>{{ caption }}</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
|
||||
{% import "macros/figures.html" as figures %}
|
||||
{{ figures::video(
|
||||
src=src,
|
||||
caption=caption,
|
||||
loop=loop | default(value=false),
|
||||
controls=controls | default(value=true),
|
||||
autoplay=autoplay | default(value=false),
|
||||
poster=poster | default(value=""))
|
||||
}}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% import "macros/taxonomy.html" as macros %}
|
||||
{% import "macros/post.html" as posts %}
|
||||
|
||||
{% import "macros/post.html" as post %}
|
||||
{% import "macros/taxonomy.html" as taxonomy %}
|
||||
{% import "macros/feed.html" as feed_macros %}
|
||||
|
||||
{%- block title -%}
|
||||
|
|
@ -27,10 +28,10 @@
|
|||
|
||||
{%- block main -%}
|
||||
|
||||
<h1>{{ macros::prettify(term=term.name) }}</h1>
|
||||
<h1>{{ taxonomy::prettify(term=term.name) }}</h1>
|
||||
<div>
|
||||
{%- for page in paginator.pages | default(value=term.pages) %}
|
||||
{{ posts::excerpt(page=page) }}
|
||||
{{ post::excerpt(page=page) }}
|
||||
{%- endfor %}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue