-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4384b8c
commit 822d487
Showing
31 changed files
with
549 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Deploy static content to Pages | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
workflow_dispatch: | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: I pnpm | ||
run: npm i -g pnpm | ||
- name: Install dependencies | ||
run: pnpm i | ||
- name: Build | ||
run: pnpm run build | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "./dist" | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
@import "./../../styles/_option" | ||
.feedback | ||
background-color: $accent | ||
min-height: 460px | ||
width: 100% | ||
|
||
color: $background | ||
overflow: hidden | ||
|
||
display: inline-block | ||
position: relative | ||
|
||
margin-bottom: -6px | ||
.img | ||
position: absolute | ||
width: 100% | ||
bottom: 0px | ||
img | ||
width: 100% | ||
|
||
.feedback__wrapper | ||
display: flex | ||
justify-content: space-between | ||
padding-bottom: 40px | ||
.feedback__form | ||
position: relative | ||
z-index: 3 | ||
margin-top: 87px | ||
display: grid | ||
row-gap: 10px | ||
width: min(100%, 500px) | ||
button | ||
width: 100% | ||
height: 64px | ||
background-color: $black | ||
border-radius: 5px | ||
transition: transform .4s | ||
&:hover | ||
transform: scale(0.98) | ||
label | ||
width: 100% | ||
input | ||
color: $color | ||
background-color: #F6F6F6 | ||
border-radius: 5px | ||
height: 64px | ||
padding: 20px | ||
width: 100% | ||
.feedback__text | ||
margin-top: 106px | ||
h1 | ||
width: 350px | ||
font: 600 36px $font | ||
p | ||
font: 400 20px $font | ||
@media screen and (width <= 670px) | ||
.feedback__wrapper | ||
display: grid !important | ||
justify-content: center !important | ||
padding: 40px 10px | ||
.feedback__text | ||
text-align: center | ||
margin: 0 !important | ||
h1 | ||
width: 100% !important |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import "./Feedback.sass" | ||
import Form from "./Form/Form" | ||
const Feedback = () => { | ||
return ( | ||
<section className='feedback'> | ||
<div className='container feedback__wrapper'> | ||
<section className='feedback__text'> | ||
<h1>Запишитесь на курс со скидкой 10%</h1> | ||
<p>Акция действительна до 10 марта 2022 года</p> | ||
</section> | ||
<Form /> | ||
</div> | ||
<div className='img'> | ||
<img className='feedback__img' src='/procent.svg' alt='' /> | ||
</div> | ||
</section> | ||
) | ||
} | ||
|
||
export default Feedback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { useForm } from "react-hook-form" | ||
import { IForm } from "../../../types/form.types" | ||
|
||
const Form = () => { | ||
const { | ||
register, | ||
reset, | ||
handleSubmit, | ||
formState: { errors }, | ||
} = useForm<IForm>({ mode: "onChange" }) | ||
|
||
return ( | ||
<form className='feedback__form' onSubmit={handleSubmit(() => reset())}> | ||
<label> | ||
{errors.name && <p>{errors.name.message}</p>} | ||
<input | ||
type='text' | ||
placeholder='Имя' | ||
{...register("name", { required: "Введите имя" })} | ||
/> | ||
</label> | ||
<label> | ||
{errors.phone && <p>{errors.phone.message}</p>} | ||
<input | ||
type='text' | ||
placeholder='Телефон' | ||
{...register("phone", { required: "Введите телефон" })} | ||
/> | ||
</label> | ||
<label> | ||
{errors.email && <p>{errors.email.message}</p>} | ||
<input | ||
type='email' | ||
placeholder='E-mail' | ||
{...register("email", { | ||
pattern: { | ||
message: "Введите валидный E-mail!", | ||
|
||
value: | ||
/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i, | ||
}, | ||
required: "Введите E-mail", | ||
})} | ||
/> | ||
</label> | ||
<button>Оформить заявку</button> | ||
</form> | ||
) | ||
} | ||
|
||
export default Form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.