Skip to content

Commit

Permalink
Start of work on tree structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Clément committed Jun 25, 2024
1 parent 2593e05 commit 0324300
Show file tree
Hide file tree
Showing 106 changed files with 155 additions and 265 deletions.
15 changes: 0 additions & 15 deletions .github/dependabot.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .vite/deps_temp_3bdf9138/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<a href="{{ url('index') }}">Home</a>
</li>
<li class="list-item me-4">
<a href="{{ url('page', args=['temoignages-clients']) }}">Customer testimonials (FR)</a>
<a href="{{ url_slug('page', 'temoignages-clients') }}">Customer testimonials (FR)</a>
</li>
<li class="list-item me-4">
<a href="../assets/docs/galae_price_list.pdf" target="_blank">Download the price
<a href="{{ static('assets/docs/galae_price_list.pdf') }}" target="_blank">Download the price
list</a>
</li>
<li class="list-item me-4">
Expand All @@ -41,7 +41,7 @@
<a href="https://mail.galae.net/" target="_blank">Account management</a>
</li>
<li class="list-item me-4">
<a href="{{ url('page', args=['generateur-enregistrements-dns']) }}">DNS record generator (FR)</a>
<a href="{{ url_slug('page', 'generateur-enregistrements-dns') }}">DNS record generator (FR)</a>
</li>
</ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<a href="{{ url('index') }}">Accueil</a>
</li>
<li class="list-item me-4">
<a href="{{ url('page', args=['temoignages-clients']) }}">Témoignages clients</a>
<a href="{{ url_slug('page', 'temoignages-clients') }}">Témoignages clients</a>
</li>
<li class="list-item me-4">
<a href="../assets/docs/grille_tarifaire_galae.pdf" target="_blank">Télécharger la
<a href="{{ static('assets/docs/grille_tarifaire_galae.pdf') }}" target="_blank">Télécharger la
grille tarifaire</a>
</li>
<li class="list-item me-4">
Expand All @@ -42,7 +42,7 @@
<a href="https://mail.galae.net/" target="_blank">Gestion de mon compte</a>
</li>
<li class="list-item me-4">
<a href="{{ url('page', args=['generateur-enregistrements-dns']) }}">Générateur d'enregistrements DNS</a>
<a href="{{ url_slug('page', 'generateur-enregistrements-dns') }}">Générateur d'enregistrements DNS</a>
</li>
</ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% from "widgets/page_header.html" import page_header%}

