File tree Expand file tree Collapse file tree 3 files changed +54
-15
lines changed Expand file tree Collapse file tree 3 files changed +54
-15
lines changed Original file line number Diff line number Diff line change @@ -527,39 +527,67 @@ nav {
527
527
}
528
528
529
529
body : has (# sidebar-v2 [style *= "block" ]) {
530
+ /* Disable scrolling in main content + hide footer if the sidebar is visible */
530
531
overflow-y : hidden;
532
+
533
+ .sidebar-layout {
534
+ position : absolute;
535
+ height : 100% ;
536
+ }
537
+
538
+ footer {
539
+ display : none;
540
+ }
541
+
542
+ .sidebar-layout .sidebar-mobile-toggle {
543
+ display : flex !important ;
544
+ align-items : center;
545
+ position : sticky;
546
+ top : 1rem ;
547
+ margin-top : 2rem ;
548
+ padding : 0.5rem ;
549
+ color : white;
550
+ background-color : oklch (var (--color-brand ));
551
+ }
552
+ }
553
+
554
+ .breadcrumb .sidebar-mobile-toggle {
555
+ display : inline !important ;
556
+ }
557
+
558
+ .sidebar-mobile-toggle {
559
+ background-color : transparent;
560
+ border : none;
561
+
562
+ .lucide {
563
+ width : 1rem ;
564
+ height : 1rem ;
565
+ margin-right : 1rem ;
566
+ }
531
567
}
532
568
533
569
.main-layout {
570
+ /* Mobile support for sidebar */
534
571
display : flex;
535
572
flex-direction : column;
536
573
position : relative;
537
574
538
575
.sidebar-layout {
539
576
min-height : fit-content;
540
- position : sticky;
541
- top : 0 ;
542
- padding : 1rem ;
543
- background-color : white;
577
+ background : white;
578
+ z-index : 3 ;
544
579
width : calc (100% + 4rem );
545
580
margin-left : -2rem ;
546
- overflow-y : scroll;
547
581
548
582
& ::before {
549
583
display : none;
550
584
}
551
585
552
- .sidebar-mobile-toggle {
553
- background-color : oklch (var (--color-brand ));
554
- color : white;
555
- border : none;
556
- display : block !important ;
557
- }
558
-
559
586
nav {
560
587
width : 100% ;
561
- height : 100vh ;
562
588
display : none;
589
+ padding : 0 ;
590
+ top : 3rem ;
563
591
564
592
.sidebar__container {
565
593
width : 100% ;
@@ -981,6 +1009,16 @@ p {
981
1009
line-height : 1.5rem ;
982
1010
}
983
1011
1012
+ .breadcrumb-layout {
1013
+ position : sticky;
1014
+ top : 0 ;
1015
+ z-index : 3 ;
1016
+ background-color : white;
1017
+ width : calc (100% + 4rem );
1018
+ margin-left : -2rem ;
1019
+ padding : 1rem 2rem ;
1020
+ }
1021
+
984
1022
.breadcrumb {
985
1023
color : var (--color-foreground );
986
1024
text-decoration : none;
Original file line number Diff line number Diff line change 69
69
70
70
< section class ="main-layout ">
71
71
< div class ="sidebar-layout " id ="sidebar-layout ">
72
- < button class ="sidebar-mobile-toggle " aria-expanded ="false " style =" display: none; " > < p > Click </ p > </ button >
73
- < nav data-mf ="true " id ="sidebar-v2 " class ="sidebar " style =" display:none; " >
72
+ < button class ="sidebar-mobile-toggle " style =" display: none; " aria-expanded ="false "> {{ partial "lucide" (dict "context" . "icon" "x")}}Close </ button >
73
+ < nav data-mf ="true " id ="sidebar-v2 " class ="sidebar ">
74
74
{{ partial "sidebar-v2.html" . }}
75
75
</ nav >
76
76
</ div >
Original file line number Diff line number Diff line change 1
1
< nav aria-label ="breadcrumb " class ="breadcrumb navbar ">
2
2
< div class ="nav flex-md-row ">
3
3
< ol class ="breadcrumb ">
4
+ < button class ="sidebar-mobile-toggle " aria-expanded ="false " style ="display: none; "> {{ partial "lucide" (dict "context" . "icon" "align-justify") }}</ button >
4
5
< li > < a href ="/ " alt ="NGINX Docs Home "> Home</ a > </ li >
5
6
{{- define "breadcrumb" -}}
6
7
{{- with .Parent -}}
You can’t perform that action at this time.
0 commit comments