diff --git a/README.md b/README.md index 94486f0..b91edad 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ - [ ] Optimize images - [ ] Automate the file search - [ ] Extract data out of the template +- [ ] Create a 'all' key for data available in all templates - [ ] Create a template for the rooms - [ ] Build script before commit @@ -28,4 +29,5 @@ ## Built with - [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) - fast, expressive, extensible templating - engine \ No newline at end of file + engine +- [Netlify](https://www.netlify.com/) - Develop and deploy websites and apps in record time \ No newline at end of file diff --git a/dist/contact.html b/dist/contact.html index 189111f..89bc8a4 100644 --- a/dist/contact.html +++ b/dist/contact.html @@ -67,7 +67,7 @@ - +590 690 44 15 30 + +33 6 58 96 12 79 @@ -96,7 +96,7 @@

Voici l'occasion de nous contacter si vous êtes à la recherche d'une location capable d'offrir une expérience étonnante en termes de confort et de détente location.villafleurie@gmail.com ou - appelez-nous quand vous le pouvez +590 690 44 15 30

+ appelez-nous quand vous le pouvez +33 6 58 96 12 79

. diff --git a/dist/index.html b/dist/index.html index 35652f1..1bdb98f 100644 --- a/dist/index.html +++ b/dist/index.html @@ -67,7 +67,7 @@ - +590 690 44 15 30 + +33 6 58 96 12 79 diff --git a/dist/reservation.html b/dist/reservation.html index 51f1d2d..8edf0ec 100644 --- a/dist/reservation.html +++ b/dist/reservation.html @@ -67,7 +67,7 @@ - +590 690 44 15 30 + +33 6 58 96 12 79 @@ -88,7 +88,6 @@ -

diff --git a/dist/t3-azur.html b/dist/t3-azur.html index 2442029..8706fda 100644 --- a/dist/t3-azur.html +++ b/dist/t3-azur.html @@ -67,7 +67,7 @@ - +590 690 44 15 30 + +33 6 58 96 12 79 diff --git a/lib/engine.py b/lib/engine.py index dc65976..0b85364 100644 --- a/lib/engine.py +++ b/lib/engine.py @@ -3,5 +3,5 @@ from jinja2 import Environment, FileSystemLoader, select_autoescape engine = Environment(loader=FileSystemLoader("templates"), autoescape=select_autoescape()) -def render(template: str) -> str: - return engine.get_template(template).render() +def render(template: str, context: dict | None = None) -> str: + return engine.get_template(template).render(context or {}) diff --git a/lib/main.py b/lib/main.py index 067ee0f..4b37e0b 100644 --- a/lib/main.py +++ b/lib/main.py @@ -18,7 +18,7 @@ def main(): for template in config["templates"]: logger.info(f"📃Render '{template}'") with open(path.join(config["outDir"], template), "w") as f: - f.write(render(template)) + f.write(render(template, data.get(template))) logger.info("🎉 Done…") diff --git a/templates/contact.html b/templates/contact.html index 4d9c22c..e10e0cb 100644 --- a/templates/contact.html +++ b/templates/contact.html @@ -21,7 +21,7 @@

Voici l'occasion de nous contacter si vous êtes à la recherche d'une location capable d'offrir une expérience étonnante en termes de confort et de détente location.villafleurie@gmail.com ou - appelez-nous quand vous le pouvez +590 690 44 15 30

+ appelez-nous quand vous le pouvez +33 6 58 96 12 79

. diff --git a/templates/layout.html b/templates/layout.html index 46193bb..b99f858 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -67,7 +67,7 @@ - +590 690 44 15 30 + +33 6 58 96 12 79