From af116d1aa807676da51d3832df67f94daad5c471 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Thu, 13 Oct 2022 11:43:17 +0200
Subject: [PATCH] [web] Added processes icons to layout.

---
 web/layouts/docs/gallery.html                 | 21 +++++++++-----
 web/layouts/docs/single.html                  | 29 ++++++++++++-------
 web/layouts/docs/subsections.html             | 22 ++++++++++----
 .../partials/components/gallery-item.html     | 22 ++++++++------
 4 files changed, 62 insertions(+), 32 deletions(-)

diff --git a/web/layouts/docs/gallery.html b/web/layouts/docs/gallery.html
index 38580609ae5..bc5cd8ceb8f 100644
--- a/web/layouts/docs/gallery.html
+++ b/web/layouts/docs/gallery.html
@@ -5,13 +5,20 @@
   {{ partial "docs/sidebar.html" . }}
 
   <div class="bg-white">
+    {{ if isset .Params "coupling" }}
+    <img class="h-12 md:h-16 lg:h-20 float-right" src="/images/coupling-icons/{{.Params.coupling}}-tet.svg" alt="">
+    {{ end }}
 
     {{ partial "docs/breadcrumbs.html" . }}
 
     <div class="mx-auto py-2 px-4 max-w-7xl sm:px-6 lg:px-8 lg:py-4">
       <div class="space-y-8">
         <div class="space-y-5 sm:space-y-4 md:max-w-xl lg:max-w-3xl xl:max-w-none">
-          <h2 class="text-3xl font-extrabold sm:text-4xl">{{ .Title }}</h2>
+
+          <h2 class="text-3xl font-extrabold sm:text-4xl mb-4">
+            {{ .Title }}
+          </h2>
+          <div class="clear-both"></div>
           {{ .Content }}
         </div>
 
@@ -20,12 +27,12 @@
         {{ $full_collection := union $image_collection $notebook_collection }}
 
         {{ if gt (len $full_collection) 0 }}
-          <ul role="list"
-            class="space-y-12 grid grid-cols-2 sm:grid-cols-3  sm:gap-x-6 gap-y-12 space-y-0 lg:grid-cols-4 lg:gap-x-8">
-            {{ range where $full_collection "Params.gallery" "!=" "false" }}
-            {{ partial "components/gallery-item.html" . }}
-            {{ end }}
-          </ul>
+        <ul role="list"
+          class="space-y-12 grid grid-cols-2 sm:grid-cols-3  sm:gap-x-6 gap-y-12 space-y-0 lg:grid-cols-4 lg:gap-x-8">
+          {{ range where $full_collection "Params.gallery" "!=" "false" }}
+          {{ partial "components/gallery-item.html" . }}
+          {{ end }}
+        </ul>
         {{ end }}
 
       </div>
diff --git a/web/layouts/docs/single.html b/web/layouts/docs/single.html
index 9626a2a3354..a08307b970f 100644
--- a/web/layouts/docs/single.html
+++ b/web/layouts/docs/single.html
@@ -4,10 +4,10 @@
 {{ $top_section_name := index $elements (sub (len $elements) 4) }}
 {{ $baseSubsection := . }}
 {{ if eq $top_section_name .Section }}
-  {{ $baseSubsection = .Parent }}
+{{ $baseSubsection = .Parent }}
 {{ end }}
 {{ if not .IsSection }}
-  {{ $baseSubsection = .Parent.Parent }}
+{{ $baseSubsection = .Parent.Parent }}
 {{ end }}
 
 <div class="flex">
@@ -16,21 +16,27 @@
 
   <div class="overflow-y-auto focus:outline-none">
 
+    {{ if isset .Parent.Params "coupling" }}
+    <img class="h-12 md:h-16 lg:h-20 float-right" src="/images/coupling-icons/{{.Parent.Params.coupling}}-tet.svg"
+      alt="">
+    {{ end }}
+
     {{ if .Params.breadcrumbs }}
-      {{ partial "docs/breadcrumbs.html" . }}
+    {{ partial "docs/breadcrumbs.html" . }}
     {{ end }}
 
     <div class="mx-auto py-2 px-4 max-w-7xl sm:px-6 lg:px-8 lg:py-4">
       <h2 class="text-3xl font-extrabold sm:text-4xl mb-8">{{ .Title }}</h2>
       {{ if $baseSubsection.Params.os_selector }}
       <div class="flex justify-center">
-      <div class="invisible mb-8 bg-gray-200 shadow rounded-lg px-2 py-1 w-auto" id="os-selector">
-        <span class="text-gray-600">Select OS:</span>
-        <a class="btn mx-1" id="btn-win"><i class="fab fa-windows"></i><span class="hidden sm:inline">
-            Windows</span></a>
-        <a class="btn mx-1" id="btn-linux"><i class="fab fa-linux"></i><span class="hidden sm:inline"> Linux</span></a>
-        <a class="btn mx-1" id="btn-mac"><i class="fab fa-apple"></i><span class="hidden sm:inline"> macOS</span></a>
-      </div>
+        <div class="invisible mb-8 bg-gray-200 shadow rounded-lg px-2 py-1 w-auto" id="os-selector">
+          <span class="text-gray-600">Select OS:</span>
+          <a class="btn mx-1" id="btn-win"><i class="fab fa-windows"></i><span class="hidden sm:inline">
+              Windows</span></a>
+          <a class="btn mx-1" id="btn-linux"><i class="fab fa-linux"></i><span class="hidden sm:inline">
+              Linux</span></a>
+          <a class="btn mx-1" id="btn-mac"><i class="fab fa-apple"></i><span class="hidden sm:inline"> macOS</span></a>
+        </div>
       </div>
       {{ end }}
 
