Skip to content
Snippets Groups Projects
Commit 032090c4 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Merge branch 'web-benchmark-order' into 'master'

[web] Sort benchmark sections alphabetically

See merge request ogs/ogs!4536
parents 5aab0681 8f6abc0c
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,12 @@ if "SETUPTOOLS_SCM_LOCAL_SCHEME" in os.environ: ...@@ -29,7 +29,12 @@ if "SETUPTOOLS_SCM_LOCAL_SCHEME" in os.environ:
if os.environ["SETUPTOOLS_SCM_LOCAL_SCHEME"] in local_scheme_values: if os.environ["SETUPTOOLS_SCM_LOCAL_SCHEME"] in local_scheme_values:
scm_local_scheme = os.environ["SETUPTOOLS_SCM_LOCAL_SCHEME"] scm_local_scheme = os.environ["SETUPTOOLS_SCM_LOCAL_SCHEME"]
if not "CMAKE_ARGS" in os.environ: if "CMAKE_ARGS" in os.environ:
print(
"WARNING: Default CMake preset 'wheel' overridden! "
"Be sure to pass a proper preset or configuration!"
)
else:
cmake_preset = "wheel" cmake_preset = "wheel"
if platform.system() == "Windows": if platform.system() == "Windows":
cmake_preset += "-win" cmake_preset += "-win"
......
...@@ -9,4 +9,5 @@ weight = 2 ...@@ -9,4 +9,5 @@ weight = 2
[cascade] [cascade]
breadcumbs = false breadcumbs = false
collapsed = true collapsed = true
sort_alphabetically = false
+++ +++
...@@ -4,6 +4,7 @@ layout = "subsections" ...@@ -4,6 +4,7 @@ layout = "subsections"
[cascade] [cascade]
breadcrumbs = true breadcrumbs = true
sort_alphabetically = true
[menu.docs] [menu.docs]
name = "Benchmarks" name = "Benchmarks"
......
+++ +++
title = "Developer Guide" title = "Developer Guide"
os_selector = true os_selector = true
[cascade]
breadcumbs = false
collapsed = true
+++ +++
+++ +++
title = "Tools" title = "Tools"
[cascade]
breadcumbs = false
collapsed = true
+++ +++
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
{{ if .Params.breadcrumbs }} {{ if .Params.breadcrumbs }}
{{ partial "docs/breadcrumbs.html" . }} {{ partial "docs/breadcrumbs.html" . }}
{{ end }} {{ end }}
{{ $sections := .Sections }}
{{ if .Params.sort_alphabetically }}
{{ $sections = sort .Sections "Title" }}
{{ end }}
<div class="mx-auto py-2 px-4 max-w-7xl sm:px-6 lg:px-8 lg:py-4"> <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-8">
<div class="space-y-5 sm:space-y-4 md:max-w-xl lg:max-w-3xl xl:max-w-none prose"> <div class="space-y-5 sm:space-y-4 md:max-w-xl lg:max-w-3xl xl:max-w-none prose">
...@@ -15,7 +19,7 @@ ...@@ -15,7 +19,7 @@
</div> </div>
<ul role="list" <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"> 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 }}
{{ if .Params.featured }} {{ if .Params.featured }}
{{ partial "components/gallery-item.html" . }} {{ partial "components/gallery-item.html" . }}
{{ end }} {{ end }}
...@@ -28,7 +32,7 @@ ...@@ -28,7 +32,7 @@
</div> </div>
<ul role="list" <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"> 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" . }} {{ partial "components/gallery-item.html" . }}
{{ end }} {{ end }}
</ul> </ul>
......
...@@ -53,7 +53,11 @@ ...@@ -53,7 +53,11 @@
{{ end }} {{ end }}
<hr class="mt-3"> <hr class="mt-3">
<ul> <ul>
{{ range $baseSubsection.Sections }} {{ $subsections := $baseSubsection.Sections }}
{{ if .Params.sort_alphabetically }}
{{ $subsections = sort $baseSubsection.Sections "Title" }}
{{ end }}
{{ range $subsections }}
{{ if .Params.collapsed }} {{ if .Params.collapsed }}
{{ if eq .RelPermalink $subSubsection.RelPermalink }} {{ if eq .RelPermalink $subSubsection.RelPermalink }}
<li class="tracking-wide font-bold mt-6"> <li class="tracking-wide font-bold mt-6">
......
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