Fixing mobile header for docs example (#3335)

This commit is contained in:
Tony Sullivan 2022-05-10 21:59:56 +00:00 committed by GitHub
parent 0913afb255
commit be899fdd1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View file

@ -18,8 +18,8 @@ const lang = currentPage && getLanguageFromURL(currentPage);
<SidebarToggle client:idle /> <SidebarToggle client:idle />
</div> </div>
<div class="logo flex"> <div class="logo flex">
<AstroLogo size={40} />
<a href="/"> <a href="/">
<AstroLogo size={40} />
<h1>{CONFIG.SITE.title ?? "Documentation"}</h1> <h1>{CONFIG.SITE.title ?? "Documentation"}</h1>
</a> </a>
</div> </div>
@ -48,6 +48,7 @@ const lang = currentPage && getLanguageFromURL(currentPage);
} }
.logo { .logo {
flex: 1;
display: flex; display: flex;
overflow: hidden; overflow: hidden;
width: 30px; width: 30px;
@ -61,6 +62,7 @@ const lang = currentPage && getLanguageFromURL(currentPage);
} }
.logo a { .logo a {
display: flex;
padding: 0.5em 0.25em; padding: 0.5em 0.25em;
margin: -0.5em -0.25em; margin: -0.5em -0.25em;
text-decoration: none; text-decoration: none;
@ -78,6 +80,7 @@ const lang = currentPage && getLanguageFromURL(currentPage);
} }
.logo h1 { .logo h1 {
display: none;
font: inherit; font: inherit;
color: inherit; color: inherit;
margin: 0; margin: 0;
@ -103,12 +106,12 @@ const lang = currentPage && getLanguageFromURL(currentPage);
margin: 0; margin: 0;
z-index: 0; z-index: 0;
} }
.logo h1 {
display: initial;
}
.menu-toggle { .menu-toggle {
display: none; display: none;
} }
.logo {
width: auto;
}
} }
/** Style Algolia */ /** Style Algolia */

View file

@ -1,5 +1,5 @@
export const SITE = { export const SITE = {
title: 'Your Documentation Website', title: 'Documentation',
description: 'Your website description.', description: 'Your website description.',
defaultLanguage: 'en_US', defaultLanguage: 'en_US',
}; };