diff options
author | Joris | 2020-02-02 13:53:54 +0100 |
---|---|---|
committer | Joris | 2020-02-02 13:58:19 +0100 |
commit | 0ce8744897b9aa13ea568a6985da9570e4aca90b (patch) | |
tree | 3619508ff9ec5d846c567c3562d05ca77e686c76 /templates | |
parent | 13d29804ba4bb8d578fb0278ddeb6e187bbafa6f (diff) |
Use zola generator
- Use CSS instead of Haskell with Clay
- Use TypeScript instead of PureScript
Diffstat (limited to 'templates')
-rw-r--r-- | templates/index.html | 77 | ||||
-rw-r--r-- | templates/page.html | 15 | ||||
-rw-r--r-- | templates/recipe-list.html | 39 | ||||
-rw-r--r-- | templates/recipe.html | 16 | ||||
-rw-r--r-- | templates/section.html | 4 |
5 files changed, 90 insertions, 61 deletions
diff --git a/templates/index.html b/templates/index.html index e6faafd..74bf36f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,15 +1,80 @@ <!DOCTYPE html> <html lang="fr"> + <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>$title$</title> + <title>Recettes</title> <link rel="stylesheet" href="/main.css" /> - <link rel="icon" href="/images/icon.png"> + <link rel="icon" href="/icon.png"> </head> - <body> - <div class="header">$title$</div> - <div id="content">$body$</div> - <script src="/main.js"></script> + + <body class="g-Page"> + + <header class="g-Page__Header"> + Recettes + </header> + + <main class="g-Page__Content"> + {% block content %} + + <h1>Plats</h1> + + <ul class="g-Page__Recipes"> + {% set section = get_section(path = "plats/_index.md") %} + {% for page in section.pages | sort(attribute = "title") %} + <li class="g-Page__Recipe"> + <a class="g-Link" href="{{ page.permalink }}"> + {{ page.title }} + </a> + </li> + {% endfor %} + </ul> + + <h1>Desserts</h1> + + <h2>Hypoglucidiques</h2> + + <ul class="g-Page__Recipes"> + {% set section = get_section(path = "desserts/hypoglucidique/_index.md") %} + {% for page in section.pages | sort(attribute = "title") %} + <li class="g-Page__Recipe"> + <a class="g-Link" href="{{ page.permalink }}"> + {{ page.title }} + </a> + </li> + {% endfor %} + </ul> + + <h2>Hyperglucidiques</h2> + + <ul class="g-Page__Recipes"> + {% set section = get_section(path = "desserts/hyperglucidique/_index.md") %} + {% for page in section.pages | sort(attribute = "title") %} + <li class="g-Page__Recipe"> + <a class="g-Link" href="{{ page.permalink }}"> + {{ page.title }} + </a> + </li> + {% endfor %} + </ul> + + <h1>Nettoyage</h1> + + <ul class="g-Page__Recipes"> + {% set section = get_section(path = "nettoyage/_index.md") %} + {% for page in section.pages | sort(attribute = "title") %} + <li class="g-Page__Recipe"> + <a class="g-Link" href="{{ page.permalink }}"> + {{ page.title }} + </a> + </li> + {% endfor %} + </ul> + + {% endblock content %} + </main> + </body> + </html> diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..370eaf0 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,15 @@ +{% extends "index.html" %} + +{% block content %} + + <a class="g-Link" href="/"> + ← Retour à l’accueil + </a> + + <div class="g-Recipe"> + {{ page.content | safe }} + </div> + + <script src="/main.js"></script> + +{% endblock content %} diff --git a/templates/recipe-list.html b/templates/recipe-list.html deleted file mode 100644 index 64ae045..0000000 --- a/templates/recipe-list.html +++ /dev/null @@ -1,39 +0,0 @@ -<h1>Plats</h1> - -<ul> - $for(mainDishes)$ - <li> - <a href="$url$">$title$</a> - </li> - $endfor$ -</ul> - -<h1>Desserts hypoglucidiques</h1> - -<ul> - $for(lowCarbDesserts)$ - <li> - <a href="$url$">$title$</a> - </li> - $endfor$ -</ul> - -<h1>Desserts hyperglucidiques</h1> - -<ul> - $for(highCarbDesserts)$ - <li> - <a href="$url$">$title$</a> - </li> - $endfor$ -</ul> - -<h1>Nettoyage</h1> - -<ul> - $for(cleaningRecipes)$ - <li> - <a href="$url$">$title$</a> - </li> - $endfor$ -</ul> diff --git a/templates/recipe.html b/templates/recipe.html deleted file mode 100644 index 6585f33..0000000 --- a/templates/recipe.html +++ /dev/null @@ -1,16 +0,0 @@ -<!DOCTYPE html> -<html lang="fr"> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>$title$</title> - <link rel="stylesheet" href="/main.css" /> - <link rel="icon" href="/images/icon.png"> - </head> - <body> - <div class="header">$title$</div> - <a href="/">⭠ Retour</a> - <div id="content">$body$</div> - <script src="/main.js"></script> - </body> -</html> diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..fe1da7f --- /dev/null +++ b/templates/section.html @@ -0,0 +1,4 @@ +{% extends "index.html" %} + +{% block content %} +{% endblock content %} |