Skip to content
Snippets Groups Projects
Commit 35f5e655 authored by Lars Bilke's avatar Lars Bilke
Browse files

Merge branch 'web-menus' into 'master'

[web] Proper usage of menus

See merge request ogs/ogs!3071
parents 3a437ee8 f08b6b84
No related branches found
No related tags found
No related merge requests found
---
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]]
......@@ -30,7 +34,7 @@ icon = "fab fa-windows"
[[head_downloads]]
name = "Latest Singularity container CLI with Utilities"
url = "https://gitlab.opengeosys.org/ogs/ogs/-/jobs/artifacts/master/browse/_out/images?job=container"
note = "Download and run .sif-file with [Singularity](/docs/devguide/advanced/singularity/)"
note = "Download and run .sif-file with [Singularity](/docs/userguide/basics/container/)"
icon = "far fa-container-storage"
[[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 }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment