How to configure hide navbar? #1992
syxc
started this conversation in
Feature Requests
Replies: 1 comment
-
This is my current solution, and I would like to see Starlight officially add a way to configure the hide navbar. Thanks! test.md ---
title: Page Title
description: A guide in my new Starlight docs site.
template: splash
layout: ../../layouts/HideNavbarLayout.astro
---
Make your docs shine with Starlight.
HideNavbarLayout.astro ---
// 1. Access frontmatter and other data using Astro.props
// const { frontmatter } = Astro.props;
---
<!-- main content -->
<slot />
<style is:inline>
/* Hide navbar */
:root {
--sl-nav-height: 0px;
}
.header {
display: none;
}
/* Fix for doc template */
nav button:where(.astro-jif73yzw) {
top: calc((3rem - var(--sl-menu-button-size)) / 2);
}
</style> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of
starlight
are you using?0.24.1
What is your idea?
How to configure hide navbar, like this
https://vitepress.dev/reference/frontmatter-config#navbar
Why is this feature necessary?
Sometimes we need to display a markdown-generated page as one of the pages in an Android or iOS app, such as a static page like a privacy policy, user agreement, etc., when it would be more appropriate to hide the navigation bar.
Do you have examples of this feature in other projects?
No response
Participation
Beta Was this translation helpful? Give feedback.
All reactions