From d44c07f9b4c016c8c886ca2aa47c01fcefdb4af6 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Fri, 6 Jan 2023 17:45:15 +0100 Subject: [PATCH] [web] Restructured docs overview page into categories. --- web/config/_default/config.toml | 6 +++ web/content/docs/benchmarks/_index.md | 2 + .../getting-started/introduction/index.md | 3 +- .../HEAT_TRANSPORT_BHE/index.md | 2 + .../tools/getting-started/overview/index.md | 3 ++ .../userguide/basics/introduction/index.md | 2 + web/layouts/docs/list.html | 52 ++++++++----------- 7 files changed, 39 insertions(+), 31 deletions(-) diff --git a/web/config/_default/config.toml b/web/config/_default/config.toml index 351aa27ee4c..7aed0b8e5ae 100644 --- a/web/config/_default/config.toml +++ b/web/config/_default/config.toml @@ -110,16 +110,22 @@ weight = 5 name = "Data Explorer Manual" url = "https://gitlab.opengeosys.org/ogs/data_explorer_manual/-/jobs/artifacts/master/raw/ogsde-man.pdf?job=build" post = "Manual for the graphical user interface for OpenGeoSys, the Data Explorer." +[menu.docs.params] +category = "Advanced" [[menu.docs]] name = "Source code documentation" url = "https://doxygen.opengeosys.org/" post = "The OGS source code documentation is automatically generated right from the code itself via Doxygen and is a nice reference while coding." +[menu.docs.params] +category = "Developer" [[menu.docs]] name = "Styleguide" url = "https://ufz.github.io/styleguide/cppguide.xml" post = "OpenGeoSys C++ Style Guide" +[menu.docs.params] +category = "Developer" [security.funcs] getenv = ['^HUGO_', '^CI_'] diff --git a/web/content/docs/benchmarks/_index.md b/web/content/docs/benchmarks/_index.md index 6585638c32f..54722c6d9e6 100644 --- a/web/content/docs/benchmarks/_index.md +++ b/web/content/docs/benchmarks/_index.md @@ -11,4 +11,6 @@ identifier = "benchmarks" weight = 3 url = "./benchmarks" post = "Basic benchmarks are explained and input files are provided to get you started in using OGS." +[menu.docs.params] +category = "Beginner" +++ diff --git a/web/content/docs/devguide/getting-started/introduction/index.md b/web/content/docs/devguide/getting-started/introduction/index.md index aede5e59594..49d8a1d8abb 100644 --- a/web/content/docs/devguide/getting-started/introduction/index.md +++ b/web/content/docs/devguide/getting-started/introduction/index.md @@ -11,7 +11,8 @@ name = "Developer Guide" identifier = "devguide" weight = 2 post = "You want to contribute to the OpenGeoSys project or implement a custom feature? In the Developer Guide you will find everything to get you started into OpenGeoSys development. Experienced developers will find a comprehensive list of advanced development topics." - +[menu.docs.params] +category = "Developer" +++ In this help section you will find everything related to setting up a native development environment. Please walk through the Getting Started-section **step by step**[^1]. At the end you will have the latest OGS source code and the OGS finite element simulator compiled and ready to run! This first section of the developer guide will give you just a brief introduction, make sure to read the more advanced topics after you have familiarized yourself with the basics. diff --git a/web/content/docs/processes/heat-transport/HEAT_TRANSPORT_BHE/index.md b/web/content/docs/processes/heat-transport/HEAT_TRANSPORT_BHE/index.md index 899d83b3932..2b0da050510 100644 --- a/web/content/docs/processes/heat-transport/HEAT_TRANSPORT_BHE/index.md +++ b/web/content/docs/processes/heat-transport/HEAT_TRANSPORT_BHE/index.md @@ -9,6 +9,8 @@ name = "Process-dependent configuration" identifier = "processes" weight = 5 post = "Get more insight into process-specific configurations." +[menu.docs.params] +category = "Advanced" +++ ## Description diff --git a/web/content/docs/tools/getting-started/overview/index.md b/web/content/docs/tools/getting-started/overview/index.md index 3edc1a4ceb5..1455187314f 100644 --- a/web/content/docs/tools/getting-started/overview/index.md +++ b/web/content/docs/tools/getting-started/overview/index.md @@ -4,11 +4,14 @@ title = "Introduction" author = "Lars Bilke" weight = 1 aliases = ["/docs/tools/"] + [menu.docs] name = "Tools & Workflows" identifier = "tools" weight = 4 post = "Helpful tools for pre- and postprocessing as well as complete model setup workflows." +[menu.docs.params] +category = "Advanced" +++ Here is an overview of the currently available command line tools, that might help you to construct your OpenGeoSys model. GUI-based tools are available too: diff --git a/web/content/docs/userguide/basics/introduction/index.md b/web/content/docs/userguide/basics/introduction/index.md index 87ca6a7aba3..9b817494471 100644 --- a/web/content/docs/userguide/basics/introduction/index.md +++ b/web/content/docs/userguide/basics/introduction/index.md @@ -13,6 +13,8 @@ name = "User Guide" identifier = "userguide" weight = 1 post = "Download, install and run an OGS benchmark in 5 minutes! No development setup required." +[menu.docs.params] +category = "Beginner" +++ ## Installation diff --git a/web/layouts/docs/list.html b/web/layouts/docs/list.html index ee03255b390..13565ab542d 100644 --- a/web/layouts/docs/list.html +++ b/web/layouts/docs/list.html @@ -4,38 +4,30 @@ {{ .Content }} </div> -<div class="flex flex-wrap -m-4 p-4"> - {{ range .Site.Menus.docs }} - <div class="xl:w-1/3 md:w-1/2 mt-2 px-4 py-2 md:p-4"> - <a href="{{ .URL }}"> - <div class="p-4 bg-gray-100 hover:bg-white rounded-lg shadow h-full"> - <h3 class="text-xl mb-2 border-b text-blue-800"> - {{ .Name }} - {{ $url_first_char := substr .URL 0 1 }} - {{ if not (eq $url_first_char "/") }} - <i class="far fa-external-link text-xs align-top"></i> - {{ end }} - </h3> - <p class="leading-relaxed text-gray-700">{{ .Post }}</p> - </div> - </a> +{{ range slice "Beginner" "Advanced" "Developer" }} +<div class="mb-12"> + <div class="text-xl text-center text-gray-800 font-bold"> + <h2>{{ . }}</h2> </div> - {{ end }} - {{ range .Params.sections }} - <div class="xl:w-1/3 md:w-1/2 p-4 my-3"> - <div class="border border-gray-300 p-6 rounded-lg h-full"> - <h2> - <a href="{{ .url }}"> - {{ .name }} - {{ $url_first_char := substr .url 0 1 }} - {{ if not (eq $url_first_char "/") }} - <i class="far fa-external-link text-xs align-top"></i> - {{ end }} - </a> - </h2> - <p class="leading-relaxed text-base">{{ .text }}</p> + <div class="flex flex-wrap -m-4 p-4"> + {{ range where $.Site.Menus.docs "Params.category" . }} + <div class="xl:w-1/3 md:w-1/2 mt-2 px-4 py-2 md:p-4"> + <a href="{{ .URL }}"> + <div class="p-4 bg-gray-100 hover:bg-white rounded-lg shadow h-full"> + <h3 class="text-xl mb-2 border-b text-blue-800"> + {{ .Name }} + {{ $url_first_char := substr .URL 0 1 }} + {{ if not (eq $url_first_char "/") }} + <i class="far fa-external-link text-xs align-top"></i> + {{ end }} + </h3> + <p class="leading-relaxed text-gray-700">{{ .Post }}</p> + </div> + </a> </div> + {{ end }} </div> - {{ end }} </div> {{ end }} + +{{ end }} -- GitLab