diff options
author | sptaule <lecas83@gmail.com> | 2022-01-27 15:03:27 +0100 |
---|---|---|
committer | sptaule <lecas83@gmail.com> | 2022-01-27 15:03:27 +0100 |
commit | 67250dca95369b7cd1afbdaf694b022b008e5009 (patch) | |
tree | 138d0330cad5112933d2c5154876b80564bed731 /templates/base.html | |
parent | 9eeadd1e667d7908b1ffd707662676cee63d1ede (diff) | |
download | garagehq.deuxfleurs.fr-67250dca95369b7cd1afbdaf694b022b008e5009.tar.gz garagehq.deuxfleurs.fr-67250dca95369b7cd1afbdaf694b022b008e5009.zip |
Added gobal Search, template partials, deleted shortcodes not in use
Diffstat (limited to 'templates/base.html')
-rwxr-xr-x | templates/base.html | 204 |
1 files changed, 34 insertions, 170 deletions
diff --git a/templates/base.html b/templates/base.html index 1e44aa7..8170b44 100755 --- a/templates/base.html +++ b/templates/base.html @@ -1,206 +1,70 @@ {% import 'macros.html' as macros %} <!DOCTYPE html> -<html lang="{{lang}}"> +<html lang="{{ lang }}"> <head> <meta charset="utf-8" /> <meta content="width=device-width, initial-scale=1" name="viewport" /> - <meta content="#ffffff" name="theme-color" /> - <meta content="#da532c" name="msapplication-TileColor" /> - - {% if config.extra.favicon.webmanifest %} - <link href='{{ config.extra.favicon.webmanifest }}' rel="manifest" /> - {% endif %} - {% if config.extra.favicon.safari_pinned_tab %} - <link color="#5bbad5" href='{{ config.extra.favicon.safari_pinned_tab }}' rel="mask-icon" /> - {% endif %} - {% if config.extra.favicon.favicon_16x16 %} - <link href='{{ config.extra.favicon.favicon_16x16 }}' rel="icon" sizes="16x16" type="image/png" /> - {% endif %} - {% if config.extra.favicon.favicon_32x32 %} - <link href='{{ config.extra.favicon.favicon_32x32 }}' rel="icon" sizes="32x32" type="image/png" /> - {% endif %} - {% if config.extra.favicon.apple_touch_icon %} - <link href='{{ config.extra.favicon.apple_touch_icon }}' rel="apple-touch-icon" sizes="180x180" /> - {% endif %} - - {% if config.extra.galleria.enabled %} - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/galleria@1.6.1/dist/themes/folio/galleria.folio.min.css" - integrity="sha384-+rY0QD+LRnTOquDMzGa9lXU6jIwdiQuwCJQ2cdcW0qeP/0UbjQCZlXnRsUMA+9pH" crossorigin="anonymous"> - {% endif %} - - {% if config.extra.mapbox.enabled %} - <link rel="stylesheet" href="https://api.mapbox.com/mapbox-gl-js/v2.6.1/mapbox-gl.css" - integrity="sha384-oGm59HWAkwO32h2w8u0B98wKBZJwd6MbWtAJwQKCTffZjOXHXrnyv9Syjovgc+UV" crossorigin="anonymous"> - {% endif %} - - <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1.9.1/css/academicons.min.css" - integrity="sha384-FIue+PI4SsI9XfHCz8dBLg33b0c1fMJgNU3X//L26FYbGnlSEfWmNT7zgWc2N9b6" crossorigin="anonymous"> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css" - integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous"> - <link href="{{ get_url(path='style.css') }}" rel="stylesheet" /> - - {% block user_custom_stylesheet %} - {% endblock %} - - <title> - {% block title %} - {{ config.title }} - {% endblock title %} - </title> - - {% if config.extra.katex.enabled %} - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css" - integrity="sha384-R4558gYOUz8mP9YWpZJjofhk+zx0AS11p36HnD2ZKj/6JR5z27gSSULCNHIRReVs" crossorigin="anonymous"> - <script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js" - integrity="sha384-z1fJDqw8ZApjGO3/unPWUPsIymfsJmyrDVWC8Tv/a1HeOtGmkwNd/7xUS0Xcnvsx" - crossorigin="anonymous"></script> - - <script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/mathtex-script-type.min.js" - integrity="sha384-jiBVvJ8NGGj5n7kJaiWwWp9AjC+Yh8rhZY3GtAX8yU28azcLgoRo4oukO87g7zDT" - crossorigin="anonymous"></script> - {% if config.extra.katex.auto_render %} - <script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js" - integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" - crossorigin="anonymous"></script> - {% endif %} - {% endif %} + {% include "partials/shared/head.html" %} </head> <body class="has-background-white"> - <nav aria-label="section navigation" class="navbar w-full" role="navigation"> - <div class="w-full flex flex-col space-y-2 md:space-y-0 md:flex-row items-center justify-between py-1 px-8 text-garage-gray bg-garage-orange bg-opacity-20"> - <div class="navbar-brand"> - <a class="hover:rounded-full hover:bg-white" href="{{config.base_url}}"> - <img class="transform duration-150 focus:bg-white hover:bg-white hover:shadow rounded-lg hover:scale-90" - src="{{ config.extra.organization.logo }}" width="65px"> - </a> - <a aria-expanded="false" aria-label="menu" data-target="navMenu" role="button"> - <span aria-hidden="true"></span> - <span aria-hidden="true"></span> - <span aria-hidden="true"></span> - </a> - </div> - <div class="navbar-menu" id="navMenu"> - <div class="flex items-center justify-center"> - {% for item in config.extra.navbar_items %} - {% if lang == item.code %} - {% for nav in item.nav_items %} - <a class="font-semibold focus:bg-white hover:bg-white hover:shadow px-4 py-2 rounded-lg" - href="{{ nav.url | replace(from='$BASE_URL', to=config.base_url) }}"> - {{ nav.name }} - </a> - {% endfor %} - {% endif %} - {% endfor %} - <button type="button" class="focus:bg-white hover:bg-white hover:shadow px-4 py-2 rounded-lg" id="nav-search" title="Search"> - <span class="icon"> - <i class="fas fa-search"></i> - </span> - </button> - </div> - </div> - </div> - </nav> + + {% include "partials/shared/nav.html" %} <div> {% block content %}{% endblock %} </div> - - {% block pagination %} - {% if paginator.previous or paginator.next %} - <section class="section"> - <div class="container max-w-5xl mx-auto flex items-center justify-center"> - <nav class="pagination flex items-center my-12 text-garage-gray" role="navigation" aria-label="pagination"> - {% if paginator.previous %} - <a class="flex items-center justify-center space-x-2 hover:text-garage-orange" - href='{{ paginator.previous }}' {% if not paginator.previous %}disabled{% endif %}> - <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" - xmlns="http://www.w3.org/2000/svg"> - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" - d="M7 16l-4-4m0 0l4-4m-4 4h18"></path> - </svg> - <span>Prev</span> - </a> - {% endif %} - <ul class="flex space-x-4 px-4"> - {% for pager in range(start=1, end=paginator.number_pagers+1) %} - <li> - <a class="font-semibold inline-flex items-center justify-center h-7 w-7 rounded hover:shadow hover:bg-garage-orange bg-garage-gray bg-opacity-20 border-b-2 {% if paginator.current_index == pager %}border-garage-orange{% else %}border-transparent{% endif %}" - href='{{ paginator.base_url }}{{pager}}' aria-label="Goto page {{pager}}"> - {{pager}} - </a> - </li> - {% endfor %} - </ul> - {% if paginator.next %} - <a class="flex items-center justify-center space-x-2 hover:text-garage-orange" - href='{{ paginator.next }}' {% if not paginator.next %}disabled{% endif %}> - <span>Next</span> - <svg class="mt-0.5 w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" - xmlns="http://www.w3.org/2000/svg"> - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" - d="M17 8l4 4m0 0l-4 4m4-4H3"></path> - </svg> - </a> - {% endif %} - </nav> + {% block search %} + <section id="search-modal" class="modal hidden bg-gray-50 w-5/6 md:w-4/5 lg:w-3/4 xl:w-2/3 2xl:w-1/2 absolute top-20 left-1/2 transform -translate-x-1/2 shadow-xl rounded-lg"> + <div class="p-2 md:p-4 xl:p-8"> + <section class="relative flex flex-col items-center justify-center"> + <div class="field mt-8 md:mt-0 mb-2"> + <div class="control"> + <input + id="search" + class="p-2 md:p-4 shadow rounded-lg outline-2 focus:outline outline-garage-orange" + placeholder="Search on Garage..." type="search" /> + </div> + </div> + <div class="search-results hidden mt-8 p-2 md:p-4 w-full bg-white rounded shadow"> + <div class="search-results__items max-h-96 overflow-y-scroll p-2 md:p-4"></div> + </div> + </section> + <button aria-label="close" id="close-modal-btn" class="absolute top-2 right-2 flex items-center group rounded-full shadow-inner bg-gray-300 border border-transparent hover:border-gray-500 bg-opacity-50 p-2"> + <svg id="close-modal-btn-icon" class="w-6 h-6 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg> + <small class="text-xs text-gray-400">(Esc)</small> + </button> </div> </section> - {% endif %} {% endblock %} - {% block comment %} + {% block pagination %} + {% include "partials/shared/paginator.html" %} {% endblock %} - <footer class="py-4 bg-garage-orange bg-opacity-20"> - <div class="content has-text-centered flex flex-col items-center justify-center"> - <p> - {{ macros:: social_links( social_config=config.extra.social) }} - </p> - <p class="text-gray-600 py-2"> - Powered by <a href="https://www.getzola.org" target="_blank" - class="font-semibold hover:text-garage-orange">Zola</a> - </p> - </div> - </footer> + {% block comment %}{% endblock %} + + {% include "partials/shared/footer.html" %} - {% if config.extra.galleria.enabled %} - <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js" - integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" - crossorigin="anonymous"></script> - <script src="https://cdn.jsdelivr.net/npm/galleria@1.6.1/dist/galleria.min.js" - integrity="sha384-QSfwGT8/EU536DKdtyP2D6SLlh8zBaZ0cVkwfrwhqzIU9VCfJT00CLVP5t+HAiYg" - crossorigin="anonymous"></script> - <script src="https://cdn.jsdelivr.net/npm/galleria@1.6.1/dist/themes/folio/galleria.folio.min.js" - integrity="sha384-DwpKI+deZB267+hPKwiOIc5Y2GKsVL0mR6hgz7GgIu7AgAMYqJwcJKY1YBNfhWcY" - crossorigin="anonymous"></script> - {% endif %} {% if config.extra.mermaid.enabled %} <script src="https://cdn.jsdelivr.net/npm/mermaid@8.13.5/dist/mermaid.min.js" integrity="sha384-0yWn54pSGtfKCU+skfA69l25VsCw+MZt4LQov3xNRoS7YkAMrFokGgSBnAWSK4pv" crossorigin="anonymous"></script> {% endif %} - {% if config.extra.chart.enabled %} - <script src="https://cdn.jsdelivr.net/npm/chart.xkcd@1.1.13/dist/chart.xkcd.min.js" - integrity="sha384-xC3h1+IHXK8seA+8KfT79Z4e0GPsznjXBoMa5nd8ooWKplPyXx92NOmljWxLC/cs" - crossorigin="anonymous"></script> - {% endif %} + <script src="{{ get_url(path='elasticlunr.min.js') }}"></script> - <script src="{{ get_url(path='search_index.' ~ lang ~ '.js') }}"></script> + <!-- <script src="{{ get_url(path='search_index.' ~ lang ~ '.js') }}"></script> --> {%- if lang != "en" -%} - {%- block other_lang_search_js -%} - {%- endblock -%} + {%- block other_lang_search_js -%}{%- endblock -%} {%- endif -%} <script src="{{ get_url(path='js/site.js') }}"></script> - {% block custom_js %} - {% endblock %} + {% block custom_js %}{% endblock %} - {% block user_custom_js %} - {% endblock %} + {% block user_custom_js %}{% endblock %} </body> </html>
\ No newline at end of file |