mirror of
https://github.com/sergeyyarkov/yarkov.tech.git
synced 2026-10-11 10:29:21 +03:00
fix: fixed lanugage select css
This commit is contained in:
parent
634607d236
commit
c0a0e21508
@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
import { Icon } from "astro-icon";
|
import { Icon } from "astro-icon";
|
||||||
import { DEFAULT_LANGUAGE, IS_SITE_UNDER_CONSTRUCTION } from "@root/config";
|
import { DEFAULT_LANGUAGE } from "@root/config";
|
||||||
import languages from "@i18n/languages";
|
import languages from "@i18n/languages";
|
||||||
import { getLanguageFromURL } from "@root/utils";
|
import { getLanguageFromURL } from "@root/utils";
|
||||||
|
|
||||||
const lang = getLanguageFromURL(Astro.url.pathname);
|
const lang = getLanguageFromURL(Astro.url.pathname);
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="flex language-select" {...(IS_SITE_UNDER_CONSTRUCTION ? { style: 'bottom: 145px;' } : {})}>
|
<div class="flex language-select">
|
||||||
<Icon name="translate" width="21" height="21" />
|
<Icon name="translate" width="21" height="21" />
|
||||||
<select id="languageSelect" value={lang} aria-label="Select language">
|
<select id="languageSelect" value={lang} aria-label="Select language">
|
||||||
{
|
{
|
||||||
@ -55,6 +55,14 @@ const lang = getLanguageFromURL(Astro.url.pathname);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
body[data-is-site-under-construction] {
|
||||||
|
.language-select {
|
||||||
|
bottom: 145px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script define:vars={{ lang, DEFAULT_LANGUAGE }}>
|
<script define:vars={{ lang, DEFAULT_LANGUAGE }}>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
export const DEFAULT_LANGUAGE: LanguageKeys = "ru";
|
export const DEFAULT_LANGUAGE: LanguageKeys = "ru";
|
||||||
|
|
||||||
/* Show banner about website development */
|
/* Show banner about website development */
|
||||||
export const IS_SITE_UNDER_CONSTRUCTION = true;
|
export const IS_SITE_UNDER_CONSTRUCTION = false;
|
||||||
|
|
||||||
export const SITE_METADATA: SiteMetadataType = {
|
export const SITE_METADATA: SiteMetadataType = {
|
||||||
title: "Sergey Yarkov",
|
title: "Sergey Yarkov",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user