Skip to content

Commit

Permalink
Inital dev of JFM-Engine (#13)
Browse files Browse the repository at this point in the history
* port galae website to jssg prototype

* Compatibility with jinja2 templates 
* Add macros for jinja2 widget templates

* Start of work on tree structure
* Widgets callable with Jinja macros
* Versions for blocks (allow user language specific templates, like `fr` or `en` for example)
* Multiple content repertories (allow to get content from local and/or other repo sources - this make possible to manage JFM-Engine source code and website content on several distinct repositories)
* Generation of sitemap.xml file
* Add parameter for site domain name
* Work on Galae content - this is the first targeted website for JFM-Engine.
* Fix : docker build

---------

Co-authored-by: Clément <[email protected]>
Co-authored-by: Damien Accorsi <[email protected]>
  • Loading branch information
3 people authored Jun 27, 2024
1 parent 904fadc commit ed66340
Show file tree
Hide file tree
Showing 128 changed files with 14,987 additions and 482 deletions.
15 changes: 0 additions & 15 deletions .github/dependabot.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__/

# Environments
/.direnv/
/env/

# Generated site
/dist/
Expand Down
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"
}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ RUN pip install -Ur requirements.txt \
COPY manage.py tsconfig.json vite.config.ts ./
COPY jssg/ jssg/
COPY content/ content/
COPY common-content/ common-content/
COPY galae-content/ galae-content/

# Build
RUN npm run build \
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Today, it's a django app that can generate a static website with Vite & Typescri
```shell
$ git clone https://github.com/jtremesay/jtremesay.org.git
$ cd jtremesay.org
$ python3.9 -m venv env/
$ source env/bin/activate
$ direnv allow
$ npm install
$ pip install -Ur requirements.txt
Expand Down Expand Up @@ -43,8 +45,9 @@ Or, if you prefer docker:

```shell
$ docker build -t jssg .
$ sudo docker run -p 8080:80 jssg:latest
```

## Others

This repo is a fork of https://github.com/jtremesay/jssg.git for algoo websites use cases.
```
77 changes: 77 additions & 0 deletions common-content/templates/jinja2/blocks/en/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<footer class="footer bg-light">
<div class="container">
<div class="row">
<div class="col-lg-3 h-100 text-center text-lg-start my-auto">
<p>
Marketed by
<a href="https://www.algoo.fr" target="_blank">algoo</a>.
<br/>
<i class="bi-fw bi-phone-vibrate"></i>&nbsp;&nbsp;<a href="tel:+33972497220">(+33)
9.72.49.72.20</a>
<br/>
<i class="bi-envelope-at"></i>&nbsp;&nbsp;[email protected]
</p>
</div>
<div class="col-lg-3 h-100 text-center text-lg-start my-auto">
<ul class="list-unstyled mb-0">
<li class="list-item me-4">
<a href="{{ url('index') }}">Home</a>
</li>
<li class="list-item me-4">
<a href="{{ url('page', args=['temoignages-clients']) }}">Customer testimonials (FR)</a>
</li>
<li class="list-item me-4">
<a href="{{ static('assets/docs/galae_price_list.pdf') }}" target="_blank">Download the price
list</a>
</li>
<li class="list-item me-4">
<a href="https://pay.galae.net/?current_tab=Strangers" target="_blank">Susbcribe</a>
</li>
</ul>
</div>
<div class="col-lg-3 h-100 text-center text-lg-start my-auto">
<ul class="list-unstyled mb-0">
<li class="list-item me-4">
<a href="https://webmail.galae.net/" target="_blank">Webmail</a>
</li>
<li class="list-item me-4">
<a href="https://community.galae.net/" target="_blank">Community and support</a>
</li>
<li class="list-item me-4">
<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>
</li>
</ul>
</div>
<div class="col-lg-3 h-100 text-center text-lg-end my-auto">
<ul class="list-inline mb-0">
<li class="list-inline-item me-4">
<a href="https://www.algoo.fr" title="algoo website" target="_blank"><i
class="bi-globe fs-3"></i></a>
</li>

<li class="list-inline-item me-4">
<a href="#!" title="Contact-us by e-mail"
onclick="this.href='mailto:[email protected]?subject=Hello, I\'d like to know more about your galae e-mail offers...'"><i
class="bi-envelope fs-3"></i></a>
</li>

