premier brouillon

This commit is contained in:
OniriCorpe 2026-04-15 03:58:05 +02:00
parent 4442a417aa
commit c4b5d14206
20 changed files with 33235 additions and 0 deletions

6
templates/404.html Normal file
View file

@ -0,0 +1,6 @@
{% extends "base.html" %}
{% block content %}
<h1>Erreur 404</h1>
<p>Quoi que vous cherchiez, ce n'est pas ici…</p>
{% endblock content %}

19
templates/base.html Normal file
View file

@ -0,0 +1,19 @@
{% import "macros/doc.html" as doc %}
{% import "macros/trans.html" as trans %}
<!DOCTYPE html>
<html lang="{{ lang }}">
<head>
{% include "partials/head.html" -%}
</head>
<body>
<main {% include "partials/lang_attr.html" -%} >
{%- block content %} {% endblock content -%}
</main>
<footer class="footer">
<div class="content has-text-centered">
{% include "partials/footer.html" -%}
</div>
</footer>
</body>
</html>

64
templates/home.html Normal file
View file

@ -0,0 +1,64 @@
{% extends "base.html" %} {% block content %}
<div class="section">
<div class="container is-desktop">
<div class="columns is-vcentered is-centered is-desktop">
<div class="column is-narrow is-two-third-touch">
<div class="card has-background-primary-light">
<div class="card-content">
<div class="media">
<div class="media-left">
<a href="/">
<figure class="image is-1by1 is-128x128">
<img class="is-rounded" src="/img/glitch.png" alt="A glitched image"></img>
</figure>
</a>
</div>
<div class="media-content">
<h1 class="title is-1 has-text-primary-dark has-text-right">{{ config.title }}</h1>
<p class="subtitle is-4 has-text-primary-dark has-text-right">Créatrice d'objets singuliers</p>
{%- if page and page.title == "Contact" -%}
<a class="button is-link is-outlined is-pulled-right" href="/">Retour à l'accueil</a>
{%- else -%}
<a class="button is-link is-outlined is-pulled-right" href="/contact">Me contacter</a>
{%- endif -%}
</div>
</div>
</div>
</div>
</div>
<div class="column is-full-until-widescreen is-offset-one-third">
{%- if section -%}
{%- if not section.extra.hide_title -%}
<h2 class="title is-3">{{- section.title -}}</h2>
{%- if section.extra.subtitle -%}
<p class="subtitle is-5 has-text-primary-dark">{{- section.extra.subtitle -}}</p>
{%- endif -%}
{%- endif -%}
{{- section.content | safe -}}
{% for sect in section.subsections %}
{%- set sect = get_section(path=sect) %}
<section class="content-section">
<h2 class="title is-4"><a href="{{ get_url(path=sect.path | safe) }}">{{ sect.title }}</a></h2>
<p class="subtitle is-5">{{ sect.extra.subtitle }}</p>
{{- sect.content | safe -}}
</section>
{% if not loop.last %} <hr> {% endif %}
{% endfor -%}
{%- endif -%}
{%- if page -%}
{%- if not page.extra.hide_title -%}
<h2 class="title is-3">{{- page.title -}}</h2>
{%- if page.extra.subtitle -%}
<p class="subtitle is-5 has-text-primary-dark">{{- page.extra.subtitle -}}</p>
{%- endif -%}
{%- endif -%}
<div class="content">
{{- page.content | safe -}}
</div>
{%- endif -%}
</div>
</div>
</div>
</div>
{% endblock content %}

View file

@ -0,0 +1,4 @@
{% macro get() %} {{ section | default(value=page) }} {%- endmacro doc -%} {%
macro lang() %} {%- if not section and not page -%} {{ lang }} {%- else -%} {%-
set doc = doc::get() -%} {{ page.extra.lang | default(value=lang) }} {%- endif
-%} {%- endmacro trans -%}

View file

@ -0,0 +1,2 @@
{% import "macros/doc.html" as doc %} {% macro trans(s) %} {%- set doc_lang =
doc::lang() -%} {{ config.extra.trans[doc_lang][s] }} {%- endmacro trans -%}

9
templates/page.html Normal file
View file

@ -0,0 +1,9 @@
{% extends "base.html" %} {% block content %}
<section class="section">
<div class="content container is-desktop">
<h1 class="title is-2">{{ page.title }}</h1>
<hr />
{{- page.content | safe -}} {% endblock content %}
</div>
</section>

View file

@ -0,0 +1,3 @@
<hr />
<a href="/mentions-legales">Mentions légales</a> -
<a href="/cgv">Conditions générales de vente</a>

View file

@ -0,0 +1,13 @@
<meta charset="utf-8">
<title>{% include "partials/title.html" %} - {{ config.title }}</title>
<link href="/favicon.svg" rel="icon" sizes="16x16 32x32 48x48 192x192" type="image/svg+xml">
<link href="/favicon.svg" rel="apple-touch-icon" sizes="60x60 72x72 76x76 114x114 120x120 144x144 152x152 167x167 180x180 1024x1024" type="image/svg+xml">
<link href="{{ get_url(path='css/bulma.min.css')~'?'~get_hash(path='css/bulma.min.css', sha_type=256) }}" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="{{ config.author }}">
<meta property="og:locale" content="{{ doc::lang() }}">
<meta property="og:site_name" content="{{ config.title }}">
<meta property="og:title" content="{%- include "partials/title.html" -%}">
{%- if not section and not page -%}
<meta name="robots" content="noindex">
{%- endif -%}

View file

@ -0,0 +1,4 @@
{%- set doc_lang = doc::lang() -%}
{%- if doc_lang != lang -%}
lang="{{ doc_lang }}"
{%- endif -%}

View file

@ -0,0 +1,3 @@
{%- if not section and not page -%} {{ "Erreur 404" }} {%- else -%} {%- set doc
= section | default(value=page | default(value=false)) -%} {{- doc.title -}} {%-
endif -%}