Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5733d2

Browse files
committed
feat(css): Update menu on small screen
1 parent 6dbf50e commit b5733d2

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

docs/src/_layouts/main.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ html(lang='en')
2626
body.hind.text-telluric.bg-white
2727
include ../_includes/tag-manager-noscript.pug
2828
include ../_includes/header.pug
29-
.block.mt-3
29+
.mt-3
3030
block content
3131

3232
script(src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js")

docs/src/_layouts/two-columns.pug

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,28 @@ block nav
1616
path(d="M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z")
1717

1818
block content
19-
.bgtb-moon-white-pure
19+
.bgtb-moon-white-pure.relative
2020
.md_flex.max-w-lg.m-auto
21-
.navigation-sidebar.hidden.absolute.z-90.md_static.bg-white.md_bg-transparent.w-100.md_w-25.md_block.md_border-0.text-center.md_text-left.md_pl-2
21+
.navigation-sidebar.absolute.hidden.md_static.bg-white.md_bg-transparent.w-100.md_w-25.md_block.md_border-0.text-left.md_pl-2
2222
// Adding subsections from markdown
23-
.sticky.pin-t.h-100vh.overflow-y-auto.pt-4.md_pt-3.lg_pt-4.w-full
23+
.sticky.pin-t.h-100vh-3.overflow-y-auto.pt-2.w-5.m-auto.sm_flex.sm_w-90.md_block.md_w-100
2424
each category in sidebar
25-
.category.text-nebula.poppins.uppercase.mb-1.text-2.md_text-1=category.title
26-
ul.list-reset.pb-1.text-1.mb-1.md_ml-0x
27-
each page in category.pages
28-
- var isCurrent = current.url === page.url
29-
- var additionalClasses = isCurrent ? 'text-nebula' : 'text-solstice'
30-
li
31-
a.block.py-0x(href=page.url, class=additionalClasses)=page.title
32-
- var hasSubLinks = (page.headings && page.headings.length)
33-
if hasSubLinks
34-
ul.list-reset.pl-1.text-2
35-
each heading in page.headings
36-
li
37-
a.block.py-0x.text-telluric(href=`${page.url}#${heading.anchor}`)=heading.title
25+
.flcnw.flspa.sm_flex-auto.sm_w-33.sm_p-1.md_w-100.md_p-0
26+
.category.text-nebula.poppins.uppercase.mb-1.text-2=category.title
27+
ul.list-reset.text-1.mb-1.md_ml-0x
28+
each page in category.pages
29+
- var isCurrent = current.url === page.url
30+
- var additionalClasses = isCurrent ? 'text-nebula' : 'text-solstice'
31+
li
32+
a.block.py-0x(href=page.url, class=additionalClasses)=page.title
33+
- var hasSubLinks = (page.headings && page.headings.length)
34+
if hasSubLinks
35+
ul.list-reset.pl-1.text-2
36+
each heading in page.headings
37+
li
38+
a.block.py-0x.text-telluric(href=`${page.url}#${heading.anchor}`)=heading.title
3839

39-
.documentation-content.text-1.pt-2.md_pt-3.lg_pt-4.pb-4.px-2.w_100.md_w-75
40+
.documentation-content.text-1.pt-2.pb-1.px-2.w_100.md_w-75
4041
.block.md_hidden.mb-1
4142
a(href=site.url) DocSearch
4243
span  > 

0 commit comments

Comments
 (0)