aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorsptaule <lecas83@gmail.com>2022-01-29 14:42:09 +0100
committersptaule <lecas83@gmail.com>2022-01-29 14:42:09 +0100
commite6f8f43b6ca5ff00d33b3a539e67eb2255fa1dd0 (patch)
tree1c08c3482e3ac79de1b040d77e3ca3d4f37b8fad /templates
parente958d4a1d06878100170cd96ce548966e3d5222a (diff)
downloadgaragehq.deuxfleurs.fr-e6f8f43b6ca5ff00d33b3a539e67eb2255fa1dd0.tar.gz
garagehq.deuxfleurs.fr-e6f8f43b6ca5ff00d33b3a539e67eb2255fa1dd0.zip
Improve responsive, icons, refactor search, update readme
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/base.html32
-rw-r--r--templates/documentation.html2
-rwxr-xr-xtemplates/index.html22
-rwxr-xr-xtemplates/macros.html12
-rwxr-xr-xtemplates/page.html10
-rw-r--r--templates/partials/doc/toc_script.html12
-rw-r--r--templates/partials/shared/head.html13
-rw-r--r--templates/partials/shared/nav.html12
-rw-r--r--templates/partials/shared/search.html25
-rwxr-xr-xtemplates/section.html10
10 files changed, 73 insertions, 77 deletions
diff --git a/templates/base.html b/templates/base.html
index 41121c3..d947c50 100755
--- a/templates/base.html
+++ b/templates/base.html
@@ -13,40 +13,14 @@
{% include "partials/shared/nav.html" %}
- <div>
- {% block content %}{% endblock %}
- </div>
+ {% block content %}{% endblock %}
{% block search %}
- <section id="search-modal" class="modal hidden bg-gradient-to-b from-gray-50 to-gray-100 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-2xl rounded-lg">
- <div class="p-2 md:p-4 xl:p-8 border-8 border-gray-300 rounded-lg shadow-inner" style="min-height:30vh;">
- <section class="relative flex flex-col items-center justify-center">
- <div class="flexs items-center justify-center">
- <span class="text-xl inline-block font-thin">Search</span>
- <span class="font-normal inline-block text-xs text-gray-500">(alt + S)</span>
- </div>
- <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 focus:outline outline-garage-orange"></div>
- </div>
- </section>
- <button aria-label="close" id="close-modal-btn" class="absolute top-4 right-4 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>
+ {% include "partials/shared/search.html" %}
{% endblock %}
{% block pagination %}
- {% include "partials/shared/paginator.html" %}
+ {% include "partials/shared/paginator.html" %}
{% endblock %}
{% block comment %}{% endblock %}
diff --git a/templates/documentation.html b/templates/documentation.html
index 09dcad9..55a5c61 100644
--- a/templates/documentation.html
+++ b/templates/documentation.html
@@ -6,7 +6,7 @@
{% block content %}
{% set section = get_section(path="documentation/_index.md") %}
- <section class="section overflow-x-hidden">
+ <section id="documentation-section" class="section overflow-x-hidden">
<div class="grid grid-cols-1 xl:grid-cols-5">
{% include "partials/doc/global_toc.html" %}
<div class="col-span-full xl:col-span-3" style="min-height:85vh;">
diff --git a/templates/index.html b/templates/index.html
index f3a9379..1f09edd 100755
--- a/templates/index.html
+++ b/templates/index.html
@@ -11,26 +11,26 @@
<div class="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-3 gap-x-32 py-12">
<div class="group flex flex-col items-center justify-center p-2">
<img src="{{ get_url(path='images/host.png') }}" class="transform group-hover:translate-y-2 transition duration-500">
- <span class="text-xl text-gray-700 font-semibold mt-4 transform group-hover:-translate-y-1 transition duration-500">Host a Website</span>
+ <span class="text-xl text-gray-700 font-semibold mt-4 transform group-hover:-translate-y-1 transition duration-500 whitespace-nowrap">Host a Website</span>
</div>
<div class="group flex flex-col items-center justify-center p-2">
<img src="{{ get_url(path='images/store.png') }}" class="transform group-hover:translate-y-2 transition duration-500">
- <span class="text-xl text-gray-700 font-semibold mt-4 transform group-hover:-translate-y-1 transition duration-500">Store Media</span>
+ <span class="text-xl text-gray-700 font-semibold mt-4 transform group-hover:-translate-y-1 transition duration-500 whitespace-nowrap">Store Media</span>
</div>
<div class="group flex flex-col items-center justify-center p-2">
<img src="{{ get_url(path='images/backup.png') }}" class="transform group-hover:translate-y-2 transition duration-500">
- <span class="text-xl text-gray-700 font-semibold mt-4 transform group-hover:-translate-y-1 transition duration-500">Backup Target</span>
+ <span class="text-xl text-gray-700 font-semibold mt-4 transform group-hover:-translate-y-1 transition duration-500 whitespace-nowrap">Backup Target</span>
</div>
</div>
</div>
<div class="w-full flex flex-col items-center justify-center border-b">
<div id="map-container" class="relative w-full shadow-inner border-t border-b">
- <span class="absolute top-1/2 left-1/2 transform -translate-y-1/2 text-2xl text-white font-light select-none px-2 py-1.5 rounded shadow" style="background:#999999;">
+ <span class="hidden md:inline-block absolute top-1/2 left-1/2 transform -translate-y-1/2 text-2xl text-white font-light select-none px-2 py-1.5 rounded shadow" style="background:#999999;">
Made for redundancy
</span>
</div>
- <div id="map-legend-container" class="max-w-7xl mx-auto flex items-center justify-around space-x-12 py-2 text-sm text-gray-700">
+ <div id="map-legend-container" class="max-w-7xl mx-auto flex flex-col lg:flex-row items-center justify-around lg:space-x-12 py-2 text-sm text-gray-700">
<div>
<p class="text-base text-gray-600">Each chunk of data is replicated in 3 zones</p>
</div>
@@ -45,9 +45,9 @@
</div>
</div>
- <div class="grid grid-cols-1 xl:grid-cols-2 gap-x-0 xl:gap-x-12 gap-y-24 text-garage-gray font-light bg-gray-100 py-12 w-full shadow-inner">
+ <div class="grid grid-cols-1 xl:grid-cols-2 gap-x-0 xl:gap-x-12 gap-y-24 text-garage-gray font-light bg-gray-100 py-12 px-4 md:px-0 w-full shadow-inner">
<div class="flex flex-col items-center justify-start space-y-2">
- <h2 class="mb-2 text-2xl font-bold text-garage-orange leading-5">Our Goals</h2>
+ <h2 class="mb-2 text-xl text-center md:text-2xl font-bold text-garage-orange leading-5">Our Goals</h2>
<div class="w-8 h-1 bg-garage-orange"></div>
<p class="text-center leading-5 italic">We made it lightweight and kept the efficiency in mind.</p>
<ul class="list-style-none font-semibold flex flex-col items-center justify-center py-4">
@@ -80,7 +80,7 @@
</div>
<div class="flex flex-col items-center justify-start space-y-2">
- <h2 class="mb-2 text-2xl font-bold text-garage-orange leading-5">Keeping requirements low</h2>
+ <h2 class="mb-2 text-xl text-center md:text-2xl font-bold text-garage-orange leading-5">Keeping requirements low</h2>
<div class="w-8 h-1 bg-garage-orange"></div>
<p class="text-center leading-5 italic">
We worked hard to keep requirements as low as possible<br>as we target the largest possible public.
@@ -125,7 +125,7 @@
</div>
<div class="flex flex-col items-center justify-start space-y-2 px-6 xl:px-0">
- <h2 class="mb-2 text-2xl font-bold text-garage-orange leading-5">Data resiliency for everyone</h2>
+ <h2 class="mb-2 text-xl text-center md:text-2xl font-bold text-garage-orange leading-5">Data resiliency for everyone</h2>
<div class="w-8 h-1 bg-garage-orange"></div>
<p class="text-center leading-5 italic pb-4">
Lorem ipsum dolor sit amet consectetur adipisicing elit.
@@ -168,7 +168,7 @@
</div>
<div class="flex flex-col items-center justify-start space-y-2 px-6 xl:px-0">
- <h2 class="mb-2 text-2xl font-bold text-garage-orange leading-5">Standing on the shoulders of giants</h2>
+ <h2 class="mb-2 text-xl text-center md:text-2xl font-bold text-garage-orange leading-5">Standing on the shoulders of giants</h2>
<div class="w-8 h-1 bg-garage-orange"></div>
<p class="text-center leading-5 italic">
Lorem ipsum dolor sit amet consectetur adipisicing elit.
@@ -191,7 +191,7 @@
</div>
<div class="w-full flex flex-col items-center justify-center shadow-inner"></div>
- <div class="py-24 space-y-8 text-garage-gray max-w-4xl mx-auto">
+ <div class="px-8 py-24 space-y-8 text-garage-gray max-w-4xl mx-auto">
<h2 class="text-2xl text-garage-orange font-semibold">Sponsors and funding</h2>
<p>
The Deuxfleurs association has received a grant from <a class="text-garage-orange underline" href="https://pointer.ngi.eu/" target="_blank">NGI POINTER</a>,
diff --git a/templates/macros.html b/templates/macros.html
index 9fab136..dc65140 100755
--- a/templates/macros.html
+++ b/templates/macros.html
@@ -2,24 +2,24 @@
<p class="flex items-center justify-center space-x-2">
{% if social_config.git %}
<a href="{{ social_config.git }}" target="_blank">
- <span class="icon is-large" title="Git">
- <i class="fab fa-git fa-lg text-garage-gray h-8 w-8 bg-white hover:bg-garage-orange hover:text-white rounded-full shadow flex items-center justify-center"></i>
+ <span class="h-10 w-10 bg-white hover:shadow-xl rounded-full shadow flex items-center justify-center" title="Git">
+ <img src="{{get_url(path='icons/git.svg')}}" width="24px" alt="">
</span>
</a>
{% endif %}
{% if social_config.email %}
<a href="mailto:{{ social_config.email }}" target="_blank">
- <span class="icon is-large" title="Email">
- <i class="far fa-envelope fa-lg text-garage-gray h-8 w-8 bg-white hover:bg-garage-orange hover:text-white rounded-full shadow flex items-center justify-center"></i>
+ <span class="h-10 w-10 bg-white hover:shadow-xl rounded-full shadow flex items-center justify-center" title="Contact">
+ <img src="{{get_url(path='icons/contact.svg')}}" width="24px" alt="">
</span>
</a>
{% endif %}
{% if config.generate_feed %}
<a href="{{ config.base_url }}/{{ config.feed_filename }}" target="_blank">
- <span class="icon is-large" title="RSS Feed">
- <i class="fas fa-rss fa-lg text-garage-gray h-8 w-8 bg-white hover:bg-garage-orange hover:text-white rounded-full shadow flex items-center justify-center"></i>
+ <span class="h-10 w-10 bg-white hover:shadow-xl rounded-full shadow flex items-center justify-center" title="RSS Feed">
+ <img src="{{get_url(path='icons/rss.svg')}}" width="24px" alt="">
</span>
</a>
{% endif %}
diff --git a/templates/page.html b/templates/page.html
index eeba7f1..53767ae 100755
--- a/templates/page.html
+++ b/templates/page.html
@@ -5,7 +5,7 @@
{% endblock %}
{% block content %}
- <section class="section">
+ <section id="blogpost-section" class="section">
<div class="mx-auto max-w-7xl">
<div class="grid grid-cols-5 gap-x-12">
<div class="{% if page.extra.toc %}col-span-4{% else %}col-span-full{% endif %}">
@@ -24,11 +24,11 @@
</div>
</a>
</div>
- <div class="w-full text-garage-gray text-sm grid grid-cols-2 bg-gradient-to-r from-gray-100 to-transparent p-3 border-l-4 border-gray-300">
- <div class="flex items-center justify-start">
+ <div class="w-full text-garage-gray text-sm grid grid-cols-1 md:grid-cols-2 bg-gradient-to-r from-gray-100 to-transparent p-3 border-l-4 border-gray-300">
+ <div class="flex items-center justify-start md:justify-start">
{{ macros::page_publish_metadata(page=page) }}
</div>
- <div class="flex items-center justify-end">
+ <div class="flex items-center justify-start md:justify-end">
{{ macros::page_content_metadata(page=page) }}
</div>
<div>
@@ -43,7 +43,7 @@
</div>
</div>
</div>
- <div class="page-content max-w-4xl text-justify mt-12">
+ <div class="page-content max-w-4xl text-justify mt-12 px-5 md:px-12">
{{ page.content | safe }}
</div>
</article>
diff --git a/templates/partials/doc/toc_script.html b/templates/partials/doc/toc_script.html
index df115b0..1453a69 100644
--- a/templates/partials/doc/toc_script.html
+++ b/templates/partials/doc/toc_script.html
@@ -11,11 +11,13 @@ const navSections = new Array(tocItems.length);
*/
window.addEventListener('scroll', function() {
- if (window.scrollY >= menuBarHeight) {
- document.getElementById('main-toc-menu').classList.add('fixed', 'top-0', 'left-0');
- document.getElementById('main-toc-menu').style.width = mainTocMenuWidth + 'px';
- } else {
- document.getElementById('main-toc-menu').classList.remove('fixed', 'top-0', 'left-0');
+ if (window.screen.width >= 1280) {
+ if (window.scrollY >= menuBarHeight) {
+ document.getElementById('main-toc-menu').classList.add('fixed', 'top-0', 'left-0');
+ document.getElementById('main-toc-menu').style.width = mainTocMenuWidth + 'px';
+ } else {
+ document.getElementById('main-toc-menu').classList.remove('fixed', 'top-0', 'left-0');
+ }
}
});
diff --git a/templates/partials/shared/head.html b/templates/partials/shared/head.html
index 185a97b..ca2033e 100644
--- a/templates/partials/shared/head.html
+++ b/templates/partials/shared/head.html
@@ -1,9 +1,6 @@
{% 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 %}
@@ -13,14 +10,6 @@
{% 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 %}
-
-<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" />
@@ -28,7 +17,7 @@
<title>
{% block title %}
- {{ config.title }}
+ {{ config.title }} - An open-source distributed storage service
{% endblock title %}
</title>
diff --git a/templates/partials/shared/nav.html b/templates/partials/shared/nav.html
index 57e81fe..a4a4b99 100644
--- a/templates/partials/shared/nav.html
+++ b/templates/partials/shared/nav.html
@@ -1,12 +1,16 @@
-<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.5 px-8 text-garage-gray bg-garage-orange bg-opacity-20">
+<nav aria-label="navigation-section" class="navbar w-full relative" role="navigation">
+ <div class="w-full flex flex-row items-center justify-between py-1.5 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="px-2 transform duration-150 focus:bg-white hover:bg-white hover:shadow rounded-lg"
src="{{ config.extra.organization.logo_horizontal }}" width="120px">
</a>
</div>
- <div class="navbar-menu" id="navMenu">
+ <input type="checkbox" id="navMenuToggleBtn" value="0"/>
+ <label for="navMenuToggleBtn" class="md:hidden p-1.5 hover:bg-white rounded-lg hover:shadow cursor-pointer" style="margin-top:0.08rem;">
+ <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="M4 6h16M4 12h16M4 18h7"></path></svg>
+ </label>
+ <div class="hidden py-4 md:py-0 z-40 md:block absolute md:static top-12 left-0 right-0 navbar-menu bg-gray-100 shadow-md md:shadow-none md:bg-transparent" id="navMenu">
<div class="flex items-center justify-center space-x-2">
{% for item in config.extra.navbar_items %}
{% if lang == item.code %}
@@ -29,7 +33,7 @@
href="https://garagehq.deuxfleurs.fr/_releases.html"
class="group flex items-center justify-center space-x-1 font-semibold shadow hover:shadow px-2 py-1.5 rounded text-white transition-all duration-500 bg-gradient-to-tl from-garage-orange via-orange-500 to-orange-300 bg-size-200 bg-pos-0 hover:bg-pos-100">
<svg class="w-6 h-6 animate-pulse" 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 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"></path></svg>
- <span>Download</span>
+ <span class="hidden md:inline">Download</span>
</a>
</div>
</div>
diff --git a/templates/partials/shared/search.html b/templates/partials/shared/search.html
new file mode 100644
index 0000000..cb0ae2e
--- /dev/null
+++ b/templates/partials/shared/search.html
@@ -0,0 +1,25 @@
+<section id="search-modal" class="modal hidden z-50 bg-gradient-to-b from-gray-50 to-gray-100 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-2xl rounded-lg">
+ <div class="p-2 md:p-4 xl:p-8 border-8 border-gray-300 rounded-lg shadow-inner" style="min-height:30vh;">
+ <section class="relative flex flex-col items-center justify-center">
+ <div class="flexs items-center justify-center">
+ <span class="text-xl inline-block font-thin">Search</span>
+ <span class="font-normal inline-block text-xs text-gray-500">(alt + S)</span>
+ </div>
+ <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 focus:outline outline-garage-orange"></div>
+ </div>
+ </section>
+ <button aria-label="close" id="close-modal-btn" class="absolute top-4 right-4 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> \ No newline at end of file
diff --git a/templates/section.html b/templates/section.html
index 83c5134..5d47d46 100755
--- a/templates/section.html
+++ b/templates/section.html
@@ -14,7 +14,7 @@
<div class="content">
{{ section.content | safe }}
</div>
- <div class="columns is-centered">
+ <div class="px-0 md:px-8 xl:px-4 2xl:px-0">
<div class="space-y-20">
{% if paginator %}
{% set pages = paginator.pages %}
@@ -23,7 +23,7 @@
{% endif %}
{% for page in pages %}
- <article class="border-l-4 border-garage-gray pl-4">
+ <article class="border-l-4 border-garage-gray pl-4 max-w-5xl">
<h2 class="text-garage-gray hover:text-garage-orange text-2xl pb-3">
<a class="w-full block" href='{{ page.permalink }}'>
{{ page.title }}
@@ -41,8 +41,10 @@
</div>
</div>
<div class="content mt-2">
- {{ page.summary | safe }}
- <a class="group py-4 font-semibold px-4 py-2 flex items-center space-x-1 text-garage-orange" href='{{ page.permalink }}'>
+ <div class="text-gray-700">
+ {{ page.summary | safe }}
+ </div>
+ <a class="group font-semibold p-4 flex items-center space-x-1 text-garage-orange" href='{{ page.permalink }}'>
<div class="h-0.5 mt-0.5 w-4 group-hover:w-8 group-hover:bg-garage-gray transition-all bg-garage-orange"></div>
<span>Read</span>
<span class="text-garage-orange group-hover:text-garage-gray transition-all">