From 2e8db7ad2384b756894eac6be72bcf720f7f28fa Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Thu, 26 Aug 2021 15:02:38 -0700 Subject: add algolia and cleanup docs readme --- examples/docs/src/components/Header/Header.astro | 56 +++++++----------------- 1 file changed, 15 insertions(+), 41 deletions(-) (limited to 'examples/docs/src/components/Header/Header.astro') diff --git a/examples/docs/src/components/Header/Header.astro b/examples/docs/src/components/Header/Header.astro index cc54585b5..a50957240 100644 --- a/examples/docs/src/components/Header/Header.astro +++ b/examples/docs/src/components/Header/Header.astro @@ -1,9 +1,11 @@ --- +import { getLanguageFromURL, KNOWN_LANGUAGE_CODES } from '../../languages.ts'; +import * as CONFIG from '../../config.ts'; +import AstroLogo from './AstroLogo.astro'; import SkipToContent from './SkipToContent.astro'; import SidebarToggle from './SidebarToggle.tsx'; import LanguageSelect from './LanguageSelect.jsx'; import Search from "./Search.jsx"; -import { getLanguageFromURL } from '../util.ts'; const {currentPage} = Astro.props; const lang = currentPage && getLanguageFromURL(currentPage); @@ -27,40 +29,30 @@ const lang = currentPage && getLanguageFromURL(currentPage); display: flex; overflow: hidden; width: 30px; - font-size: 1rem; + font-size: 2rem; flex-shrink: 0; font-weight: 600; line-height: 1; color: hsla(var(--color-base-white), 100%, 1); - text-decoration: none; - gap: 0.5em; + gap: 0.25em; z-index: -1; } .logo a { padding: 0.5em 0.25em; margin: -0.5em -0.25em; + text-decoration: none; + font-weight: bold; } - .logo svg { - height: 40px; - width: auto; - display: block; - color: var(--theme-accent); - } - - .logo .hover { - opacity: 0.0; - } .logo a { - transition: transform 180ms ease-out; + transition: color 100ms ease-out; + color: var(--theme-text); } .logo a:hover, .logo a:focus { - outline: none; - opacity: 1.0; - transform: translateY(-2px); + color: var(--theme-text-accent); } .logo h1 { @@ -82,7 +74,7 @@ const lang = currentPage && getLanguageFromURL(currentPage); @media (min-width: 50em) { header { position: static; - padding: 2rem 0rem 0 2rem; + padding: 2rem 0rem; } .logo { width: auto; @@ -128,31 +120,13 @@ const lang = currentPage && getLanguageFromURL(currentPage);
- {lang && } -
+ {KNOWN_LANGUAGE_CODES.length > 1 && } + {CONFIG.ALGOLIA &&
} \ No newline at end of file -- cgit v1.2.3