From d5fa4ed034a91c55ec677896080ad4e4c1ab1b8f Mon Sep 17 00:00:00 2001 From: kvakazyambra Date: Thu, 2 Nov 2023 22:21:51 +0300 Subject: [PATCH] Search modal --- public/icons/search.svg | 3 +- public/locales/en/translation.json | 1 + public/locales/ru/translation.json | 1 + src/components/Nav/Header/Header.tsx | 5 + src/components/Nav/HeaderAuth.tsx | 4 +- src/components/Nav/Modal/Modal.module.scss | 26 ++++ src/components/Nav/Modal/Modal.tsx | 2 +- .../Nav/SearchModal/SearchModal.module.scss | 98 ++++++++++++ .../Nav/SearchModal/SearchModal.tsx | 145 ++++++++++++++++++ src/stores/ui.ts | 4 +- 10 files changed, 284 insertions(+), 5 deletions(-) create mode 100644 src/components/Nav/SearchModal/SearchModal.module.scss create mode 100644 src/components/Nav/SearchModal/SearchModal.tsx diff --git a/public/icons/search.svg b/public/icons/search.svg index 045492d0..48c14f1d 100644 --- a/public/icons/search.svg +++ b/public/icons/search.svg @@ -1,3 +1,4 @@ - + diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 97824a78..8cfdc076 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -289,6 +289,7 @@ "Send": "Send", "Send link again": "Send link again", "Settings": "Settings", + "Site search": "Site search", "Share": "Share", "Show": "Show", "Show lyrics": "Show lyrics", diff --git a/public/locales/ru/translation.json b/public/locales/ru/translation.json index 87576d99..1c379fac 100644 --- a/public/locales/ru/translation.json +++ b/public/locales/ru/translation.json @@ -305,6 +305,7 @@ "Send": "Отправить", "Send link again": "Прислать ссылку ещё раз", "Settings": "Настройки", + "Site search": "Поиск по сайту", "Share": "Поделиться", "Short opening": "Расскажите вашу историю...", "Show": "Показать", diff --git a/src/components/Nav/Header/Header.tsx b/src/components/Nav/Header/Header.tsx index 7dbe5026..22179cee 100644 --- a/src/components/Nav/Header/Header.tsx +++ b/src/components/Nav/Header/Header.tsx @@ -24,6 +24,7 @@ import { apiClient } from '../../../utils/apiClient' import { RANDOM_TOPICS_COUNT } from '../../Views/Home' import { Link } from './Link' import { Subscribe } from '../../_shared/Subscribe' +import { SearchModal } from '../SearchModal/SearchModal' type Props = { title?: string @@ -183,6 +184,10 @@ export const Header = (props: Props) => { + + + +