-
Notifications
You must be signed in to change notification settings - Fork 1
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
Keks
committed
Sep 19, 2024
0 parents
commit fe96c82
Showing
127 changed files
with
8,429 additions
and
0 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,23 @@ | ||
# Файл с настройками для редактора. | ||
# | ||
# Если вы разрабатываете в редакторе от JetBrains, BBEdit, Coda или SourceLair | ||
# этот файл уже поддерживается и не нужно производить никаких дополнительных | ||
# действий. | ||
# | ||
# Если вы ведёте разработку в другом редакторе, зайдите | ||
# на http://editorconfig.org и в разделе «Download a Plugin» | ||
# скачайте дополнение для вашего редактора. | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
quote_type = single | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,24 @@ | ||
/* eslint-env node */ | ||
|
||
module.exports = { | ||
env: { browser: true, es2022: true }, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react-hooks/recommended', | ||
"htmlacademy/react-typescript", | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { ecmaVersion: 'latest', sourceType: 'module', project: 'tsconfig.json' }, | ||
settings: { react: { version: 'detect' } }, | ||
plugins: ['react-refresh'], | ||
rules: { | ||
'react-refresh/only-export-components': 'warn', | ||
}, | ||
overrides: [ | ||
{ | ||
files: [ '*test*' ], | ||
rules: { '@typescript-eslint/unbound-method': 'off' } | ||
}, | ||
], | ||
} |
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,9 @@ | ||
* text eol=lf | ||
|
||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.webp binary | ||
*.woff binary | ||
*.woff2 binary | ||
*.ttf binary |
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,33 @@ | ||
name: Build | ||
|
||
on: | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
|
||
- name: Build | ||
run: | | ||
NODE_ENV=development npm install && npm run build --if-present | ||
if [[ $(find . -maxdepth 1 -type d -name 'dist') == '' ]] | ||
then | ||
cp -r public dist | ||
fi | ||
mkdir actions_artifacts | ||
echo "prev.event.number=${{ github.event.number }}" > actions_artifacts/env | ||
mv dist actions_artifacts | ||
- name: Save build | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: actions_artifacts | ||
path: actions_artifacts |
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,26 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: '*' | ||
|
||
name: Project check | ||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- uses: actions/checkout@master | ||
name: Checkout | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run checks | ||
run: npm test && npm run lint |
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,44 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- Build | ||
types: | ||
- completed | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
if: github.event.workflow_run.conclusion == 'success' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Download build | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
name: actions_artifacts | ||
workflow: ${{ github.event.workflow_run.workflow_id }} | ||
|
||
- name: Get PR number | ||
run: | | ||
echo "PR=$(cat env | grep "prev.event.number" | awk -F '=' '{print $2}')" >> $GITHUB_ENV | ||
echo "BUILD_URL=$(echo ${{ github.repository }} | sed -r 's/\//\.github\.io\//g')" >> $GITHUB_ENV | ||
- name: Deploy build to Github Pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: dist | ||
clean: true | ||
git-config-name: "keksobot" | ||
git-config-email: "[email protected]" | ||
target-folder: ${{ env.PR }} | ||
commit-message: "✔️ Сборка #${{ env.PR }}" | ||
|
||
- name: Comment PR | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
message: | | ||
Ваш пулреквест опубликован. Посмотреть можно [здесь](https://${{ env.BUILD_URL }}/${{ env.PR }}/) | ||
pr_number: ${{ env.PR }} |
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,26 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/dist | ||
# misc | ||
Thumbs.db | ||
.DS_Store | ||
.env | ||
*.log* | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# editors | ||
.idea | ||
*.sublime* | ||
.vscode |
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,42 @@ | ||
# Руководство по внесению изменений | ||
|
||
Поддерживайте ваш репозиторий обновлённым. Когда наставник принимает ваш пулреквест, он попадает в репозиторий Академии, но не в ваш форк. | ||
|
||
#### 1. Не коммитьте ничего самостоятельно в `master` вашего репозитория | ||
|
||
Это помешает вам аккуратно обновлять ваш репозиторий, могут возникнуть конфликты. | ||
|
||
#### 2. Прежде чем приступать к новому заданию, обновите `master` | ||
|
||
Обновить свой репозиторий из репозитория Академии можно так: | ||
|
||
``` | ||
# В вашей локальной копии переключитесь в ветку master | ||
git checkout master | ||
# Заберите изменения из репозитория Академии¹ | ||
git pull academy master | ||
# Отправьте изменения в ваш форк на Гитхабе | ||
git push | ||
``` | ||
|
||
¹ В `academy` должна быть ссылка на репозиторий Академии. Если его там нет, добавьте: | ||
|
||
``` | ||
git remote add academy [email protected]:htmlacademy-univer-javascript-3/1522331-six-cities-5.git | ||
``` | ||
|
||
Когда вы обновили `master`, создайте ветку для нового задания: | ||
|
||
``` | ||
git checkout -b module2-task1 | ||
``` | ||
|
||
`module2-task1` — это название ветки. Под описанием каждого задания в интерфейсе интенсива для вас будет указано правильное название ветки. | ||
|
||
-- | ||
|
||
#### Есть вопрос? | ||
|
||
Посмотрите [коллекцию часто задаваемых вопросов по Git](http://firstaidgit.ru). |
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,49 @@ | ||
# Личный проект «Шесть городов» | ||
|
||
* Студент: [Максим Гуриков](https://up.htmlacademy.ru/univer-js3/5/user/1522331). | ||
* Наставник: `Неизвестно`. | ||
|
||
--- | ||
|
||
_Не удаляйте и не изменяйте папки и файлы:_ | ||
_`.editorconfig`, `.gitattributes`, `.gitignore`._ | ||
|
||
--- | ||
|
||
### Памятка | ||
|
||
#### 1. Зарегистрируйтесь на Гитхабе | ||
|
||
Если у вас ещё нет аккаунта на [github.com](https://github.com/join), скорее зарегистрируйтесь. | ||
|
||
#### 2. Создайте форк | ||
|
||
Откройте репозиторий и нажмите кнопку «Fork» в правом верхнем углу. Репозиторий из Академии будет скопирован в ваш аккаунт. | ||
|
||
<img width="769" alt="Press 'Fork'" src="https://cloud.githubusercontent.com/assets/259739/20264045/a1ddbf40-aa7a-11e6-9a1a-724a1c0123c8.png"> | ||
|
||
Получится вот так: | ||
|
||
<img width="769" alt="Forked" src="https://cloud.githubusercontent.com/assets/259739/20264122/f63219a6-aa7a-11e6-945a-89818fc7c014.png"> | ||
|
||
#### 3. Клонируйте репозиторий на свой компьютер | ||
|
||
Будьте внимательны: нужно клонировать свой репозиторий (форк), а не репозиторий Академии. Также обратите внимание, что клонировать репозиторий нужно через SSH, а не через HTTPS. Нажмите зелёную кнопку в правой части экрана, чтобы скопировать SSH-адрес вашего репозитория: | ||
|
||
<img width="769" alt="SSH" src="https://cloud.githubusercontent.com/assets/259739/20264180/42704126-aa7b-11e6-9ab4-73372b812a53.png"> | ||
|
||
Клонировать репозиторий можно так: | ||
|
||
``` | ||
git clone SSH-адрес_вашего_форка | ||
``` | ||
|
||
Команда клонирует репозиторий на ваш компьютер и подготовит всё необходимое для старта работы. | ||
|
||
#### 4. Начинайте обучение! | ||
|
||
--- | ||
|
||
<a href="https://htmlacademy.ru/intensive/react"><img align="left" width="50" height="50" title="HTML Academy" src="https://up.htmlacademy.ru/static/img/intensive/react/logo-for-github.png"></a> | ||
|
||
Репозиторий создан для обучения на профессиональном онлайн‑курсе «[React. Разработка сложных клиентских приложений](https://htmlacademy.ru/intensive/react)» от [HTML Academy](https://htmlacademy.ru). |
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,30 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<base href="/"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>6 cities</title> | ||
<link rel="stylesheet" href="css/main.css"> | ||
</head> | ||
|
||
<body> | ||
<div style="display: none"> | ||
<svg xmlns="http://www.w3.org/2000/svg"> | ||
<symbol id="icon-arrow-select" viewbox="0 0 7 4"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 0l3.5 2.813L7 0v1.084L3.5 4 0 1.084V0z"></path> | ||
</symbol> | ||
<symbol id="icon-bookmark" viewbox="0 0 17 18"> | ||
<path d="M3.993 2.185l.017-.092V2c0-.554.449-1 .99-1h10c.522 0 .957.41.997.923l-2.736 14.59-4.814-2.407-.39-.195-.408.153L1.31 16.44 3.993 2.185z"></path> | ||
</symbol> | ||
<symbol id="icon-star" viewbox="0 0 13 12"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 9.644L10.517 12 9.451 7.56 13 4.573l-4.674-.386L6.5 0 4.673 4.187 0 4.573 3.549 7.56 2.483 12 6.5 9.644z"></path> | ||
</symbol> | ||
</svg> | ||
</div> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.tsx"></script> | ||
</body> | ||
</html> |
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,10 @@ | ||
# Директория с вёрсткой (markup) | ||
|
||
* `index.html` - контейнер; | ||
* `login.html` - страница «Login» (Авторизация); | ||
* `main.html` - страница «Main» (Главная страница со списком предложений): | ||
* `main-empty.html` - без списка предложений; | ||
* `offer.html` — страница «Offer» (Карточка предложения по аренде, пользователь авторизован): | ||
* `offer-not-logged.html` - пользователь не авторизован; | ||
* `favorites.html` - страница «Favorites» (Избранное): | ||
* `favorites-empty.html` - пустая страница. |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,68 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>6 cities: favorites empty</title> | ||
<link rel="stylesheet" href="css/main.css"> | ||
</head> | ||
|
||
<body> | ||
<div style="display: none"> | ||
<!-- | ||
Нет необходимости копировать данный блок в компоненты. Блок с `svg`-изображениями | ||
присутствует в разметке файла `index.html`. | ||
--> | ||
<svg xmlns="http://www.w3.org/2000/svg"><symbol id="icon-arrow-select" viewbox="0 0 7 4"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 0l3.5 2.813L7 0v1.084L3.5 4 0 1.084V0z"></path></symbol><symbol id="icon-bookmark" viewbox="0 0 17 18"><path d="M3.993 2.185l.017-.092V2c0-.554.449-1 .99-1h10c.522 0 .957.41.997.923l-2.736 14.59-4.814-2.407-.39-.195-.408.153L1.31 16.44 3.993 2.185z"></path></symbol><symbol id="icon-star" viewbox="0 0 13 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 9.644L10.517 12 9.451 7.56 13 4.573l-4.674-.386L6.5 0 4.673 4.187 0 4.573 3.549 7.56 2.483 12 6.5 9.644z"></path></symbol></svg> | ||
</div> | ||
|
||
<div class="page page--favorites-empty"> | ||
<header class="header"> | ||
<div class="container"> | ||
<div class="header__wrapper"> | ||
<div class="header__left"> | ||
<a class="header__logo-link" href="main.html"> | ||
<img class="header__logo" src="img/logo.svg" alt="6 cities logo" width="81" height="41"> | ||
</a> | ||
</div> | ||
<nav class="header__nav"> | ||
<ul class="header__nav-list"> | ||
<li class="header__nav-item user"> | ||
<a class="header__nav-link header__nav-link--profile" href="#"> | ||
<div class="header__avatar-wrapper user__avatar-wrapper"> | ||
</div> | ||
<span class="header__user-name user__name">[email protected]</span> | ||
<span class="header__favorite-count">0</span> | ||
</a> | ||
</li> | ||
<li class="header__nav-item"> | ||
<a class="header__nav-link" href="#"> | ||
<span class="header__signout">Sign out</span> | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</div> | ||
</div> | ||
</header> | ||
|
||
<main class="page__main page__main--favorites page__main--favorites-empty"> | ||
<div class="page__favorites-container container"> | ||
<section class="favorites favorites--empty"> | ||
<h1 class="visually-hidden">Favorites (empty)</h1> | ||
<div class="favorites__status-wrapper"> | ||
<b class="favorites__status">Nothing yet saved.</b> | ||
<p class="favorites__status-description">Save properties to narrow down search or plan your future trips.</p> | ||
</div> | ||
</section> | ||
</div> | ||
</main> | ||
<footer class="footer"> | ||
<a class="footer__logo-link" href="main.html"> | ||
<img class="footer__logo" src="img/logo.svg" alt="6 cities logo" width="64" height="33"> | ||
</a> | ||
</footer> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.