From 9fa6b820fbe48c3227a717d1974a0a1d8a8c4c37 Mon Sep 17 00:00:00 2001 From: ifraimka Date: Wed, 8 May 2024 20:45:43 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=9D=D0=B0=D0=BF=D0=BE=D0=BB=D0=BD=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=83?= =?UTF-8?q?=20"=D0=9E=20=D0=BD=D0=B0=D1=81",=20=D0=B8=D0=BD=D1=82=D0=B5?= =?UTF-8?q?=D0=B3=D1=80=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D1=8F?= =?UTF-8?q?=D0=BD=D0=B4=D0=B5=D0=BA=D1=81=20=D0=BA=D0=B0=D1=80=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 20 +++++++++++++ package.json | 1 + src/pages/Contact/Contact.jsx | 43 +++++++++++++++++++-------- src/pages/Contact/Contact.styles.scss | 21 +++++++++++++ 4 files changed, 72 insertions(+), 13 deletions(-) create mode 100644 src/pages/Contact/Contact.styles.scss diff --git a/package-lock.json b/package-lock.json index 814c5fb..f31a1cb 100755 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "skb", "version": "0.1.0", "dependencies": { + "@pbe/react-yandex-maps": "^1.2.5", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", @@ -3302,6 +3303,20 @@ "node": ">= 8" } }, + "node_modules/@pbe/react-yandex-maps": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@pbe/react-yandex-maps/-/react-yandex-maps-1.2.5.tgz", + "integrity": "sha512-cBojin5e1fPx9XVCAqHQJsCnHGMeBNsP0TrNfpWCrPFfxb30ye+JgcGr2mn767Gbr1d+RufBLRiUcX2kaiAwjQ==", + "dependencies": { + "@types/yandex-maps": "2.1.29" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "react": "^16.x || ^17.x || ^18.x" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -4571,6 +4586,11 @@ "@types/node": "*" } }, + "node_modules/@types/yandex-maps": { + "version": "2.1.29", + "resolved": "https://registry.npmjs.org/@types/yandex-maps/-/yandex-maps-2.1.29.tgz", + "integrity": "sha512-nuibRWj3RU/9KXlCzTrRtDE+n6V9l7NbT9JakicqZ5OXIdwyb6blvV2Uwn6lB58WYm3DSUDP2I2AWlnWMc8z2w==" + }, "node_modules/@types/yargs": { "version": "16.0.9", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.9.tgz", diff --git a/package.json b/package.json index 12d7837..cbb8e27 100755 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "@pbe/react-yandex-maps": "^1.2.5", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/src/pages/Contact/Contact.jsx b/src/pages/Contact/Contact.jsx index d819b02..b7e8ec9 100755 --- a/src/pages/Contact/Contact.jsx +++ b/src/pages/Contact/Contact.jsx @@ -1,24 +1,41 @@ +import { YMaps, Map, Placemark } from '@pbe/react-yandex-maps'; + import { PageContent, PageHeader } from "../components"; +import ContactForm from "../../components/ContactForm"; + +import "./Contact.styles.scss"; function Contact() { return ( <> -

Студенческое конструкторское бюро
- "Компьютерное инновационное творчество"

+
+
+

Контакты

+
+

Контактное лицо:
+ Кутковой Владимир Сергеевич
+ Руководитель СКБ «КИТ»
+ Email: skb@sfedu.ru
+ Адрес: г. Таганрог, пер. Тургеневский, 44, ауд. 208

+
+
+ + + + + +
-
-

Контактное лицо: Кутковой Владимир Сергеевич

-
-
- - - - - - -
+
); diff --git a/src/pages/Contact/Contact.styles.scss b/src/pages/Contact/Contact.styles.scss new file mode 100644 index 0000000..7b9581d --- /dev/null +++ b/src/pages/Contact/Contact.styles.scss @@ -0,0 +1,21 @@ +.top-block { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + flex: 1 1 50%; + + div:has(> ymaps) { + + ymaps[class*="inner-panes"] { + border-radius: 8px; + } + } + +// div:has(> ymaps) + div:has(> ymaps) > * + { + width: auto!important; + height: 100%!important; + aspect-ratio: 1; + } +} \ No newline at end of file From 439bfca774b0ca08ba245372883176aa56d33aa1 Mon Sep 17 00:00:00 2001 From: ifraimka Date: Fri, 10 May 2024 13:07:51 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5=D0=BD=D1=82=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=82=D0=B0=D0=BA=D1=82=D0=BD=D0=BE=D0=B9=20?= =?UTF-8?q?=D1=84=D0=BE=D1=80=D0=BC=D1=8B,=20=D1=82=D0=B5=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D1=8C=20=D0=B1=D0=BE=D0=BB=D0=B5=D0=B5=20=D0=B3=D0=B8?= =?UTF-8?q?=D0=B1=D0=BA=D0=B8=D0=B9=20=D0=B2=20=D1=81=D1=82=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D0=B8.=20=D0=98=D0=B7=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=BB=20=D1=81=D1=82=D0=B8=D0=BB=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=20=D0=BA=D0=BE=D0=BD=D0=BA=D1=80=D0=B5=D1=82?= =?UTF-8?q?=D0=BD=D1=8B=D0=B5=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86?= =?UTF-8?q?=D1=8B=20=D0=B4=D0=BB=D1=8F=20=D1=84=D0=BE=D1=80=D0=BC=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ContactForm/ContactForm.jsx | 70 ++++++++----------- .../ContactForm/ContactForm.styles.scss | 27 ++++++- src/pages/Contact/Contact.jsx | 4 +- src/pages/Contact/Contact.styles.scss | 48 +++++++++---- .../ContactUs/ContactUs.styles.scss | 9 ++- 5 files changed, 99 insertions(+), 59 deletions(-) diff --git a/src/components/ContactForm/ContactForm.jsx b/src/components/ContactForm/ContactForm.jsx index f503fb8..db46509 100644 --- a/src/components/ContactForm/ContactForm.jsx +++ b/src/components/ContactForm/ContactForm.jsx @@ -6,51 +6,43 @@ import "./ContactForm.styles.scss"; import { fileUpload } from "../../assets/images"; -const mock = [ - { - id: 1, - type: "text", - name: "name", - placeholder: "Имя", - }, - { - id: 2, - type: "email", - name: "email", - placeholder: "E-mail", - }, - { - id: 3, - type: "textarea", - name: "text", - placeholder: "Опишите в этом поле свой проект и, по возможности, прикрепите файл с ТЗ", - }, - { - id: 4, - type: "file", - name: "file", - icon: fileUpload, - }, - { - id: 5, - type: "submit", - } -]; - -function ContactForm({ fields = mock }) { +function ContactForm() { return (

Свяжитесь с нами!

- {fields.map(item => +
- )} + +
+ +
+ + +
); diff --git a/src/components/ContactForm/ContactForm.styles.scss b/src/components/ContactForm/ContactForm.styles.scss index 45304c8..dc349b1 100644 --- a/src/components/ContactForm/ContactForm.styles.scss +++ b/src/components/ContactForm/ContactForm.styles.scss @@ -1,4 +1,6 @@ @import "../../assets/styles/theme.scss"; +$icon-size: 24px; +$color-file-button: rgb(7, 42, 200); .contact-form { padding: 20px 22px; @@ -18,11 +20,32 @@ display: flex; flex-direction: column; gap: 14px; - + + * { + box-sizing: border-box; + } + + .row { + display: flex; + gap: 14px; + } + + .file-input * { + width: fit-content; + color: $color-file-button; + font-weight: 500; + + .icon { + height: $icon-size; + width: $icon-size; + filter: invert(15%) sepia(100%) saturate(2861%) hue-rotate(229deg) brightness(93%) contrast(120%);; + } + } + .submit { width: 100%; cursor: pointer; - + padding: 12px; font-size: 18px; line-height: normal; diff --git a/src/pages/Contact/Contact.jsx b/src/pages/Contact/Contact.jsx index b7e8ec9..91009f5 100755 --- a/src/pages/Contact/Contact.jsx +++ b/src/pages/Contact/Contact.jsx @@ -7,7 +7,7 @@ import "./Contact.styles.scss"; function Contact() { return ( - <> +
@@ -37,7 +37,7 @@ function Contact() { - +
); } diff --git a/src/pages/Contact/Contact.styles.scss b/src/pages/Contact/Contact.styles.scss index 7b9581d..9af2287 100644 --- a/src/pages/Contact/Contact.styles.scss +++ b/src/pages/Contact/Contact.styles.scss @@ -1,21 +1,41 @@ -.top-block { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - flex: 1 1 50%; +#page-contact { + .top-block { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + flex: 1 1 50%; - div:has(> ymaps) { + div:has(> ymaps) { - ymaps[class*="inner-panes"] { - border-radius: 8px; + ymaps[class*="inner-panes"] { + border-radius: 8px; + } + } + + // div:has(> ymaps) + div:has(> ymaps)>* { + width: auto !important; + height: 100% !important; + aspect-ratio: 1; } } -// div:has(> ymaps) - div:has(> ymaps) > * - { - width: auto!important; - height: 100%!important; - aspect-ratio: 1; + .contact-form { + .row { + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; + } + + .row:not(:has(.submit))>* { + flex: 1 1 calc(50% - 7px); + } + + .row:has(.submit)>* { + margin: 0; + flex: 1 1 calc(50% - 7px); + max-width: 35%; + } } } \ No newline at end of file diff --git a/src/pages/Main/components/ContactUs/ContactUs.styles.scss b/src/pages/Main/components/ContactUs/ContactUs.styles.scss index 9b38d60..61080e5 100644 --- a/src/pages/Main/components/ContactUs/ContactUs.styles.scss +++ b/src/pages/Main/components/ContactUs/ContactUs.styles.scss @@ -1,14 +1,19 @@ #contact-us { display: flex; + flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 60px; .half { - flex: 0 0 50%; + flex: 1 1 50%; } .contact-form { - max-width: 500px; + flex: 1 1 35%; + + .row { + flex-direction: column; + } } } \ No newline at end of file