From 1486ed8139a03938d20648b38215749ff58539a8 Mon Sep 17 00:00:00 2001 From: Miklos Daniel Date: Mon, 20 Mar 2023 09:21:34 +0100 Subject: [PATCH] golya link --- public/locales/hu/common.json | 3 +++ public/locales/locale.schema.json | 9 ++++++++ src/components/layout/header/Header.tsx | 30 +++++++++++++++++++------ 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/public/locales/hu/common.json b/public/locales/hu/common.json index e5f73ae..a9c248c 100644 --- a/public/locales/hu/common.json +++ b/public/locales/hu/common.json @@ -1,5 +1,8 @@ { "$schema": "./../locale.schema.json", + "golya": { + "title": "Gólyáknak" + }, "seo": { "title": "XX. Simonyi Konferencia", "description": "Magyarország legnagyobb, egyetemi hallgatók által szervezett éves technológiai konferenciája." diff --git a/public/locales/locale.schema.json b/public/locales/locale.schema.json index f7d048d..22d983f 100644 --- a/public/locales/locale.schema.json +++ b/public/locales/locale.schema.json @@ -2,6 +2,15 @@ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { + "golya": { + "type": "object", + "properties": { + "title": { + "type": "string" + } + }, + "required": ["title"] + }, "seo": { "type": "object", "properties": { diff --git a/src/components/layout/header/Header.tsx b/src/components/layout/header/Header.tsx index d6ee6cf..d99d1fb 100644 --- a/src/components/layout/header/Header.tsx +++ b/src/components/layout/header/Header.tsx @@ -4,6 +4,7 @@ import Link from "next/link"; import { useRouter } from "next/router"; import { useTranslation } from "next-i18next"; import { useEffect } from "react"; +import { FiExternalLink } from "react-icons/fi"; import { MenuButton } from "@/components/menu/MenuButton"; import { useBool, useWindowSize } from "@/utils/hooks"; @@ -39,10 +40,10 @@ export function Header() { useEffect(() => { if (size.width) { - if (size.width >= 768 && !isMenuOpen) { + if (size.width >= 1024 && !isMenuOpen) { setMenuOpen.setTrue(); } - if (size.width < 768 && isMenuOpen) { + if (size.width < 1024 && isMenuOpen) { setMenuOpen.setFalse(); } } @@ -51,7 +52,7 @@ export function Header() { return (
-
+
-
+
= 768 ? "open" : "closed"} - initial={(size.width ?? 0) >= 768 ? "open" : "closed"} + defaultValue={(size.width ?? 1100) >= 1024 ? "open" : "closed"} + initial={(size.width ?? 0) >= 1024 ? "open" : "closed"} animate={isMenuOpen ? "open" : "closed"} > + + + {t("golya.title")} + + + + +