diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index c2421de0..44e7838f 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -3,8 +3,6 @@ name: Lint
on:
push:
branches: ['*']
- pull_request:
- branches: ['*']
jobs:
run-linters:
diff --git a/.github/workflows/nodejs-build.yml b/.github/workflows/nodejs-build.yml
index 4335e7e3..741a00e6 100644
--- a/.github/workflows/nodejs-build.yml
+++ b/.github/workflows/nodejs-build.yml
@@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
- node-version: [20.x, 22.x]
+ node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
diff --git a/.gitignore b/.gitignore
index 05216bec..39227882 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
node_modules/
.idea/
-/components/precompiled-templates.js
+precompiled-templates.js
/images/
/nginx/ssl/
\ No newline at end of file
diff --git a/components/AdCard/AdCard.hbs b/components/AdCard/AdCard.hbs
deleted file mode 100644
index 1233ea0f..00000000
--- a/components/AdCard/AdCard.hbs
+++ /dev/null
@@ -1,106 +0,0 @@
-
- {{#if isHost}}
-
-
Список объявлений
-
-
-
- {{#if empty}}
-
Здесь пока пусто... 🕳️
- {{/if}}
-
- {{else}}
-
🚫Вы не являетесь хостом,
- поэтому не можете создавать объявления.
-
Если вы хотите стать хостом,
- пожалуйста, измените свой статус в настройках
- {{/if}}
-
\ No newline at end of file
diff --git a/components/AdListPage/AdListPage.sass b/components/AdListPage/AdListPage.sass
deleted file mode 100644
index 3ca93e08..00000000
--- a/components/AdListPage/AdListPage.sass
+++ /dev/null
@@ -1,129 +0,0 @@
-@use '../../mixins'
-
-.ad-list-page
- margin-top: 40px
- width: 80%
- margin: 0 auto
-
- &__title
- font-weight: 500
-
- &__upper-container
- display: flex
- justify-content: space-between
- align-items: end
- margin: 20px 0
- &__add-button
- @include mixins.button
- background-color: #FF5255
-
- &__adverts-container
- display: flex
- flex-direction: column
- gap: 10px
-
- &__no-adverts-text
- margin-top: 50px
- text-align: center
- font-size: 26px
-
- &__not-host-message
- margin-top: 90px
- font-size: 40px
- text-align: center
-
-
-.horizontal-ad-card
- border: 1px solid black
- border-radius: 10px
- display: flex
- flex-direction: row
- gap: 40px
- padding: 15px
- transition: 0.3s all
-
- &:hover
- background-color: #cecece
- border: 1px solid #4b4b4b
-
- &__img
- width: 250px
- border-radius: 10px
-
- &__info
- display: flex
- width: 100%
- flex-direction: column
- justify-content: space-between
- position: relative
-
- &__notification-bell
- position: absolute
- width: 32px
- top: 0px
- right: 0px
- cursor: pointer
-
- &__city
- font-size: 32px
-
- &__address
- font-size: 20px
-
- &__buttons-container
- display: flex
- gap: 30px
-
- &__open-btn
- @include mixins.button
- width: 200px
- height: 38px
- background-color: #5289FF
-
- &__edit-btn
- @include mixins.button
- height: 38px
-
- &__del-btn
- @include mixins.button
- background-color: #FF5900
- height: 38px
-
-
-@media screen and (max-width: 900px)
- $button-height: 20px
- .ad-list-page
- &__upper-container
- display: flex
- text-align: center
- flex-direction: column
- justify-content: center
- align-items: center
-
- .horizontal-ad-card
- border: 1px solid black
- border-radius: 10px
- width: 100%
- display: flex
- flex-direction: column
- gap: 40px
- padding: 10px
- transition: 0.3s all
-
- &__buttons-container
- flex-wrap: wrap
-
- &__open-btn
- @include mixins.button
- width: fit-content
- height: $button-height
- background-color: #5289FF
-
- &__edit-btn
- @include mixins.button
- height: $button-height
-
- &__del-btn
- @include mixins.button
- background-color: #FF5900
- height: $button-height
\ No newline at end of file
diff --git a/components/AdListPage/AdListPage.ts b/components/AdListPage/AdListPage.ts
deleted file mode 100644
index 974af73b..00000000
--- a/components/AdListPage/AdListPage.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict';
-
-import ApiClient from '../../modules/ApiClient';
-import router from '../../modules/Router';
-import HorizontalAdCard from '../HorizontalAdCard/HorizontalAdCard';
-
-import { HorizontalAdCardData } from '../HorizontalAdCard/HorizontalAdCard';
-
-function AdListPage(data: HorizontalAdCardData[], isHost: boolean) {
- const pageContainer = document.createElement('div');
-
- const template = Handlebars.templates['AdListPage.hbs'];
-
- pageContainer.innerHTML = template({
- ...data,
- empty: data.length === 0,
- isHost: isHost,
- });
- if (!isHost) {
- return pageContainer;
- }
-
- const advertListElement = pageContainer.querySelector('.js-advert-list');
- const createAdvertElement = pageContainer.querySelector(
- '.js-add-btn'
- ) as HTMLButtonElement;
- createAdvertElement.onclick = () =>
- router.navigateTo('/ads/?action=create');
-
- for (const d of data) {
- const card = HorizontalAdCard(
- {
- id: d.id,
- cityName: d.cityName,
- address: d.address,
- image: d.image,
- },
- {
- onOpen: (uuid: string) => router.navigateTo(`/ads/?id=${uuid}`),
- onEdit: (uuid: string) =>
- router.navigateTo(`/ads/?id=${uuid}&action=edit`),
- onDel: async (uuid: string) => {
- await ApiClient.deleteAd(uuid);
- router.navigateTo(location.href);
- },
- }
- );
- advertListElement?.appendChild(card);
- }
-
- return pageContainer;
-}
-
-export default AdListPage;
diff --git a/components/EditAdvertPage/EditAdvertPage.hbs b/components/EditAdvertPage/EditAdvertPage.hbs
deleted file mode 100644
index af839684..00000000
--- a/components/EditAdvertPage/EditAdvertPage.hbs
+++ /dev/null
@@ -1,91 +0,0 @@
-