init repo
This commit is contained in:
BIN
templates/.blog-page.html.kate-swp
Normal file
BIN
templates/.blog-page.html.kate-swp
Normal file
Binary file not shown.
9
templates/apropos.html
Normal file
9
templates/apropos.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1 class="title is-1">{{page.title}}</h1>
|
||||
<div class="content">
|
||||
{{page.content | safe}}
|
||||
|
||||
{% endblock content %}
|
||||
105
templates/base.html
Normal file
105
templates/base.html
Normal file
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Un périple à vélo</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link href="{{ get_url(path="blog.css",
|
||||
trailing_slash=false) }}" rel="stylesheet">
|
||||
<link href="{{ get_url(path="custom.css",
|
||||
trailing_slash=false) }}" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar is-fixed-top" role="navigation" aria-label="main navigation">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item" href="{{ config.base_url }}">
|
||||
<img src="{{ get_url(path="img/lantern.png",
|
||||
trailing_slash=false) }}" height="28">
|
||||
</a>
|
||||
|
||||
<a role="button" class="navbar-burger" data-target="navMenu" aria-label="menu" aria-expanded="false" id=navbarburger>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-menu" id="navMenu">
|
||||
{% for taxonomy in config.taxonomies%}
|
||||
{% set tax = get_taxonomy(kind=taxonomy.name) %}
|
||||
<div class="navbar-item is-hoverable">
|
||||
{% for term in tax.items %}
|
||||
<a class="navbar-item" href="{{ term.permalink }}">
|
||||
{{ term.name }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="navbar-end">
|
||||
<div class="navbar-item">
|
||||
<a class="navbar-item icon-text" href="https://framacarte.org/fr/map/anonymous-edit/151005:gg1Ly0MSdmpgSMu22dhGrih5bKR-mw--JqcLBDpWND0">
|
||||
<span class="icon">
|
||||
<i class="fas fa-map"></i>
|
||||
</span>
|
||||
<span>
|
||||
La carte
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<div>
|
||||
<div style="margin: 100px"></div>
|
||||
|
||||
{% block header %}
|
||||
{% endblock %}
|
||||
|
||||
<div class="container mt-6">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
// Get all "navbar-burger" elements
|
||||
const navbarBurgers = document.getElementById('navbarburger');
|
||||
|
||||
// Add a click event on each of them
|
||||
navbarBurgers.addEventListener('click', () => {
|
||||
const target = navbarBurgers.dataset.target;
|
||||
const $target = document.getElementById(target);
|
||||
navbarBurgers.classList.toggle('is-active');
|
||||
$target.classList.toggle('is-active');
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
Blog réalisé avec <a href="https://getzola.org">Zola</a> et
|
||||
<a href="https://bulma.io">Bulma</a>. Le code est accessible <a href="https://yuno.oiseauroch.fr/gitea"> ici</a>.
|
||||
Sauf mention contraire, le contenu de ce site est sous license <a href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY SA 4.0</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
19
templates/blog-amis.html
Normal file
19
templates/blog-amis.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "base.html" %}
|
||||
{% import 'macros/card.html' as macro_card -%}
|
||||
|
||||
{% block content %}
|
||||
{% for page in section.pages %}
|
||||
<article class="media note p-4" >
|
||||
<a href="{{ page.extra.url }}" class="" style="width: 100%">
|
||||
<div class="media-content media-flex" style="overflow-y: clip;">
|
||||
<h2 class="title is-2">{{ page.title }}</h2>
|
||||
<div class="content has-text-justified">
|
||||
{{ page.summary | markdown | safe }}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
40
templates/blog-list.html
Normal file
40
templates/blog-list.html
Normal file
@@ -0,0 +1,40 @@
|
||||
{% extends "base.html" %}
|
||||
{% import 'macros/card.html' as macro_card -%}
|
||||
|
||||
{% block content %}
|
||||
<div class="columns is-multiline mt-6">
|
||||
{% for page in paginator.pages %}
|
||||
<div class="column is-one-third">
|
||||
{% if page.taxonomies.Tag %}
|
||||
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, subtitle="la génèse", abstract=page.summary, tags=page.taxonomies.Tag, date=page.date) }}
|
||||
{% else %}
|
||||
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, subtitle="la génèse", abstract=page.summary, tags="", date=page.date) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<nav class="pagination is-rounded is-centered" role="navigation" aria-label="pagination">
|
||||
<ul class="pagination-list">
|
||||
{% if paginator.current_index > 2 %}
|
||||
<li><a href="{{ paginator.first }}" class="pagination-link" aria-label="Page 1">1</a></li>
|
||||
{% endif %}
|
||||
{% if paginator.current_index > 3 %}
|
||||
<li><span class="pagination-ellipsis">…</span></li>
|
||||
{% endif %}
|
||||
{% if paginator.previous %}
|
||||
<li><a class="pagination-link" href="{{ paginator.previous }}" aria-label="Page {{ paginator.current_index -1 }}">{{ paginator.current_index - 1 }}</a></li>
|
||||
{% endif %}
|
||||
<li><a class="pagination-link is-current" aria-label="Page {{ paginator.current_index }}" aria-current="page">{{ paginator.current_index }}</a></li>
|
||||
{% if paginator.next %}
|
||||
<li><a class="pagination-link" href="{{ paginator.next }}" aria-label="Page {{ paginator.current_index +1 }}">{{ paginator.current_index + 1 }}</a></li>
|
||||
{% endif %}
|
||||
{% if paginator.current_index + 2 < paginator.number_pagers %}
|
||||
<li><span class="pagination-ellipsis">…</span></li>
|
||||
{% endif %}
|
||||
{% if paginator.current_index < paginator.number_pagers - 1 %}
|
||||
<li><a href="{{ paginator.last }}" class="pagination-link" aria-label="Page {{ paginator.number_pagers }}">{{ paginator.number_pagers }}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endblock content %}
|
||||
78
templates/blog-page.html
Normal file
78
templates/blog-page.html
Normal file
@@ -0,0 +1,78 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block header %}
|
||||
|
||||
<header>
|
||||
<section class='hero has-text-centered is-info has-bg-img'>
|
||||
<div class="hero-head mx-5">
|
||||
<div class="level mt-4">
|
||||
<div class="level-left">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="level-right mt-3 is-hidden-touch">
|
||||
<div class="level-item">
|
||||
|
||||
<div class="tags colums is-vcentered">
|
||||
{% for tag in page.taxonomies.Categorie %}
|
||||
{% set tag_permalink = get_taxonomy_url(kind="Categorie", name=tag) %}
|
||||
<span class="tag is-info is-light is-large mr-4"><a href="{{tag_permalink}}">{{tag}}</a></span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="hero-body container has-text-centered">
|
||||
<p class="title is-size-1-desktop is-size-3-mobile is-uppercase">{{ page.title }}</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="hero-foot mb-5 mx-5 content">
|
||||
<div class="level">
|
||||
<div class="level-left">
|
||||
<div class="level-item has-text-left">
|
||||
<time datetime="2023-01-20T00:00:00Z">
|
||||
<p class="mb-2 subtitle is-size-5-desktop is-size-7-mobile">📅 Article publié le <strong>{{page.date | date(format="%d %B %Y", locale="fr_FR")}}</strong></p>
|
||||
</time>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-right">
|
||||
<div class="level-item has-text-right">
|
||||
<div>
|
||||
<p class="mb-2 subtitle is-size-5-desktop is-size-7-mobile">🕑 Environ <strong>{{ page.reading_time }} minutes</strong> de lecture
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</header>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content">
|
||||
{{ page.content | safe }}
|
||||
</div>
|
||||
|
||||
<aside class="container level my-5">
|
||||
<div class="level-left">
|
||||
{% if page.higher %}
|
||||
<div class="level-item">
|
||||
<a class="button is-link is-light is-medium has-text-weight-bold" href="{{ page.higher.permalink }}">{{ page.higher.title }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="level-right">
|
||||
{% if page.lower %}
|
||||
<div class="level-item">
|
||||
<a class="button is-link is-light is-medium has-text-weight-bold" href="{{ page.lower.permalink }}">{{ page.lower.title }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</aside>
|
||||
{% endblock content %}
|
||||
13
templates/blog.html
Normal file
13
templates/blog.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="title">
|
||||
{{ section.title }}
|
||||
</h1>
|
||||
<ul>
|
||||
<!-- If you are using pagination, section.pages will be empty. You need to use the paginator object -->
|
||||
{% for page in section.pages %}
|
||||
<li><a href="{{ page.permalink | safe }}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock content %}
|
||||
29
templates/index.html
Normal file
29
templates/index.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{% extends "base.html" %}
|
||||
{% import 'macros/card.html' as macro_card -%}
|
||||
{% import 'macros/media.html' as macro_media -%}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
<div class="columns is-multiline mt-6">
|
||||
{% set blog = get_section(path="blog/_index.md") %}
|
||||
{% for page in blog.pages %}
|
||||
<div class="column is-one-third">
|
||||
{% if loop.index0 == 3 %}
|
||||
</div>
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% if page.taxonomies.Tag %}
|
||||
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, subtitle="", abstract=page.summary, tags=page.taxonomies.Tag, date=page.date) }}
|
||||
{% else %}
|
||||
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, subtitle="", abstract=page.summary, tags="", date=page.date) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<a class="plus-articles button is-link is-light is-medium has-text-weight-bold" href="{{ blog.permalink }}">
|
||||
Plus d'articles
|
||||
<i class="computer fas fa-chevron-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
75
templates/macros/card.html
Normal file
75
templates/macros/card.html
Normal file
@@ -0,0 +1,75 @@
|
||||
{% macro create_card(link, img, title, subtitle, abstract, tags, date) %}
|
||||
<div class="card has-equal-height">
|
||||
<a href="{{ link | safe }}" style="height:100%">
|
||||
<div class="card-content" style="height:100%">
|
||||
<div class="title is-3 has-text-centered">{{ title }}</div>
|
||||
<div class="title is-5 has-text-centered">{{ subtitle }}</div>
|
||||
<div class="media">
|
||||
<div class="content" style="width:100%;
|
||||
overflow: hidden;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 7;
|
||||
display: -webkit-box;">
|
||||
<hr class="mt-1"/>
|
||||
{{ abstract | markdown | safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<footer class="mt-5 card">
|
||||
<div class="card-footer-item">
|
||||
{% for tag in tags %}
|
||||
{% set tag_permalink = get_taxonomy_url(kind="Tag", name=tag) %}
|
||||
<a class="button is-small is-info is-light is-rounded mx-1" href="{{ tag_permalink }}"> {{ tag }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="card-footer-item">
|
||||
{{ date | date(format="%d %B %Y", locale="fr_FR") }}
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
{% macro create_card_tag(link, title) %}
|
||||
<div class="column is-one-third">
|
||||
<div class="card">
|
||||
<a class="card-content" href={{ link }}{{ title }}>
|
||||
<div class="media">
|
||||
<div class="title is-3 has-text-centered">{{ title }}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
{% macro create_card_note(link, img, title, subtitle, abstract, tags, date) %}
|
||||
<div class="card has-equal-height">
|
||||
<a href="{{ link | safe }}" style="height:100%">
|
||||
<div class="card-content" style="height:100%">
|
||||
<div class="title is-5 has-text-centered">{{ title }}</div>
|
||||
<div class="subtitle has-text-centered">{{ subtitle }}</div>
|
||||
<div class="media">
|
||||
<div class="content" style="width:100%;">
|
||||
<hr class="mt-1"/>
|
||||
{{ abstract | markdown | safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<footer class="mt-1 card-footer">
|
||||
<div class="card-footer-item">
|
||||
{% for tag in tags %}
|
||||
{% set tag_permalink = get_taxonomy_url(kind="Tag", name=tag) %}
|
||||
<a class="button is-small is-info is-light is-rounded mx-1" href="{{ tag_permalink }}"> {{ tag }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="card-footer-item">
|
||||
{{ date | date(format="%d %b", locale="fr_FR") }}
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
{% endmacro %}
|
||||
19
templates/macros/media.html
Normal file
19
templates/macros/media.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% macro create_media(link, img, title, abstract, tags, date) %}
|
||||
|
||||
<article class="media has-equal-height divide note p-4" >
|
||||
<div class="media-content media-flex" style="overflow-y: clip;">
|
||||
<a href="#" class="has-equal-height" style="width: 100%">
|
||||
<h4 class="title is-4">{{ title }}</h4>
|
||||
<div class="content has-text-justified">
|
||||
{{ abstract | markdown | safe }}
|
||||
</div>
|
||||
</a>
|
||||
<div class="buttons mt-1">
|
||||
{% for tag in tags %}
|
||||
{% set tag_permalink = get_taxonomy_url(kind="Tag", name=tag) %}
|
||||
<a class="button is-small is-info is-light is-rounded mx-1" href="{{ tag_permalink }}"> {{ tag }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</article>
|
||||
{% endmacro %}
|
||||
|
||||
25
templates/navbar.html
Normal file
25
templates/navbar.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="navbar-menu" id="navMenu">
|
||||
<div class="navbar-end">
|
||||
<div class="navbar-item">
|
||||
<a class="navbar-item">
|
||||
À propos
|
||||
</a>
|
||||
<div class="navbar-item has-dropdown is-hoverable ">
|
||||
<a class="navbar-link">
|
||||
Sites amis
|
||||
</a>
|
||||
|
||||
<div class="navbar-dropdown">
|
||||
<a class="navbar-item" href="https://blog.chosto.me">
|
||||
Chosto
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="navbar-item" href="https://yuno.oiseauroch.fr/gitea">
|
||||
<img class="image is-24x24" src="img/Gitea_Logo.svg">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
31
templates/note-page.html
Normal file
31
templates/note-page.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ __tera_context }}
|
||||
|
||||
<h1 class="title is-1">
|
||||
{{ page.title }}
|
||||
</h1>
|
||||
<p class="subtitle"><strong>{{ page.date }}</strong></p>
|
||||
<div class="content">
|
||||
{{ page.content | safe }}
|
||||
</div>
|
||||
|
||||
<aside class="container level my-5">
|
||||
<div class="level-left">
|
||||
{% if page.higher %}
|
||||
<div class="level-item">
|
||||
<a class="button is-link is-light is-medium has-text-weight-bold" href="{{ page.higher.permalink }}">{{ page.higher.title }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="level-right">
|
||||
{% if page.lower %}
|
||||
<div class="level-item">
|
||||
<a class="button is-link is-light is-medium has-text-weight-bold" href="{{ page.lower.permalink }}">{{ page.lower.title }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</aside>
|
||||
{% endblock content %}
|
||||
47
templates/note.html
Normal file
47
templates/note.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{% extends "base.html" %}
|
||||
{% import 'macros/card.html' as macro_card -%}
|
||||
|
||||
{% block content %}
|
||||
{% for page in paginator.pages %}
|
||||
<article class="media note p-4" >
|
||||
<div class="media-content media-flex" style="overflow-y: clip;">
|
||||
<a href="#" class="" style="width: 100%">
|
||||
<h2 class="title is-2">{{ page.title }}</h2>
|
||||
<h4 class="subtitle">{{ page.date }}</h4>
|
||||
<div class="content has-text-justified">
|
||||
{{ page.summary | markdown | safe }}
|
||||
</div>
|
||||
</a>
|
||||
<div class="buttons mt-1">
|
||||
{% for tag in page.taxonomies.Tag %}
|
||||
<a class="button is-small is-info is-light is-rounded" href="{{ get_url(path="Tag/") }}/{{ tag }}"> {{ tag }}</a>
|
||||
{% endfor %}</a>
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<nav class="pagination is-rounded is-centered" role="navigation" aria-label="pagination">
|
||||
<ul class="pagination-list">
|
||||
{% if paginator.current_index > 2 %}
|
||||
<li><a href="{{ paginator.first }}" class="pagination-link" aria-label="Page 1">1</a></li>
|
||||
{% endif %}
|
||||
{% if paginator.current_index > 3 %}
|
||||
<li><span class="pagination-ellipsis">…</span></li>
|
||||
{% endif %}
|
||||
{% if paginator.previous %}
|
||||
<li><a class="pagination-link" href="{{ paginator.previous }}" aria-label="Page {{ paginator.current_index -1 }}">{{ paginator.current_index - 1 }}</a></li>
|
||||
{% endif %}
|
||||
<li><a class="pagination-link is-current" aria-label="Page {{ paginator.current_index }}" aria-current="page">{{ paginator.current_index }}</a></li>
|
||||
{% if paginator.next %}
|
||||
<li><a class="pagination-link" href="{{ paginator.next }}" aria-label="Page {{ paginator.current_index +1 }}">{{ paginator.current_index + 1 }}</a></li>
|
||||
{% endif %}
|
||||
{% if paginator.current_index + 2 < paginator.number_pagers %}
|
||||
<li><span class="pagination-ellipsis">…</span></li>
|
||||
{% endif %}
|
||||
{% if paginator.current_index < paginator.number_pagers - 1 %}
|
||||
<li><a href="{{ paginator.last }}" class="pagination-link" aria-label="Page {{ paginator.number_pagers }}">{{ paginator.number_pagers }}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endblock content %}
|
||||
3
templates/shortcodes/alert.html
Normal file
3
templates/shortcodes/alert.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<alert class="alert">
|
||||
<img src="{{ get_url(path=url) }}" alt="{{ description }}"/>
|
||||
</alert>
|
||||
11
templates/shortcodes/gallery.html
Normal file
11
templates/shortcodes/gallery.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="no-prose">
|
||||
{% for asset in page.assets -%}
|
||||
{%- if asset is matching(name) -%}
|
||||
{% set image = resize_image(path=asset, height=320, op="fit_height") %}
|
||||
{% set full_image = resize_image(path=asset, width=1024, height=1024, op="fit") %}
|
||||
<a href="{{ full_image.url }}" target="_blank">
|
||||
<img src="{{ image.url }}" />
|
||||
</a>
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
</div>
|
||||
16
templates/shortcodes/image.html
Normal file
16
templates/shortcodes/image.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% for asset in page.assets -%}
|
||||
{%- if asset is matching(name) -%}
|
||||
{% set image = resize_image(path=asset, height=size, op="fit_height") %}
|
||||
<figure>
|
||||
{% set full_image = resize_image(path=asset, width=1024, height=1024, op="fit") %}
|
||||
<a href="{{ full_image.url }}" target="_blank">
|
||||
<img src="{{ image.url }}">
|
||||
</a>
|
||||
{% if caption %}
|
||||
<figcaption>
|
||||
{{ caption }}
|
||||
</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
28
templates/taxonomy_list.html
Normal file
28
templates/taxonomy_list.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{% extends "base.html" %}
|
||||
{% import 'macros/card.html' as macro_card -%}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
{% for taxo in terms %}
|
||||
<div class="columns is-multiline mt-6">
|
||||
<a class="plus-articles button is-link is-light is-medium has-text-weight-bold" href="{{ taxo.permalink }}">
|
||||
{{ taxo.name }}
|
||||
<i class="computer fas fa-chevron-right mx-2" ></i>
|
||||
</a>
|
||||
{% for page in taxo.pages %}
|
||||
{% if loop.index0 == 3 %}
|
||||
{% break %}
|
||||
{% endif %}
|
||||
<div class="column is-one-third">
|
||||
{% if page.taxonomies.Tag %}
|
||||
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, subtitle="", abstract=page.summary, tags=page.taxonomies.Tag, date=page.date) }}
|
||||
{% else %}
|
||||
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, subtitle="", abstract=page.summary, tags="", date=page.date) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock content %}
|
||||
|
||||
43
templates/taxonomy_single.html
Normal file
43
templates/taxonomy_single.html
Normal file
@@ -0,0 +1,43 @@
|
||||
{% extends "base.html" %}
|
||||
{% import 'macros/card.html' as macro_card -%}
|
||||
|
||||
{% block content %}
|
||||
<div class="columns is-multiline mt-6">
|
||||
<div class="plus-articles button is-link is-light is-medium has-text-weight-bold">
|
||||
{{ term.name }}
|
||||
</div>
|
||||
{% for page in paginator.pages %}
|
||||
<div class="column is-one-third">
|
||||
{% if page.taxonomies.Tag %}
|
||||
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, subtitle="", abstract=page.summary, tags=page.taxonomies.Tag, date=page.date) }}
|
||||
{% else %}
|
||||
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, subtitle="", abstract=page.summary, tags="", date=page.date) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<nav class="pagination is-rounded is-centered" role="navigation" aria-label="pagination">
|
||||
<ul class="pagination-list">
|
||||
{% if paginator.current_index > 2 %}
|
||||
<li><a href="{{ paginator.first }}" class="pagination-link" aria-label="Page 1">1</a></li>
|
||||
{% endif %}
|
||||
{% if paginator.current_index > 3 %}
|
||||
<li><span class="pagination-ellipsis">…</span></li>
|
||||
{% endif %}
|
||||
{% if paginator.previous %}
|
||||
<li><a class="pagination-link" href="{{ paginator.previous }}" aria-label="Page {{ paginator.current_index -1 }}">{{ paginator.current_index - 1 }}</a></li>
|
||||
{% endif %}
|
||||
<li><a class="pagination-link is-current" aria-label="Page {{ paginator.current_index }}" aria-current="page">{{ paginator.current_index }}</a></li>
|
||||
{% if paginator.next %}
|
||||
<li><a class="pagination-link" href="{{ paginator.next }}" aria-label="Page {{ paginator.current_index +1 }}">{{ paginator.current_index + 1 }}</a></li>
|
||||
{% endif %}
|
||||
{% if paginator.current_index + 2 < paginator.number_pagers %}
|
||||
<li><span class="pagination-ellipsis">…</span></li>
|
||||
{% endif %}
|
||||
{% if paginator.current_index < paginator.number_pagers - 1 %}
|
||||
<li><a href="{{ paginator.last }}" class="pagination-link" aria-label="Page {{ paginator.number_pagers }}">{{ paginator.number_pagers }}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user