Skip to content

Commit 560404e

Browse files
feat: enhance mobile menu with background and adjust icon positioning
1 parent 2423aeb commit 560404e

File tree

4 files changed

+26
-5
lines changed

4 files changed

+26
-5
lines changed

docs/assets/scss/menu.scss

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@
5151

5252
&__mobile-icon {
5353
position: fixed;
54-
top: $header-first-nav-height;
54+
top: 80px;
5555
display: flex;
5656
justify-content: center;
5757
align-items: center;
5858
width: 55px;
5959
height: $header-second-nav-height;
6060
left: 10px;
61-
z-index: 32;
61+
z-index: 36;
6262
transition: $transition;
6363

6464
&::before {
@@ -83,6 +83,25 @@
8383
}
8484
}
8585

86+
&__mobile-bg {
87+
position: fixed;
88+
top: $header-first-nav-height + 1px;
89+
left: -100%;
90+
bottom: 0;
91+
width: 100%;
92+
z-index: 32;
93+
background-color: rgba($color-deep-purple, 0.5);
94+
transition: $transition;
95+
96+
@include mq(medium) {
97+
display: none;
98+
}
99+
}
100+
&__mobile-trigger:checked ~ &,
101+
&__mobile-trigger:checked ~ &__mobile-bg {
102+
left: 0;
103+
}
104+
86105
&__mobile-trigger:checked ~ & {
87106
left: 0;
88107
}
@@ -144,11 +163,10 @@
144163
position: relative;
145164
display: inline-block;
146165
flex: 1 1 auto;
147-
margin: 2px 20px 2px 0; // orig values -> 8px 20px 3px 0;
166+
margin: 8px 20px 3px 0;
148167
padding: 0 0 5px;
149168
max-width: 100%;
150169
font-size: 15px;
151-
//font-family: "Lucida Console", "Courier New", monospace;
152170
line-height: 1.5;
153171

154172
&,

docs/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.20
44

55
require (
66
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 // indirect
7-
github.com/gooddata/gooddata-docs-theme v0.0.0-20250724141246-310dd7684e82 // indirect
7+
github.com/gooddata/gooddata-docs-theme v0.0.0-20250729102440-7a7e8c25d60b // indirect
88
github.com/google/docsy v0.7.1 // indirect
99
github.com/google/docsy/dependencies v0.7.1 // indirect
1010
github.com/twbs/bootstrap v5.3.1+incompatible // indirect

docs/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ github.com/gooddata/gooddata-docs-theme v0.0.0-20250724110042-81655c31f00b h1:w2
2828
github.com/gooddata/gooddata-docs-theme v0.0.0-20250724110042-81655c31f00b/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA=
2929
github.com/gooddata/gooddata-docs-theme v0.0.0-20250724141246-310dd7684e82 h1:vetjOF/JcH99uBeMDV22JvRoPB+5rps03c72na5LMi4=
3030
github.com/gooddata/gooddata-docs-theme v0.0.0-20250724141246-310dd7684e82/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA=
31+
github.com/gooddata/gooddata-docs-theme v0.0.0-20250729102440-7a7e8c25d60b h1:Tsi2R9UmdkJpEhdBPN870ybDU06RfEN2Hbq4+BiOzMA=
32+
github.com/gooddata/gooddata-docs-theme v0.0.0-20250729102440-7a7e8c25d60b/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA=
3133
github.com/google/docsy v0.7.1 h1:DUriA7Nr3lJjNi9Ulev1SfiG1sUYmvyDeU4nTp7uDxY=
3234
github.com/google/docsy v0.7.1/go.mod h1:JCmE+c+izhE0Rvzv3y+AzHhz1KdwlA9Oj5YBMklJcfc=
3335
github.com/google/docsy/dependencies v0.7.1 h1:NbzYKJYMin2q50xdWSUzR2c9gCp7zR/XHDBcxklEcTQ=

docs/layouts/partials/sidebar-tree.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!-- PETR: Menu assembled here -->
22
<input type="checkbox" id="gd-docs-menu__mobile-trigger" class="gd-docs-menu__mobile-trigger" />
33
<label for="gd-docs-menu__mobile-trigger" class="gd-docs-menu__mobile-icon"></label>
4+
<div class="gd-docs-menu__mobile-bg"></div>
45
<nav class="gd-docs-menu init">
56
{{ $additionalNavRoot := .Site.GetPage "/versions" }}
67
{{ $root := .Site.GetPage "/docs" }}

0 commit comments

Comments
 (0)