-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify base and post-list templates and add an exemple of content i…
…n exemple-content/
- Loading branch information
Clément
committed
Aug 9, 2024
1 parent
1b6e301
commit 23bf86d
Showing
19 changed files
with
435 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,16 @@ | ||
{% from "blocks/block.html" import block %} | ||
{% from "widgets/generic.html" import page_header %} | ||
|
||
|
||
<!DOCTYPE html> | ||
<html lang="{{ object.metadata.lang|default("") }}"> | ||
|
||
|
||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
{% for key, value in object.metadata.items()|filter_opengraph_metadata %} | ||
<meta property="{{ key }}" content="{{ value }}"/> | ||
{% endfor %} | ||
<title>{{ object.title|default("") }}</title> | ||
<link rel="stylesheet" href="{{ static('pygments/monokai.css') }}"> | ||
<link rel="icon" type="image/x-icon" href="{{ static('assets/galae.ico') }}"/> | ||
<link href="{{ static('css/styles.css') }}" rel="stylesheet"/> | ||
<link href="{{ static('css/custom.css') }}" rel="stylesheet"/> | ||
<link href="{{ static('css/fonts.css') }}" rel="stylesheet"/> | ||
<link href="{{ static('assets/fonts/bootstrap-icons.css') }}" rel="stylesheet " | ||
type="text/css"/> | ||
</head> | ||
|
||
|
||
|
||
<body> | ||
|
||
{{ block( | ||
NAME = "navbar", | ||
VERSION = object.metadata.lang|default(""), | ||
DEFAULT_NAME = "fr/navbar.html" | ||
) }} | ||
|
||
<header> | ||
{{ page_header( | ||
PRIMARY_TITLE = object.metadata.page_header_h1|default(""), | ||
SECONDARY_TITLE = object.metadata.page_header_h2|default(""), | ||
THIRD_TITLE = object.metadata.page_header_h3|default("") | ||
) }} | ||
</header> | ||
|
||
<main> | ||
{% block content %}{% endblock %} | ||
</main> | ||
|
||
{{ block( | ||
NAME = "footer", | ||
VERSION = object.metadata.lang|default(""), | ||
DEFAULT_NAME = "fr/footer.html" | ||
) }} | ||
|
||
<!-- Bootstrap core JS--> | ||
<script src="{{ static('js/bootstrap.bundle.min.js') }}"></script> | ||
<!-- Core theme JS--> | ||
<script src="{{ static('js/scripts.js') }}"></script> | ||
<!-- Matomo --> | ||
<script> | ||
var _paq = window._paq = window._paq || []; | ||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ | ||
_paq.push(['trackPageView']); | ||
_paq.push(['enableLinkTracking']); | ||
(function () { | ||
var u = "https://matomo.algoo.fr/"; | ||
_paq.push(['setTrackerUrl', u + 'matomo.php']); | ||
_paq.push(['setSiteId', '10']); | ||
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; | ||
g.async = true; | ||
g.src = u + 'matomo.js'; | ||
s.parentNode.insertBefore(g, s); | ||
})(); | ||
</script> | ||
<noscript><p><img src="https://matomo.algoo.fr/matomo.php?idsite=10&rec=1" style="border:0;" | ||
alt=""/></p></noscript> | ||
<!-- End Matomo Code --> | ||
|
||
</body> | ||
|
||
|
||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,82 @@ | ||
{% extends "base.html"%} | ||
|
||
{% block content %} | ||
|
||
<div class="container"> | ||
<nav class='navbar navbar-light bg-light static-top'> | ||
<a>Catégories :</a> | ||
<a href='/posts/page1.html'>Tout</a> | ||
{% for category in object.categories %} | ||
<a href='/posts/category/{{category}}/page1.html'>{{ category|replace('-', ' ')|title }}</a> | ||
{% endfor %} | ||
</nav> | ||
<div> | ||
<nav> | ||
<a>Categories :</a> | ||
<a href='/posts/page1.html'>Tout</a> | ||
{% for category in object.categories %} | ||
<a href='/posts/category/{{category}}/page1.html'>{{ category|replace('-', ' ')|title }}</a> | ||
{% endfor %} | ||
</nav> | ||
</div> | ||
|
||
<div class="row" id="articles"> | ||
{% for post in object.posts %} | ||
<div class="col-12 col-lg-4 my-2 blog__article " id="r-d-et-veille-techno-petit-point-sur-nos-projets-internes"> | ||
<div class="blog__post card rounded-20 " style="max-width: ; min-width: "> | ||
<div class="card-body"> | ||
<div class="card-text" style="height: 400px"> | ||
<a class="card-link footer-link" href="/posts/articles/{% if post.rel_folder_path != '' %}{{post.rel_folder_path}}/{% endif %}{{post.slug}}.html"> | ||
<h2 class="blog__post__text__title">{{ post.title }}</h2> | ||
</a> | ||
<div> | ||
{% for post in object.posts %} | ||
<div style="max-width: ; min-width: "> | ||
<a href="/posts/articles/{% if post.rel_folder_path != '' %}{{post.rel_folder_path}}/{% endif %}{{post.slug}}.html"> | ||
<h2>{{ post.title }}</h2> | ||
</a> | ||
|
||
<div class="blog__post__text__content"> | ||
<p>{{ post.metadata.abstract }}</p> | ||
</div> | ||
<div> | ||
<p>{{ post.metadata.abstract }}</p> | ||
</div> | ||
|
||
<div class="blog__post__text__bottom"> | ||
<div class="blog__post__text__bottom__meta"> | ||
<div class="blog__post__text__bottom__meta__author"> | ||
<div class="blog__post__text__bottom__meta__author__icon"><i class="fas fa-user"></i></div> | ||
<div class="blog__post__text__bottom__meta__author__name">{{post.metadata.author}}</div> | ||
</div> | ||
<div> | ||
<div> | ||
<div> | ||
{{post.metadata.author}} | ||
</div> | ||
|
||
<div class="blog__post__text__bottom__meta__date"> | ||
<div class="blog__post__text__bottom__meta__date__icon"><i class="fas fa-calendar"></i></div> | ||
<div class="blog__post__text__bottom__meta__date__name">{{ post.timestamp.strftime("%d/%m/%Y") }}</div> | ||
</div> | ||
<div> | ||
{{ post.timestamp.strftime("Le %d/%m/%Y à %Hh%M") }} | ||
</div> | ||
</div> | ||
|
||
<div class="blog__post__text__bottom__btn"> | ||
<a | ||
class="btn btn-primary btn-round" | ||
href="/posts/articles/{% if post.rel_folder_path != '' %}{{post.rel_folder_path}}/{% endif %}/{{post.slug}}.html" | ||
> | ||
Lire la suite ... | ||
</a> | ||
<div> | ||
<a href="/posts/articles{% if post.rel_folder_path != '' %}{{post.rel_folder_path}}/{% endif %}/{{post.slug}}.html"> | ||
Lire la suite ... | ||
</a> | ||
</div> | ||
</div> | ||
<div class="blog__post__text__meta__category d-none"> | ||
{{post.metadata.abstract}} | ||
</div> | ||
</div> | ||
</div> | ||
<div> | ||
{{post.metadata.abstract}} | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% endfor %} | ||
</div> | ||
|
||
{% if object.nb_pages > 1 %} | ||
<div> | ||
{% if object.page > 1 %} | ||
{% if object.category != "" %} | ||
<a href="/posts/category/{{object.category}}/page{{object.page-1}}.html">Page précédente</a> | ||
{% else %} | ||
<a href="/posts/page{{object.page-1}}.html">Page précédente</a> | ||
{% endif %} | ||
{% endif %} | ||
<br><br><br> | ||
<div> | ||
{% if object.page > 1 %} | ||
{% if object.category != "" %} | ||
<a href="/posts/category/{{object.category}}/page{{object.page-1}}.html">Page précédente</a> | ||
{% else %} | ||
<a href="/posts/page{{object.page-1}}.html">Page précédente</a> | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% if object.page < object.nb_pages %} | ||
{% if object.category != "" %} | ||
<a href="/posts/category/{{object.category}}/page{{object.page+1}}.html">Page suivante</a> | ||
{% else %} | ||
<a href="/posts/page{{object.page+1}}.html">Page suivante</a> | ||
{% endif %} | ||
{% endif %} | ||
</div> | ||
{% if object.page < object.nb_pages %} | ||
{% if object.category != "" %} | ||
<a href="/posts/category/{{object.category}}/page{{object.page+1}}.html">Page suivante</a> | ||
{% else %} | ||
<a href="/posts/page{{object.page+1}}.html">Page suivante</a> | ||
{% endif %} | ||
{% endif %} | ||
</div> | ||
|
||
<div> | ||
Pages : | ||
{% for page in range(1, object.nb_pages+1) %} | ||
{% if object.category != "" %} | ||
<a href="/posts/category/{{object.category}}/page{{page}}.html">{{page}}</a> | ||
{% else %} | ||
<a href="/posts/page{{page}}.html">{{page}}</a> | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
<div> | ||
Pages : | ||
{% for page in range(1, object.nb_pages+1) %} | ||
{% if object.category != "" %} | ||
<a href="/posts/category/{{object.category}}/page{{page}}.html">{{page}}</a> | ||
{% else %} | ||
<a href="/posts/page{{page}}.html">{{page}}</a> | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title Welcome on my site ! | ||
slug home | ||
lang en | ||
description Home page | ||
|
||
page_header_h1 Welcome ! | ||
page_header_h2 This is a example site for JFME | ||
--- | ||
{ | ||
|
||
} | ||
--- | ||
|
||
{% markdown %} | ||
**Here an image of tux :** | ||
{% endmarkdown%} | ||
|
||
{{ | ||
page_widgets.image( | ||
IMAGE_PATH = static("images/tux.png"), | ||
) | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title Bienvenue sur mon site ! | ||
slug accueil | ||
lang fr | ||
|
||
page_header_h1 Bienvenue ! | ||
page_header_h2 Un exemple de site pour JFME | ||
--- | ||
{ | ||
|
||
} | ||
--- | ||
|
||
{% markdown %} | ||
**Voilà une image de Tux :** | ||
{% endmarkdown%} | ||
|
||
{{ | ||
page_widgets.image( | ||
IMAGE_PATH = static("images/tux.png"), | ||
) | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title Fifth post | ||
slug post5 | ||
date 2024-08-09T13:02 | ||
abstract An example of post for JFME | ||
author Clément Becquet | ||
category test 2 | ||
--- | ||
{ | ||
|
||
} | ||
--- | ||
|
||
This post is just an example | ||
|
||
{% markdown %} | ||
**This is my fifth post !** | ||
{% endmarkdown %} | ||
|
||
{{ lipsum() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title First post | ||
slug post1 | ||
date 2024-08-09T12:13 | ||
abstract An example of post for JFME | ||
author Clément Becquet | ||
category test 1 | ||
--- | ||
{ | ||
|
||
} | ||
--- | ||
|
||
This post is just an example | ||
|
||
{% markdown %} | ||
**This is my first post !** | ||
{% endmarkdown %} | ||
|
||
{{ lipsum() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title Fourth post | ||
slug post4 | ||
date 2024-08-09T12:48 | ||
abstract An example of post for JFME | ||
author Clément Becquet | ||
category test 1 | ||
--- | ||
{ | ||
|
||
} | ||
--- | ||
|
||
This post is just an example | ||
|
||
{% markdown %} | ||
**This is my fourth post !** | ||
{% endmarkdown %} | ||
|
||
{{ lipsum() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title Second post | ||
slug post2 | ||
date 2024-08-09T12:20 | ||
abstract An example of post for JFME | ||
author Clément Becquet | ||
category test 2 | ||
--- | ||
{ | ||
|
||
} | ||
--- | ||
|
||
This post is just an example | ||
|
||
{% markdown %} | ||
**This is my second post !** | ||
{% endmarkdown %} | ||
|
||
{{ lipsum() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title Sixth post | ||
slug post6 | ||
date 2024-08-09T13:55 | ||
abstract An example of post for JFME | ||
author Clément Becquet | ||
category test 1 | ||
--- | ||
{ | ||
|
||
} | ||
--- | ||
|
||
This post is just an example | ||
|
||
{% markdown %} | ||
**This is my sixth post !** | ||
{% endmarkdown %} | ||
|
||
{{ lipsum() }} |
Oops, something went wrong.