<li class="list-inline-item me-4">
<a href="https://public-community.galae.net"
title="Community, documentation, forums and help" target="_blank">
<i class="bi-people-fill fs-3"></i>
</a>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-12">
<p class="text-muted small mt-4 mb-2 mb-lg-0">&copy; Algoo 2023-2024. All rights
reserved.</p>
</div>
</div>
</div>
</footer>
6 changes: 6 additions & 0 deletions common-content/templates/jinja2/blocks/en/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% from "widgets/page_header.html" import page_header%}

{{ page_header(
PRIMARY_TITLE = "galae - the free, ethical, pay-per-use e-mail service",
SECONDARY_TITLE = "Standard, interoperable e-mails and a service entirely based on self-hosting ready technologies",
) }}
78 changes: 78 additions & 0 deletions common-content/templates/jinja2/blocks/fr/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<footer class="footer bg-light">
<div class="container">
<div class="row">
<div class="col-lg-3 h-100 text-center text-lg-start my-auto">
<p>
Service commercialisé par
<a href="https://www.algoo.fr" target="_blank">algoo</a>.
<br/>
<i class="bi-fw bi-phone-vibrate"></i>&nbsp;&nbsp;<a href="tel:+33972497220">(+33)
9.72.49.72.20</a>
<br/>
<i class="bi-envelope-at"></i>&nbsp;&nbsp;[email protected]
</p>
</div>
<div class="col-lg-3 h-100 text-center text-lg-start my-auto">
<ul class="list-unstyled mb-0">
<li class="list-item me-4">
<a href="{{ url('index') }}">Accueil</a>
</li>
<li class="list-item me-4">
<a href="{{ url('page', args=['temoignages-clients']) }}">Témoignages clients</a>
</li>
<li class="list-item me-4">
<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">
<a href="https://pay.galae.net/" target="_blank">Passer commande</a>
</li>
</ul>
</div>
<div class="col-lg-3 h-100 text-center text-lg-start my-auto">
<ul class="list-unstyled mb-0">
<li class="list-item me-4">
<a href="https://webmail.galae.net/" target="_blank">Accès Webmail</a>
</li>
<li class="list-item me-4">
<a href="https://community.galae.net/" target="_blank">Espace communautaire et
Support</a>
</li>
<li class="list-item me-4">
<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>
</li>
</ul>
</div>
<div class="col-lg-3 h-100 text-center text-lg-end my-auto">
<ul class="list-inline mb-0">
<li class="list-inline-item me-4">
<a href="https://www.algoo.fr" title="Site web algoo" target="_blank"><i
class="bi-globe fs-3"></i></a>
</li>

<li class="list-inline-item me-4">
<a href="#!" title="Contactez-nous par e-mail"
onclick="this.href='mailto:[email protected]?subject=Hello, j\'aimerais en savoir plus sur vos offres e-mail galae...'"><i
class="bi-envelope fs-3"></i></a>
</li>

<li class="list-inline-item me-4">
<a href="https://public-community.galae.net"
title="Communauté, documentation, forums et aide" target="_blank">
<i class="bi-people-fill fs-3"></i>
</a>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-12">
<p class="text-muted small mt-4 mb-2 mb-lg-0">&copy; Algoo 2023-2024. Tous droits
réservés.</p>
</div>
</div>
</div>
</footer>
6 changes: 6 additions & 0 deletions common-content/templates/jinja2/blocks/fr/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% from "widgets/page_header.html" import 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 !"
) }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% macro page_block_h2_with_content_and_primary_secondary_cta(
HTMLID="",
TITLE="",
CONTENT="",
MAIN_IMG_URL="",
MAIN_IMG_ALT="",
SECONDARY_CTA_URL="",
SECONDARY_CTA_TARGET="",
SECONDARY_CTA_LABEL="",
PRIMARY_CTA_URL="",
PRIMARY_CTA_TARGET="",
PRIMARY_CTA_LABEL="",
PRIMARY_CTA_ICON=""
)
%}