{{ page_header(
{{ page_header (
PRIMARY_TITLE = "le service e-mail éthique et libre facturé à l'usage",
SECONDARY_TITLE = "pour des e-mails standards et interopérables et un service intégralement basé sur des technologies auto-hébergeables",
THIRD_TITLE = "Le service est désormais ouvert !"
Expand Down
File renamed without changes.
Binary file removed content/pages/img.png
Binary file not shown.
Binary file removed content/pages/img_1.png
Binary file not shown.
174 changes: 0 additions & 174 deletions content/pages/index.md.jj

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ engine jinja2

<h2>Page 1</h2>

<p>Go to <a href="{{ url('page', args=['page2']) }}">page 2</a> </p>
<p>Go to <a href="{{ url_slug('page', 'page2') }}">page 2</a> </p>

2 changes: 1 addition & 1 deletion content/templates/django/blocks/footer.en.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<a href="{% url 'page' 'temoignages-clients' %}">Customer testimonials (FR)</a>
</li>
<li class="list-item me-4">
<a href="../assets/docs/galae_price_list.pdf" target="_blank">Download the price
<a href="{{ static('assets/docs/galae_price_list.pdf') }}" target="_blank">Download the price
list</a>
</li>
<li class="list-item me-4">
Expand Down
2 changes: 1 addition & 1 deletion content/templates/django/blocks/footer.fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<a href="{% url 'page' 'temoignages-clients' %}">Témoignages clients</a>
</li>
<li class="list-item me-4">
<a href="../assets/docs/grille_tarifaire_galae.pdf" target="_blank">Télécharger la
<a href="{{ static('assets/docs/grille_tarifaire_galae.pdf') }}" target="_blank">Télécharger la
grille tarifaire</a>
</li>
<li class="list-item me-4">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "widgets/navbar.html" import navbar %}
{% from "blocks/block.html" import block %}



Expand Down Expand Up @@ -27,43 +27,29 @@

<body>

{% if object.metadata.lang == "fr" %}
{{ navbar(
CTA_LABEL="Découvrir les tarifs",
CTA_TARGET="",
CTA_URL="#pricing",
CHANGE_LANG_URL="/pages/en-index.html",
CHANGE_LANG_FLAG_URL="assets/img/lang-gb.svg",
CHANGE_LANG_ALT="English version"
) }}
{% else %}
{{ navbar(
CTA_LABEL="See pricing",
CTA_TARGET="",
CTA_URL="#pricing",
CHANGE_LANG_URL="/pages/fr-index.html",
CHANGE_LANG_FLAG_URL="assets/img/lang-fr.svg",
CHANGE_LANG_ALT="Version française"
) }}
{% endif %}
{{ block(
NAME = "navbar",
VERSION = object.metadata.lang|default(""),
DEFAULT_NAME = "navbar.fr.html"
) }}

<header>
{% if object.metadata.lang == "fr" %}
{% include "blocks/header.fr.html" %}
{% else %}
{% include "blocks/header.en.html" %}
{% endif %}
{{ block(
NAME = "header",
VERSION = object.metadata.lang|default(""),
DEFAULT_NAME = "header.fr.html"
) }}
</header>

<main>
{% block content %}{% endblock %}
</main>

{% if object.metadata.lang == "fr" %}
{% include "blocks/footer.fr.html" %}
{% else %}
{% include "blocks/footer.en.html" %}
{% endif %}
{{ block(
NAME = "footer",
VERSION = object.metadata.lang|default(""),
DEFAULT_NAME = "footer.fr.html"
) }}

<!-- Bootstrap core JS-->
<script src="{{ static('js/bootstrap.bundle.min.js') }}"></script>
Expand Down
20 changes: 20 additions & 0 deletions content/templates/jinja2/blocks/block.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

{% macro block(NAME = "", VERSION = "", DEFAULT_NAME = "") %}

{% if VERSION != "" %}
{% include [
"blocks/" + NAME + "." + VERSION + ".html",
"blocks/" + NAME.split('.')[0] + '.' + VERSION + '.' + NAME.split('.')[-1],
"blocks/" + DEFAULT_NAME + ".html",
"blocks/" + DEFAULT_NAME
] %}
{% else %}
{% include [
"blocks/" + NAME + ".html",
"blocks/" + NAME,
"blocks/" + DEFAULT_NAME + ".html",
"blocks/" + DEFAULT_NAME
] %}
{% endif %}

{% endmacro %}
10 changes: 10 additions & 0 deletions content/templates/jinja2/blocks/navbar.en.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% from "widgets/navbar.html" import navbar %}

{{ navbar(
CTA_LABEL="See pricing",
CTA_TARGET="",
CTA_URL="#pricing",
CHANGE_LANG_URL="fr-index",
CHANGE_LANG_FLAG_URL="assets/img/lang-fr.svg",
CHANGE_LANG_ALT="Version française"
) }}
10 changes: 10 additions & 0 deletions content/templates/jinja2/blocks/navbar.fr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% from "widgets/navbar.html" import navbar %}

{{ navbar(
CTA_LABEL="Découvrir les tarifs",
CTA_TARGET="",
CTA_URL="#pricing",
CHANGE_LANG_URL="en-index",
CHANGE_LANG_FLAG_URL="assets/img/lang-gb.svg",
CHANGE_LANG_ALT="English version"
) }}
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions content/templates/jinja2/post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends "base.html" %}

{% block content %}
Publié le {{ object.timestamp.strftime("%Y-%m-%d") }}.

<h1>{{ object.title }}</h1>
{{ object.content_md|safe }}
{% endblock %}
Loading

0 comments on commit 0324300

Please sign in to comment.