From ac604468752286c0ee6a7552dac791d73f02a4a1 Mon Sep 17 00:00:00 2001 From: Bartosz Cylwik <52455076+juujisai@users.noreply.github.com> Date: Fri, 26 May 2023 09:45:16 +0200 Subject: [PATCH] Update docs list layout (#1678) --- site/layouts/docs/list.html | 134 ++++++++++++++--------- site/layouts/partials/header/header.html | 2 +- 2 files changed, 82 insertions(+), 54 deletions(-) diff --git a/site/layouts/docs/list.html b/site/layouts/docs/list.html index 44fd185a6..57bc9b30f 100644 --- a/site/layouts/docs/list.html +++ b/site/layouts/docs/list.html @@ -1,4 +1,6 @@ {{ $hidden_sidenav := .Params.hidden_sidenav }} +{{ $api_file_exists := fileExists (printf "/content/%s/a.html" .File.Dir) }} +{{ $scrollspy_file_exists := fileExists (printf "/content/%s/index-ss.html" .File.Dir) }} @@ -41,7 +43,9 @@ > {{ partial "sidenav/standard.html" . }} -
+
-
    -
  • - Overview -
  • - - {{ if isset .Params "custom_links" }} - {{ $link_entries := split .Params.custom_links "," }} - {{ range $entry := $link_entries }} - {{ $link_data := split $entry "=" }} - + {{ if (or ($api_file_exists) (isset .Params "custom_links")) }} +
      +
    • + Overview +
    • + + {{ if isset .Params "custom_links" }} + {{ $link_entries := split .Params.custom_links "," }} + {{ range $entry := $link_entries }} + {{ $link_data := split $entry "=" }} + + {{ end }} {{ end }} - {{ end }} -
    +
+ {{ end }} +