mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-18 12:13:42 +00:00
fix: case with book at site root
This commit is contained in:
1 parent
c83227df43
commit
9868b04fae
3 files changed
+13
-3
No files matched your search
@@ -15,7 +15,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
node-version: [15.x]
|
node-version: [16.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|||||||
@@ -90,6 +90,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-navbar .docs-sidebar {
|
||||||
|
top: 0;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 1200px) {
|
@media (min-width: 1200px) {
|
||||||
.docs-sidebar {
|
.docs-sidebar {
|
||||||
flex: 0 1 320px;
|
flex: 0 1 320px;
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
<button class="btn docs-toggle d-md-none p-0 mr-md-3 w-100" type="button" data-toggle="collapse" data-target="#docs-nav" aria-controls="docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
<button class="btn docs-toggle d-md-none p-0 mr-md-3 w-100" type="button" data-toggle="collapse" data-target="#docs-nav" aria-controls="docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<span class="d-md-none pl-1 flex-grow-1 text-left overflow-hidden">
|
<span class="d-md-none pl-1 flex-grow-1 text-left overflow-hidden">
|
||||||
{{ if .Parent | and .Parent.IsHome }}
|
{{/* Don't use piped conditions here in order to utilise short-circuiting */}}
|
||||||
|
{{ if and .Parent .Parent.IsHome }}
|
||||||
{{ .LinkTitle | emojify }}
|
{{ .LinkTitle | emojify }}
|
||||||
{{ else if .Parent | and (not .Parent.IsHome) }}
|
{{ else if and .Parent (not .Parent.IsHome) }}
|
||||||
{{ .Parent.LinkTitle | emojify }}
|
{{ .Parent.LinkTitle | emojify }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ (i18n "home" | default "Home") | emojify }}
|
{{ (i18n "home" | default "Home") | emojify }}
|
||||||
@@ -45,6 +46,10 @@
|
|||||||
{{- $query = .Site.Home.Sections.ByWeight -}}
|
{{- $query = .Site.Home.Sections.ByWeight -}}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
|
||||||
|
{{- range $query -}}
|
||||||
|
{{ template "book-menu" dict "sect" . "current_node" $current_node "order_by" $order_by "is_root" $is_root }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{else}}
|
{{else}}
|
||||||
{{/* Case where homepage is NOT a book */}}
|
{{/* Case where homepage is NOT a book */}}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user