diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/_macros.html | 7 | ||||
-rw-r--r-- | templates/_variables.html | 2 | ||||
-rw-r--r-- | templates/index.html | 90 |
3 files changed, 32 insertions, 67 deletions
diff --git a/templates/_macros.html b/templates/_macros.html index 88a2f47..7c301a9 100644 --- a/templates/_macros.html +++ b/templates/_macros.html @@ -8,8 +8,9 @@ </a> <nav> - {% for page in section.pages %} - <a class="nav-item subtitle-text" href="{{ page.permalink }}">{{ page.title }}</a> + {% for subpath in section.subsections %} + {% set sub = get_section(path=subpath) %} + <a class="nav-item subtitle-text" href="{{ sub.permalink }}">{{ sub.title }}</a> {% endfor %} {% if config.extra.juice_extra_menu %} {% for menu in config.extra.juice_extra_menu %} @@ -17,4 +18,4 @@ {% endfor %} {% endif %} </nav> -{% endmacro render_header %}
\ No newline at end of file +{% endmacro render_header %} diff --git a/templates/_variables.html b/templates/_variables.html index 8480408..53a9d8b 100644 --- a/templates/_variables.html +++ b/templates/_variables.html @@ -3,7 +3,7 @@ /* Primary theme color */ --primary-color: #ea596e; /* Primary theme text color */ - --primary-text-color: #543631; + --primary-text-color: #fafafa; /* Primary theme link color */ --primary-link-color: #d45063; /* Secondary color: the background body color */ diff --git a/templates/index.html b/templates/index.html index 3afc311..abbfeb6 100644 --- a/templates/index.html +++ b/templates/index.html @@ -10,8 +10,6 @@ <link rel="icon" type="image/png" href="/favicon.ico"> {% endblock favicon %} {% include "_variables.html" %} - <link href="https://fonts.googleapis.com/css?family=Alfa+Slab+One&display=swap" rel="stylesheet"> - <link href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600&display=swap" rel="stylesheet"> <link rel="stylesheet" href="/normalize.css"> <link rel="stylesheet" href="{{ get_url(path="juice.css") }}"> {% block head %} @@ -23,83 +21,49 @@ <header class="box-shadow"> {{ macros::render_header() }} </header> - - {#<header class="pos-absolute" style="background-color: transparent"> - {{ macros::render_header() }} - </header>#} - - {#<div class="hero"> - {% block hero %} - <script async defer src="https://buttons.github.io/buttons.js"></script> - <section class="text-center"> - <h1 class="heading-text" style="font-size: 50px"> - Build your static website - </h1> - <h3 class="title-text"> - <b>Juice</b> is an intuitive, elegant, and lightweight Zola theme for product websites. - </h3> - <div> - <a class="github-button" href="https://github.com/huhu/juice" data-size="large" data-show-count="true" - aria-label="Star huhu/juice on GitHub">Star</a> - <a class="github-button" href="https://github.com/huhu/juice/fork" data-size="large" - data-show-count="true" aria-label="Fork huhu/juice on GitHub">Fork</a> - </div> - </section> - <img class="hero-image" style="width: 50%" src="{{ get_url(path="juice.svg") }}"> - - <div class="explore-more text" - onclick="document.getElementById('features').scrollIntoView({behavior: 'smooth'})"> - Explore More ⇩ - </div> - <style> - .hero section { - padding: 0 5rem; - } - @media screen and (max-width: 768px) { - .hero section { - padding: 0 2rem; - } - - .hero-image { - display: none - } - } - </style> - {% endblock hero %} - </div> - #} {% endblock header %} <main> {% block toc %} - {% if section.toc %} - {% set toc = section.toc %} - {% elif page.toc %} - {% set toc = page.toc %} - {% endif %} - {% if toc %} + {% if page.ancestors %} + {% set section = get_section(path=page.ancestors | last) %} + {% endif %} + {% if section.ancestors %} + {% set parent = get_section(path=section.ancestors | last) %} + {% endif %} <div class="toc"> <div class="toc-sticky"> - {% for h in toc %} - <div class="toc-item"> - <a class="subtext" href="{{h.permalink | safe}}">{{ h.title }}</a> + <div class="toc-item toc-section"> + <a class="subtext" href="{{section.permalink | safe}}">{{ section.title }}</a> </div> - {% if h.children %} - {% for h2 in h.children %} - <div class="toc-item-child"> - <a class="subtext" href="{{h2.permalink | safe}}"><small>- {{ h2.title }}</small></a> + {% if section.subsections %} + {% for s in section.subsections %} + {% set p = get_section(path=s) %} + <div class="toc-item"> + <a class="subtext" href="{{ p.permalink | safe}}">{{ p.title }}</a> </div> {% endfor %} - {% endif %} + {% endif %} + + {% if section.pages %} + {% for p in section.pages %} + <div class="toc-item"> + <a class="subtext" href="{{p.permalink | safe}}">{{ p.title }}</a> + </div> {% endfor %} + {% endif %} + {% if parent %} + <div class="toc-item"> + <a class="subtext" href="{{parent.permalink | safe}}">← Retour</a> + </div> + {% endif %} </div> </div> - {% endif %} {% endblock toc %} <div class="content text"> {% block content %} - <div id="features" class="heading-text">Overview</div> + <div id="features" class="heading-text">{{ section.title }} </div> {{ section.content | safe }} {% endblock content %} </div> |