From: XhmikosR Date: Fri, 4 Dec 2020 09:53:14 +0000 (+0200) Subject: Move migration sidebar entry to sidebar.yml X-Git-Tag: v5.0.0-beta2~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9adaae5b0fe41e237f20f2dc1232a1025af9d1b;p=thirdparty%2Fbootstrap.git Move migration sidebar entry to sidebar.yml --- diff --git a/site/data/sidebar.yml b/site/data/sidebar.yml index 80256e9f00..a4d4ccbbd1 100644 --- a/site/data/sidebar.yml +++ b/site/data/sidebar.yml @@ -1,3 +1,6 @@ +# This file holds all sidebar menu's entries. +# The logic for the sidebar generation is in "site/layouts/partials/docs-sidebar.html". + - title: Getting started pages: - title: Introduction @@ -26,7 +29,6 @@ - title: Breakpoints - title: Containers - title: Grid - # - title: Rows - title: Columns - title: Gutters - title: Utilities @@ -117,3 +119,5 @@ - title: Brand - title: License - title: Translations + +- title: Migration diff --git a/site/layouts/partials/docs-sidebar.html b/site/layouts/partials/docs-sidebar.html index 94acb47863..ba974f4cde 100644 --- a/site/layouts/partials/docs-sidebar.html +++ b/site/layouts/partials/docs-sidebar.html @@ -13,33 +13,33 @@ {{- end -}} {{- $group_slug := $group.title | urlize -}} - {{- $is_active_group := eq $.Page.Params.group $group_slug }} + {{- $is_active_group := eq $.Page.Params.group $group_slug -}} -
  • - + {{- if $group.pages }} +
  • + - {{- if $group.pages }} -
    -
      - {{- range $doc := $group.pages -}} - {{- $doc_slug := $doc.title | urlize -}} - {{- $is_active := and $is_active_group (eq $page_slug $doc_slug) -}} - {{- $href := printf "/docs/%s/%s/%s/" $.Site.Params.docs_version $group_slug $doc_slug }} -
    • {{ $doc.title }}
    • - {{- end }} -
    -
    - {{- end }} -
  • +
    + +
    + + {{- else }} +
  • + + + {{ $group.title }} + + + {{- end }} {{- end }} - -
  • - - - Migration - -