mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 06:09:45 +00:00
Merge pull request #18 from ifraimka1/feature/page/contact
Feature/page/contact
This commit is contained in:
7 files changed
+155
-56
No files matched your search
Generated
+20
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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 (
|
||||
<Form method="post" className="half contact-form">
|
||||
<h2>Свяжитесь с нами!</h2>
|
||||
<div className="inputs">
|
||||
{fields.map(item =>
|
||||
<div className="row">
|
||||
<Field
|
||||
key={item.id}
|
||||
type={item.type}
|
||||
name={item.name}
|
||||
placeholder={item.placeholder}
|
||||
icon={item.icon}
|
||||
key={1}
|
||||
type="text"
|
||||
name="name"
|
||||
placeholder="Имя"
|
||||
/>
|
||||
)}
|
||||
<Field
|
||||
key={2}
|
||||
type="email"
|
||||
name="email"
|
||||
placeholder="E-mail"
|
||||
/>
|
||||
</div>
|
||||
<Field
|
||||
key={3}
|
||||
type="textarea"
|
||||
name="text"
|
||||
placeholder="Опишите в этом поле свой проект и, по возможности, прикрепите файл с ТЗ"
|
||||
/>
|
||||
<div className="row">
|
||||
<Field
|
||||
key={4}
|
||||
type="file"
|
||||
name="file"
|
||||
icon={fileUpload}
|
||||
/>
|
||||
<Field
|
||||
key={5}
|
||||
type="submit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
@import "../../assets/styles/theme.scss";
|
||||
$icon-size: 24px;
|
||||
$color-file-button: rgb(7, 42, 200);
|
||||
|
||||
.contact-form {
|
||||
padding: 20px 22px;
|
||||
@@ -19,6 +21,27 @@
|
||||
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;
|
||||
|
||||
@@ -1,26 +1,43 @@
|
||||
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 (
|
||||
<>
|
||||
<div id="page-contact">
|
||||
<PageHeader>
|
||||
<h1>Студенческое конструкторское бюро<br />
|
||||
"Компьютерное инновационное творчество"</h1>
|
||||
<div className="top-block">
|
||||
<div>
|
||||
<h1>Контакты</h1>
|
||||
<div className="contact">
|
||||
<p>Контактное лицо:<br />
|
||||
Кутковой Владимир Сергеевич<br />
|
||||
Руководитель СКБ «КИТ»<br />
|
||||
Email: skb@sfedu.ru<br />
|
||||
Адрес: г. Таганрог, пер. Тургеневский, 44, ауд. 208</p>
|
||||
</div>
|
||||
</div>
|
||||
<YMaps>
|
||||
<Map
|
||||
defaultState={{
|
||||
center: [47.206690, 38.929113],
|
||||
zoom: 13,
|
||||
controls: ["zoomControl", "fullscreenControl"],
|
||||
}}
|
||||
modules={["control.ZoomControl", "control.FullscreenControl"]}
|
||||
>
|
||||
<Placemark defaultGeometry={[47.206690, 38.929113]} />
|
||||
</Map>
|
||||
</YMaps>
|
||||
</div>
|
||||
</PageHeader>
|
||||
<PageContent>
|
||||
<div className="contact">
|
||||
<p>Контактное лицо: Кутковой Владимир Сергеевич</p>
|
||||
</div>
|
||||
<form className="form">
|
||||
<label htmlFor="topic-input">Тема</label>
|
||||
<input type="text" name="topic" id="topic-input" />
|
||||
<label htmlFor="email">Почта</label>
|
||||
<input type="text" name="email-input" id="email-input" />
|
||||
<label htmlFor="message">Сообщение</label>
|
||||
<input type="text" name="message-input" id="message-input" />
|
||||
</form>
|
||||
<ContactForm />
|
||||
</PageContent>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
#page-contact {
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.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%;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user