Verified Commit 96f3d31f authored by Lars Bilke's avatar Lars Bilke

[web] Proper usage of menus.

Fixes MR web preview links.
parent 989853ef
......@@ -9,23 +9,6 @@ staticDir = ["dist", "static"]
[params]
alert = ""
# Main menu
[[menu.main]]
name = "Releases"
url = "/releases/"
identifier = "releases"
weight = 3
[[menu.main]]
name = "Docs"
url = "/docs/"
identifier = "docs"
weight = 4
[[menu.main]]
name = "Publications"
url = "/publications/"
identifier = "publications"
weight = 5
# Devguide sidebar menu top-level categories
[[menu.devguide]]
name = "Getting Started"
......@@ -155,3 +138,19 @@ staticDir = ["dist", "static"]
name = "Workflows"
identifier = "workflows"
weight = 5
# docs
[[menu.docs]]
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]]
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 nice reference while coding."
[[menu.docs]]
name = "Styleguide"
url = "https://ufz.github.io/styleguide/cppguide.xml"
post = "OpenGeoSys C++ Style Guide"
......@@ -5,7 +5,7 @@ date = 2018-03-02T12:49:25+01:00
author = "Lars Bilke"
categories = ["Books"]
image = "BMB-2-Cover.png"
image = "/books/BMB-2-Cover.png"
+++
......
......@@ -5,7 +5,7 @@ date = 2018-03-05T16:27:48+01:00
author = "Lars Bilke"
categories = ["Books"]
image = "BMB-3-Cover.png"
image = "/books/BMB-3-Cover.png"
+++
......
......@@ -5,7 +5,7 @@ date = 2018-03-07T15:35:30+01:00
author = "Lars Bilke"
categories = ["Books"]
image = "bmb-4.png"
image = "/books/bmb-4.png"
+++
......
......@@ -5,7 +5,7 @@ date = 2018-03-07T15:27:05+01:00
author = "Lars Bilke"
categories = ["Tutorials"]
image = "computational-geotechnics-i.png"
image = "/books/computational-geotechnics-i.png"
+++
[<i class="far fa-file-pdf"></i> Download this book as PDF](https://ogsstorage.blob.core.windows.net/web/Books/Comp-Geotechnics-I/Computational_Geotechnics_I.pdf)
......
......@@ -4,7 +4,7 @@ date = 2018-03-01T15:51:37+01:00
author = "Lars Bilke"
categories = ["Tutorials"]
image = "Computation-Hydrology-I-Cover.png"
image = "/books/Computation-Hydrology-I-Cover.png"
+++
......
......@@ -5,7 +5,7 @@ date = 2018-03-07T15:20:04+01:00
author = "[TODO]"
categories = ["Tutorials"]
image = "computational-hydrology-ii.png"
image = "/books/computational-hydrology-ii.png"
+++
......
......@@ -5,7 +5,7 @@ date = 2018-06-18T08:20:04+01:00
author = "Eunseon Jang"
categories = ["Tutorials"]
image = "Computational-Hydrology-III-Cover.jpg"
image = "/books/Computational-Hydrology-III-Cover.jpg"
+++
[<i class="far fa-file-pdf"></i> Download this book as PDF](https://ogsstorage.blob.core.windows.net/web/Books/Computational-Hydrology-III/Computational-Hydrology-III.pdf)
......
......@@ -5,7 +5,7 @@ date = 2018-03-07T14:58:32+01:00
author = "Lars Bilke"
categories = ["Tutorials"]
image = "geoenergy-modeling-i.png"
image = "/books/geoenergy-modeling-i.png"
aliases = [ "/tutorials/ces-i/e07", "/tutorials/ces-i/e08",
"/tutorials/ces-i/e09", "/tutorials/ces-i/e10" ]
......
......@@ -5,7 +5,7 @@ date = 2018-03-07T14:59:32+01:00
author = "Lars Bilke"
categories = ["Tutorials"]
image = "geoenergy-modeling-ii.png"
image = "/books/geoenergy-modeling-ii.png"
aliases = [ "/books/shallow-geothermal-systems" ]
......
......@@ -5,7 +5,7 @@ date = 2018-03-07T15:13:52+01:00
author = "Lars Bilke"
categories = ["Tutorials"]
image = "geoenergy-modeling-iii.png"
image = "/books/geoenergy-modeling-iii.png"
+++
......
......@@ -4,7 +4,7 @@ date = 2018-03-07T15:31:45+01:00
author = "Lars Bilke"
categories = ["Tutorials"]
image = "models-of-thermochemical-heat-storage.png"
image = "/books/models-of-thermochemical-heat-storage.png"
+++
......
---
title: "Books"
aliases: [/books/]
---
+++
title = "Books"
[menu.publications]
post = "Comprehensive benchmark descriptions and theory."
weight = 2
+++
We publish a series of books on OpenGeoSys. They contain comprehensive benchmark descriptions and can be seen as a reference to what is possible with OGS.
---
title: "Tutorials"
---
+++
title = "Tutorials"
[menu.publications]
post = "Step-by-step instructions on specific topics."
weight = 3
+++
We publish a series of tutorials on OpenGeoSys. They focus on specific topics with step-by-step instructions giving the user a good introduction into modeling and simulation with OGS. Most of the tutorials can be downloaded as PDF! See the detail page on each tutorial.
+++
title = "Documentation"
layout = "section/docs.html"
[[sections]]
name = "User Guide"
url = "/docs/userguide/basics/introduction/"
text = "Download, install and run an OGS benchmark in 5 minutes! No development setup required."
icon = "far fa-users"
[[sections]]
name = "Developer Guide"
url = "/docs/devguide/getting-started/introduction/"
text = "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."
icon = "far fa-laptop-code"
[[sections]]
name = "Benchmarks"
url = "/docs/benchmarks/elliptic/elliptic-dirichlet/"
text = "Basic benchmarks are explained and input files are provided to get you started in using OGS."
icon = "far fa-rabbit-fast"
[[sections]]
name = "Tools & Workflows"
url = "/docs/tools/getting-started/overview/"
text = "Helpful tools for pre- and postprocessing as well as complete model setup workflows."
icon = "far fa-tools"
[[sections]]
name = "Data Explorer Manual"
url = "https://gitlab.opengeosys.org/ogs/data_explorer_manual/-/jobs/artifacts/master/raw/ogsde-man.pdf?job=build"
text = "Manual for the graphical user interface for OpenGeoSys, the Data Explorer."
icon = "far fa-file-image"
[[sections]]
name = "Source code documentation"
url = "https://doxygen.opengeosys.org/"
text = "The OGS source code documentation is automatically generated right from the code itself via Doxygen and is nice reference while coding."
icon = "far fa-file-code"
[[sections]]
name = "Styleguide"
url = "https://ufz.github.io/styleguide/cppguide.xml"
text = "OpenGeoSys C++ Style Guide"
icon = "far fa-file-check"
[menu.main]
name = "Docs"
identifier = "docs"
weight = 2
+++
<h1 class="sm:text-3xl text-2xl font-medium title-font mb-2 text-gray-900">OpenGeoSys documentation overview</h1>
......
......@@ -5,9 +5,15 @@ project = "Elliptic/square_1x1_SteadyStateDiffusion/square_1e2.prj"
author = "Dmitri Naumov"
weight = 102
[menu]
[menu.benchmarks]
parent = "elliptic"
[menu.docs]
name = "Benchmarks"
identifier = "benchmarks"
weight = 3
post = "Basic benchmarks are explained and input files are provided to get you started in using OGS."
[menu.benchmarks]
parent = "elliptic"
+++
......
......@@ -4,9 +4,15 @@ title = "Welcome!"
author = "Lars Bilke"
weight = 1001
[menu]
[menu.devguide]
parent = "getting-started"
[menu.docs]
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.devguide]
parent = "getting-started"
+++
In this help section you will find everything related to development. Please walk through the Getting Started-section **step by step**. At the end you will have the latest OGS source code, the OGS finite element simulator compiled and everything you need to start developing for OGS! 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.
......
......@@ -4,9 +4,15 @@ title = "Introduction"
author = "Lars Bilke"
weight = 100
[menu]
[menu.tools]
parent = "getting-started"
[menu.docs]
name = "Tools & Workflows"
identifier = "tools"
weight = 4
post = "Helpful tools for pre- and postprocessing as well as complete model setup workflows."
[menu.tools]
parent = "getting-started"
+++
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:
......
......@@ -4,6 +4,12 @@ title = "Introduction"
author = "Lars Bilke"
weight = 1
[menu.docs]
name = "User Guide"
identifier = "userguide"
weight = 1
post = "Download, install and run an OGS benchmark in 5 minutes! No development setup required."
aliases = [ "/docs/userguide/",
"/docs/quickstart/",
"/docs/quickstart/basics/quickstart" ] # Redirect for Hydrology III tutorial
......@@ -33,7 +39,7 @@ You can download the latest benchmark files from GitLab:
See [the Benchmarks section](/docs/benchmarks/) for more information on the benchmarks.
![Instructions for downloading benchmarks](../Download_Benchmarks.png)
![Instructions for downloading benchmarks](/docs/userguide/basics/Download_Benchmarks.png)
## Running
......
+++
title = "Publications"
[[sections]]
name = "Paper"
url = "/publications/paper"
text = "Peer-reviewed scientific paper about OpenGeoSys and its applications."
icon = "far fa-users"
[[sections]]
name = "Books"
url = "/categories/books"
text = "Comprehensive benchmark descriptions and theory."
icon = "far fa-laptop-code"
[[sections]]
name = "Tutorials"
url = "/categories/tutorials"
text = "Step-by-step instructions on specific topics."
icon = "far fa-rabbit-fast"
[menu.main]
weight = 3
+++
......
---
Title: "Paper"
---
+++
Title = "Paper"
[menu.publications]
post = "Peer-reviewed scientific paper about OpenGeoSys and its applications."
weight = 1
+++
+++
Title = "Releases"
[menu.main]
name = "Releases"
weight = 1
aliases = ["/downloads", "/download"] # Redirect for Hydrology II tutorial
[[head_downloads]]
......
<article class="mb-8 border-b">
{{ if .Params.image }}
<div class="w-1/6 float-left mr-4 mb-2">
<img class="shadow-md" src="{{ .Permalink }}../{{ .Params.image }}" alt="">
<img class="shadow-md" src="{{ .Params.image }}" alt="">
</div>
{{ end }}
......
......@@ -2,7 +2,7 @@
<div class="container">
<h1>{{ .Title }} {{ if .Params.subtitle }}<span class="text-regular text-gray-600">– {{ .Params.subtitle }}</span>{{ end }}</h1>
<img class="w-1/6 float-left mr-4 mb-2 shadow-md" src="../{{ .Params.image }}" alt="">
<img class="w-1/6 float-left mr-4 mb-2 shadow-md" src="{{ .Params.image }}" alt="">
{{ .Content }}
</div>
{{ end }}
......@@ -46,8 +46,8 @@
{{ range .Site.Menus.main }}
{{ $url_trimmed := trim .URL "/" }}
<a href="{{ .URL }}" class="nav-item{{if (eq $section $url_trimmed) }} active{{end}}">{{ .Name }}</a>
{{ end }}
<a href="https://discourse.opengeosys.org" class="nav-item">Discourse</a>
{{ end }}
<a href="https://discourse.opengeosys.org" class="nav-item">Discourse</a>
</div>
<div class="w-1/4">
{{ partial "site-search.html" . }}
......
{{ define "main" }}
<div class="container">
{{ if ne .CurrentSection.RelPermalink "/docs/" }}
<h2>{{ .CurrentSection.Title }} - All pages</h2>
<ul>
{{ range .Pages }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ else }}
<!-- /docs -->
<div class="flex flex-wrap w-full mb-4 flex-col items-center text-center">
{{ .Content }}
</div>
<div class="flex flex-wrap -m-4">
{{ range .Site.Menus.docs }}
<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 class="text-lg text-gray-900 font-medium title-font mb-2">
<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">{{ .Post }}</p>
</div>
</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">
......@@ -31,6 +38,5 @@
</div>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}
......@@ -4,19 +4,19 @@
{{ .Content }}
</div>
<div class="flex flex-wrap -m-4">
{{ range .Params.sections }}
{{ range .Site.Menus.publications }}
<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 class="text-lg text-gray-900 font-medium title-font mb-2">
<a href="{{ .url }}">
{{ .name }}
{{ $url_first_char := substr .url 0 1 }}
<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>
<p class="leading-relaxed text-base">{{ .Post }}</p>
</div>
</div>
{{ end }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment