test
This commit is contained in:
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}}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
137
templates/base.html
Normal file
137
templates/base.html
Normal file
@@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Blog à tout dire</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">
|
||||
<div class="navbar-item has-dropdown is-hoverable ">
|
||||
<a class="navbar-link" >
|
||||
Bricolage
|
||||
</a>
|
||||
<div class="navbar-dropdown">
|
||||
<a class="navbar-item" href="{{ get_url(path="categorie/velo_cargo",
|
||||
trailing_slash=false) }}">
|
||||
Vélo cargo
|
||||
</a>
|
||||
<a class="navbar-item" href="{{ get_url(path="cirque_lumineux",
|
||||
trailing_slash=false) }}">
|
||||
Matériel de cirque lumineux
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-item has-dropdown is-hoverable">
|
||||
<a class="navbar-link">
|
||||
Informatique
|
||||
</a>
|
||||
<div class="navbar-dropdown">
|
||||
<a class="navbar-item" href="{{ get_url(path="categorie/rust",
|
||||
trailing_slash=false) }}">
|
||||
Rust
|
||||
</a>
|
||||
<a class="navbar-item" href="{{ get_url(path="categorie/arduino",
|
||||
trailing_slash=false) }}">
|
||||
Arduino
|
||||
</a>
|
||||
</div>
|
||||
<a class="navbar-item" href="{{ get_url(path="categorie/autre",
|
||||
trailing_slash=false) }}">
|
||||
Autre
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-end">
|
||||
<div class="navbar-item">
|
||||
<a class="navbar-item" href="{{ get_url(path="apropos",
|
||||
trailing_slash=false) }}">
|
||||
À 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="{{ get_url(path="img/Gitea_Logo.svg",
|
||||
trailing_slash=false) }}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<div>
|
||||
<div style="margin: 100px"></div>
|
||||
|
||||
<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>
|
||||
11
templates/blog-page.html
Normal file
11
templates/blog-page.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="title">
|
||||
{{ page.title }}
|
||||
</h1>
|
||||
<p class="subtitle"><strong>{{ page.date }}</strong></p>
|
||||
<div class="content">
|
||||
{{ page.content | safe }}
|
||||
</div>
|
||||
{% 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 %}
|
||||
66
templates/index.html
Normal file
66
templates/index.html
Normal file
@@ -0,0 +1,66 @@
|
||||
{% extends "base.html" %}
|
||||
{% import 'macros/card.html' as macro_card -%}
|
||||
{% import 'macros/media.html' as macro_media -%}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
<div class="tile is-ancestor">
|
||||
<div class="tile is-vertical is-8">
|
||||
<div class="columns is-multiline mt-6">
|
||||
{% set blog = get_section(path="blog/_index.md") %}
|
||||
{% for page in blog.pages %}
|
||||
{% if loop.index0 == 3 %}{% break %}{% endif %}
|
||||
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, abstract=page.summary, tags=page.taxonomies.tags, date=page.date) }}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav class="pagination is-centered is-rounded" role="navigation" aria-label="pagination">
|
||||
<ul class="pagination-list">
|
||||
|
||||
<ul class="pagination-list">
|
||||
<li><a class="pagination-link" href="{{ paginator.first }}">1</a></li>
|
||||
<li><span class="pagination-ellipsis">…</span></li>
|
||||
{% if paginator.previous %}
|
||||
<li><a class="pagination-link" href="{{ paginator.previous }}">{{ paginator.current_index - 1 }}</a></li>
|
||||
{% endif %}
|
||||
<li><a class="pagination-link is-current" aria-label="Page 46" >{{ paginator.current_index }}</a></li>
|
||||
{% if paginator.next %}
|
||||
<li><a class="pagination-link" href="{{ paginator.next }}">{{ paginator.current_index + 1 }}</a></li>
|
||||
{% endif %}
|
||||
<li><span class="pagination-ellipsis">…</span></li>
|
||||
<li><a class="pagination-link" href="{{ paginator.last }}">{{ paginator.number_pagers }}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="tile mt-6 ml-3 columns">
|
||||
<div class="column">
|
||||
<div class="card">
|
||||
<div class="card-image" >
|
||||
<section class="hero is-info is-light">
|
||||
<div class="hero-body">
|
||||
<p class="title">
|
||||
Tips et découvertes
|
||||
</p>
|
||||
<p class="subtitle">
|
||||
Des trouvailles rapides
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="card-content" >
|
||||
{% set notes = get_section(path="notes/_index.md") %}
|
||||
{% for page in notes.pages %}
|
||||
{% if loop.index0 == 4 %}{% break %}{% endif %}
|
||||
{{ macro_media::create_media(link=page.permalink, img=page.extra.image, title=page.title, abstract=page.summary, tags=page.taxonomies.tags, date=page.date) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div> </div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
53
templates/macros/card.html
Normal file
53
templates/macros/card.html
Normal file
@@ -0,0 +1,53 @@
|
||||
{% macro create_card(link, img, title, abstract, tags, date) %}
|
||||
<div class="column is-one-third">
|
||||
<div class="card has-equal-height">
|
||||
<a href="{{ link | safe }}">
|
||||
<div class="card-image" >
|
||||
<figure class="image is-3by2">
|
||||
{% if img is not starting_with("/") %}
|
||||
<img src={{ link }}{{ img }} alt="Placeholder image">
|
||||
{% endif %}
|
||||
{% if img isstarting_with("/") %}
|
||||
<img src="{{ get_url(path=img, trailing_slash=false) }}" alt="Placeholder image">
|
||||
{% endif %}
|
||||
</figure>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="title is-3 has-text-centered">{{ title }}</div>
|
||||
<div class="media">
|
||||
<div class="content">
|
||||
<hr/>
|
||||
{{ abstract | markdown | safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<footer class="card-footer">
|
||||
<div class="card-footer-item">
|
||||
{% for tag in tags %}
|
||||
<a class="button is-small is-info is-light is-rounded" href="{{ get_url(path="tags/") }}/{{ tag }}"> {{ tag }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="card-footer-item">
|
||||
{{ date }}
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</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 %}
|
||||
36
templates/macros/media.html
Normal file
36
templates/macros/media.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% macro create_media(link, img, title, abstract, tags, date) %}
|
||||
|
||||
<article class="media"><!--
|
||||
<figure class="media-left">
|
||||
<p class="image is-128x128">
|
||||
{% if img is not starting_with("/") %}
|
||||
<img src={{ link }}{{ img }} alt="Placeholder image">
|
||||
{% endif %}
|
||||
{% if img isstarting_with("/") %}
|
||||
<img src="{{ get_url(path=img, trailing_slash=false) }}" alt="Placeholder image">
|
||||
{% endif %}
|
||||
</p>-->
|
||||
</figure>
|
||||
<div class="media-content">
|
||||
<a href="{{ link | safe }}">
|
||||
<div class="content">
|
||||
<p>
|
||||
<strong class="title is-3">{{ title }}</strong>
|
||||
<br>
|
||||
{{ abstract | markdown | safe }}
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
<nav class="level is-mobile">
|
||||
<div class="level-left">
|
||||
{% for tag in tags %}
|
||||
<a class="button is-small is-info is-light is-rounded" href="{{ get_url(path="tags/") }}/{{ tag }}"> {{ tag }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
55
templates/navbar.html
Normal file
55
templates/navbar.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<div class="navbar-menu" id="navMenu">
|
||||
<div class="navbar-item has-dropdown is-hoverable ">
|
||||
<a class="navbar-link">
|
||||
Bricolage
|
||||
</a>
|
||||
<div class="navbar-dropdown">
|
||||
<a class="navbar-item">
|
||||
Vélo cargo
|
||||
</a>
|
||||
<a class="navbar-item">
|
||||
Matériel de cirque lumineux
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-item has-dropdown is-hoverable">
|
||||
<a class="navbar-link">
|
||||
Informatique
|
||||
</a>
|
||||
<div class="navbar-dropdown">
|
||||
<a class="navbar-item">
|
||||
Rust
|
||||
</a>
|
||||
<a class="navbar-item">
|
||||
Arduino
|
||||
</a>
|
||||
</div>
|
||||
<a class="navbar-item">
|
||||
Autre
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
3
templates/shortcodes/image.html
Normal file
3
templates/shortcodes/image.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<figure>
|
||||
<img src="{{ get_url(path=url) }}" alt="{{ description }}"/>
|
||||
</figure>
|
||||
15
templates/taxonomy_list.html
Normal file
15
templates/taxonomy_list.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends "base.html" %}
|
||||
{% import 'macros/card.html' as macro_card -%}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% for taxo in terms %}
|
||||
<div class="columns is-vcentered mt-6">
|
||||
{{ macro_card::create_card_tag(link=current_url, title=taxo.name) }}
|
||||
{% for page in taxo.pages %}
|
||||
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, abstract=page.summary, tags=page.taxonomies.tags, date=page.date) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock content %}
|
||||
|
||||
26
templates/taxonomy_single.html
Normal file
26
templates/taxonomy_single.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends "base.html" %}
|
||||
{% import 'macros/card.html' as macro_card -%}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-6">
|
||||
|
||||
<div class="column is-full">
|
||||
<div class="card">
|
||||
<div class="card-content" >
|
||||
<div class="media">
|
||||
<div class="title is-3 has-text-centered">{{ term.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="columns is-multiline mt-6">
|
||||
|
||||
{% for page in term.pages %}
|
||||
|
||||
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, abstract=page.summary, tags=page.taxonomies.tags, date=page.date) }}
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user