Skip to content

Commit 320d738

Browse files
authored
Merge pull request #74 from Namanv0509/sidebar-update
Update left side bar content font weight and size based on level and …
2 parents b93ff72 + e2aadb7 commit 320d738

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

assets/scss/_sidebar-tree.scss

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,20 @@
4949

5050
padding-left: 0;
5151
}
52+
5253

5354
&__section-title {
5455
display: block;
5556
font-weight: $font-weight-medium;
5657

5758
.active {
5859
font-weight: $font-weight-bold;
60+
font-size: large;
5961
}
6062

6163
a {
6264
color: $dark;
65+
text-decoration: none;
6366
}
6467
}
6568

@@ -77,6 +80,7 @@
7780
&:focus,
7881
&:hover {
7982
color: $dark;
83+
text-decoration: none;
8084
}
8185

8286
&.active {
@@ -114,7 +118,19 @@
114118
margin-bottom: 1rem;
115119
}
116120
}
117-
121+
.level-0.td-sidebar-nav__section-title a {
122+
color: $dark;
123+
&.active {
124+
font-weight: $font-weight-bold;
125+
color: $dark
126+
}
127+
}
128+
129+
130+
.level-2.td-sidebar-nav__section-title a {
131+
color: $gray-800;
132+
font-weight: $font-weight-medium;
133+
}
118134
.td-sidebar {
119135
@include link-decoration;
120136

layouts/partials/sidebar-tree.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
{{ $withChild := gt (len $pages) 0 -}}
9595
{{ $manualLink := cond (isset $s.Params "manuallink") $s.Params.manualLink ( cond (isset $s.Params "manuallinkrelref") (relref $s $s.Params.manualLinkRelref) $s.RelPermalink) -}}
9696
{{ $manualLinkTitle := cond (isset $s.Params "manuallinktitle") $s.Params.manualLinkTitle $s.Title -}}
97-
<li class="td-sidebar-nav__section-title td-sidebar-nav__section{{ if $withChild }} with-child{{ else }} without-child{{ end }}{{ if $activePath }} active-path{{ end }}{{ if (not (or $show $p.Site.Params.ui.sidebar_menu_foldable )) }} collapse{{ end }}" id="{{ $mid }}-li">
97+
<li class="td-sidebar-nav__section-title td-sidebar-nav__section level-{{ $ulNr }}{{ if $withChild }} with-child{{ else }} without-child{{ end }}{{ if $activePath }} active-path{{ end }}{{ if (not (or $show $p.Site.Params.ui.sidebar_menu_foldable )) }} collapse{{ end }}" id="{{ $mid }}-li">
9898
{{ if (and $p.Site.Params.ui.sidebar_menu_foldable (ge $ulNr 1)) -}}
9999
<input type="checkbox" id="{{ $mid }}-check"{{ if $activePath}} checked{{ end }}/>
100100
<label for="{{ $mid }}-check"><a href="{{ $manualLink }}"{{ if ne $s.LinkTitle $manualLinkTitle }} title="{{ $manualLinkTitle }}"{{ end }}{{ with $s.Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }} class="align-left ps-0 {{ if $active}} active{{ end }} td-sidebar-link{{ if $s.IsPage }} td-sidebar-link__page{{ else }} td-sidebar-link__section{{ end }}{{ if $treeRoot }} tree-root{{ end }}" id="{{ $mid }}">{{ with $s.Params.Icon}}<i class="{{ . }}"></i>{{ end }}<span class="{{ if $active }}td-sidebar-nav-active-item{{ end }}">{{ $s.LinkTitle }}</span></a></label>

0 commit comments

Comments
 (0)