@@ -43,7 +49,8 @@
         {{ if .Params.notebook }}
         <div class="note">
           <p style="margin-top: 0; margin-bottom: 0%;"><img style="margin-top: 0; margin-bottom: 0; height: 2em;"
-              class="inline-block mr-2" src="https://upload.wikimedia.org/wikipedia/commons/3/38/Jupyter_logo.svg" alt="">
+              class="inline-block mr-2" src="https://upload.wikimedia.org/wikipedia/commons/3/38/Jupyter_logo.svg"
+              alt="">
             This benchmark is available as a Jupyter notebook:
             <a href="https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/Tests/Data/{{ .Params.notebook }}">
               {{ .Params.notebook }}.
diff --git a/web/layouts/docs/subsections.html b/web/layouts/docs/subsections.html
index 2f6cbd37ed4..7433a46f3fe 100644
--- a/web/layouts/docs/subsections.html
+++ b/web/layouts/docs/subsections.html
@@ -5,20 +5,32 @@
   {{ partial "docs/sidebar.html" . }}
 
   <div class="bg-white">
-  {{ if .Params.breadcrumbs }}
-      {{ partial "docs/breadcrumbs.html" . }}
+    {{ if .Params.breadcrumbs }}
+    {{ partial "docs/breadcrumbs.html" . }}
     {{ end }}
     <div class="mx-auto py-2 px-4 max-w-7xl sm:px-6 lg:px-8 lg:py-4">
       <div class="space-y-8">
         <div class="space-y-5 sm:space-y-4 md:max-w-xl lg:max-w-3xl xl:max-w-none prose">
-          <h1 class="">{{ .Title }}</h1>
+          <h1 class="">Feautured {{ .Title }}</h1>
+        </div>
+        <ul role="list"
+          class="space-y-12 grid grid-cols-2 sm:grid-cols-3  sm:gap-x-6 gap-y-12 space-y-0 lg:grid-cols-4 lg:gap-x-8">
+          {{ range .Sections }}
+          {{ if .Params.feautured }}
+          {{ partial "components/gallery-item.html" . }}
+          {{ end }}
+          {{ end }}
+        </ul>
+
+        <div class="space-y-5 sm:space-y-4 md:max-w-xl lg:max-w-3xl xl:max-w-none prose">
+          <h2 class="">All {{ .Title }}</h2>
           {{ .Content }}
         </div>
         <ul role="list"
           class="space-y-12 grid grid-cols-2 sm:grid-cols-3  sm:gap-x-6 gap-y-12 space-y-0 lg:grid-cols-4 lg:gap-x-8">
-        {{ range .Sections }}
+          {{ range .Sections }}
           {{ partial "components/gallery-item.html" . }}
-        {{ end }}
+          {{ end }}
         </ul>
       </div>
     </div>
diff --git a/web/layouts/partials/components/gallery-item.html b/web/layouts/partials/components/gallery-item.html
index e415807b0ae..8c20ffe1ccf 100644
--- a/web/layouts/partials/components/gallery-item.html
+++ b/web/layouts/partials/components/gallery-item.html
@@ -6,15 +6,15 @@
         {{ $white_image := resources.Get "images/white.png" }}
         {{ $image := "" }}
         {{ if isset .Params "image" }}
-          {{ $image = .Resources.GetMatch .Params.image }}
+        {{ $image = .Resources.GetMatch .Params.image }}
         {{ end }}
         {{ if not $image }}
-          {{ range first 1 (.Resources.ByType "image") }}
-            {{ $image = . }}
-          {{ end }}
-          {{ if not $image }}
-            {{ $image = $white_image }}
-          {{ end }}
+        {{ range first 1 (.Resources.ByType "image") }}
+        {{ $image = . }}
+        {{ end }}
+        {{ if not $image }}
+        {{ $image = $white_image }}
+        {{ end }}
         {{ end }}
         {{ $image := $image.Fit "600x400" }}
         <img class="object-cover shadow-lg rounded-lg no-fancybox border" src="{{ $image.RelPermalink }}" alt="">
@@ -24,8 +24,12 @@
         <div class="space-y-1">
           <h3 class="text-center">
             {{ if isset .Params "notebook" }}
-              <img style="margin-top: 0; margin-bottom: 0; height: 1.5em;"
-              class="inline-block mr-1" src="https://upload.wikimedia.org/wikipedia/commons/3/38/Jupyter_logo.svg" alt="">
+            <img style="margin-top: 0; margin-bottom: 0; height: 1.5em;" class="inline-block mr-1"
+              src="https://upload.wikimedia.org/wikipedia/commons/3/38/Jupyter_logo.svg" alt="">
+            {{ end }}
+            {{ if isset .Params "coupling" }}
+            <img style="height: 2em;" class="inline-block mr-1"
+              src="/images/coupling-icons/{{.Params.coupling}}-tet.svg" alt="">
             {{ end }}
             {{ .Title }}
           </h3>
-- 
GitLab