<section id="{{ HTMLID }}" class="testimonials bg-light">
<div class="container">
<h2 class="mb-5">{{ TITLE|safe }}</h2>
<div class="row">
<div class="col-lg-12">
<p class="lead mb-0">
{{ CONTENT|safe }}
</p>
<p class="lead mb-0 text-center">
<img
class="testimonials__priceList__img"
src="{{ static(MAIN_IMG_URL) }}"
alt="{{ MAIN_IMG_ALT }}"
/>
</p>
<p class="lead mb-0 text-center">
<a href="{{ static(SECONDARY_CTA_URL) }}" target="{{ SECONDARY_CTA_TARGET }}"
class="btn btn-link btn-lg">
{{ SECONDARY_CTA_LABEL }}
</a>
<a href="{{ PRIMARY_CTA_URL }}" target="{{ PRIMARY_CTA_TARGET }}"
class="btn btn-primary btn-lg">
{{ PRIMARY_CTA_LABEL }}
<i class="{{ PRIMARY_CTA_ICON }}"></i>
</a>
</p>
</div>
</div>
</div>
</section>

{% endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% macro page_block_h2_with_content_dark_background_no_cta(
HTMLID = "",
TITLE = "",
CONTENT = ""
)
%}

<section id="{{ HTML_ID }}" class="testimonials bg-dark text-white">
<div class="container">
<h2 class="mb-5">{{ TITLE|safe }}</h2>
<div class="row">
<div class="col-lg-12">
{{ CONTENT|safe }}
</div>
</div>
</div>
</section>

{% endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% macro page_block_h2_with_ul_content_and_image_left(
IMAGE_URL = '',
TITLE = '',
CONTENT_ITEMS = [],
CTA_URL = '',
CTA_LABEL = ''
)
%}

<div class="row g-0">
<div class="col-lg-6 text-white showcase-text" style="">
<div style="height: 100%; width: 100%; background-image: url({{ static( IMAGE_URL)}}); background-size: contain; background-repeat: no-repeat; background-position-y: center; background-position-x: center;">
</div>
</div>
<div class="col-lg-6 my-auto showcase-text">
<h2>{{ TITLE|safe }}</h2>
<p class="lead">
<ul>{% for ITEM in CONTENT_ITEMS %}
<li class="lead">{{ ITEM | safe }}</li>{% endfor %}</ul>
</p>
<p class="lead text-end"><a href="{{ CTA_URL }}" class="btn btn-primary">{{ CTA_LABEL }}</a></p>
</div>
</div>

{% endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% macro page_block_h2_with_ul_content_and_image_right(
IMAGE_URL = '',
TITLE = '',
CONTENT_ITEMS = [],
CTA_URL = '',
CTA_LABEL = ''
)
%}

<div class="row g-0">
<div class="col-lg-6 order-lg-2 text-white showcase-text" style="">
<div style="height: 100%; width: 100%; background-image: url({{ static(IMAGE_URL)}}); background-size: contain; background-repeat: no-repeat; background-position-y: center; background-position-x: center;">
</div>
</div>
<div class="col-lg-6 order-lg-1 my-auto showcase-text">
<h2>{{ TITLE|safe }}</h2>
<p class="lead">
<ul>{% for ITEM in CONTENT_ITEMS %}
<li class="lead">{{ ITEM | safe }}</li>{% endfor %}</ul>
</p>
<p class="lead text-end"><a href="{{ CTA_URL }}" class="btn btn-primary">{{ CTA_LABEL }}</a></p>
</div>
</div>

{% endmacro %}
30 changes: 30 additions & 0 deletions common-content/templates/jinja2/widgets/page_header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% macro page_header(
PRIMARY_TITLE="",
SECONDARY_TITLE="",
THIRD_TITLE=""
)
%}

<!-- Masthead-->
<header class="masthead">
<div class="container position-relative">
<div class="row justify-content-center">
<div class="col-xl-9">
<div class="text-center text-white">
<!-- Page heading-->
<h1 class="mb-5">
{{ PRIMARY_TITLE|safe }}
</h1>
{% if SECONDARY_TITLE %}
<h2>{{ SECONDARY_TITLE|safe }}</h2>
{% endif %}
{% if THIRD_TITLE %}
<h3 class="navbar__logo__label"><i>{{ THIRD_TITLE|safe }}</i></h3>
{% endif %}
</div>
</div>
</div>
</div>
</header>

{% endmacro %}
Loading

0 comments on commit ed66340

Please sign in to comment.