From fea9fcd064ceb0e08bc73c8643c23d80e5f59c12 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:24:57 +0300 Subject: [PATCH 01/18] refactor!: reorganize project structure for better modularity --- index.html | 10 +- package.json | 4 +- precompiled-templates.js | 702 +++++++ manifest.json => public/manifest.json | 4 +- run.sh | 3 - .../components}/AdCard/AdCard.hbs | 0 .../components}/AdCard/AdCard.scss | 0 .../components}/AdCard/AdCard.ts | 0 .../components}/AuthPopup/AuthPopup.hbs | 0 .../components}/AuthPopup/AuthPopup.scss | 0 .../components}/AuthPopup/AuthPopup.ts | 0 .../components}/Filter/Filter.hbs | 0 .../components}/Filter/Filter.scss | 2 +- .../components}/Filter/Filter.ts | 0 .../components}/Header/Header.scss | 0 .../components}/Header/Header.ts | 0 .../HorizontalAdCard/HorizontalAdCard.hbs | 0 .../HorizontalAdCard/HorizontalAdCard.ts | 0 .../components}/MainPhoto/MainPhoto.scss | 0 .../components}/MainPhoto/MainPhoto.ts | 0 .../components}/PopupAlert/PopupAlert.hbs | 0 .../components}/PopupAlert/PopupAlert.scss | 0 .../components}/PopupAlert/PopupAlert.ts | 0 .../components}/ProfileData/EditForm.hbs | 0 .../ProfileData/NoReviews/NoReviews.hbs | 0 .../ProfileData/NoReviews/NoReviews.sass | 2 +- .../ProfileData/NoReviews/NoReviews.ts | 0 .../components}/ProfileData/ProfileData.sass | 0 .../components}/ProfileData/ProfileData.ts | 0 .../components}/ProfileData/RatingForm.hbs | 0 .../components}/ProfileData/RatingForm.sass | 2 +- .../components}/ProfileInfo/ProfileInfo.hbs | 0 .../components}/ProfileInfo/ProfileInfo.scss | 2 +- .../components}/ProfileInfo/ProfileInfo.ts | 0 .../components}/ProfilePopup/ProfilePopup.hbs | 0 .../ProfilePopup/ProfilePopup.scss | 0 .../components}/ProfilePopup/ProfilePopup.ts | 0 .../ReactiveComponent/ReactiveComponent.ts | 0 .../components}/ReviewCard/ReviewCard.hbs | 0 .../components}/ReviewCard/ReviewCard.sass | 0 .../components}/ReviewCard/ReviewCard.ts | 0 .../ReviewsGraphic/ReviewsGraphic.hbs | 0 .../ReviewsGraphic/ReviewsGraphic.sass | 0 .../ReviewsGraphic/ReviewsGraphic.ts | 0 .../components}/SearchPopup/SearchPopup.hbs | 0 .../components}/SearchPopup/SearchPopup.sass | 0 .../components}/SearchPopup/SearchPopup.ts | 0 .../components}/ShortAdCard/ShortAdCard.hbs | 0 .../components}/ShortAdCard/ShortAdCard.sass | 2 +- .../components}/ShortAdCard/ShortAdCard.ts | 0 .../components}/Spinner/Spinner.scss | 0 .../components}/Spinner/Spinner.ts | 0 src/components/precompiled-templates.js | 702 +++++++ .../include}/handlebars.runtime.js | 1726 ++++++++--------- index.ts => src/index.ts | 14 +- {modules => src/modules}/Ajax.ts | 0 {modules => src/modules}/ApiClient.ts | 0 {modules => src/modules}/Clear.ts | 0 {modules => src/modules}/Router.ts | 0 {modules => src/modules}/Types.ts | 0 {modules => src/modules}/Utils.ts | 0 .../pages}/AdListPage/AdListPage.hbs | 0 .../pages}/AdListPage/AdListPage.sass | 2 +- .../pages}/AdListPage/AdListPage.ts | 4 +- {components => src/pages}/AdPage/AdPage.hbs | 0 {components => src/pages}/AdPage/AdPage.scss | 2 +- {components => src/pages}/AdPage/AdPage.ts | 2 +- .../pages}/CityPage/CityPage.sass | 0 .../pages}/CityPage/CityPage.ts | 4 +- .../pages}/CityPage/CityPhoto.hbs | 0 .../pages}/EditAdvertPage/EditAdvertPage.hbs | 0 .../pages}/EditAdvertPage/EditAdvertPage.scss | 2 +- .../pages}/EditAdvertPage/EditAdvertPage.ts | 2 +- .../pages}/EditAdvertPage/SecondaryImage.hbs | 0 .../pages}/MainPage/MainPage.scss | 0 .../pages}/MainPage/MainPage.ts | 6 +- .../pages}/MapPage/MapPage.sass | 0 {components => src/pages}/MapPage/MapPage.ts | 71 +- .../pages}/ProfilePage/ProfilePage.scss | 0 .../pages}/ProfilePage/ProfilePage.ts | 25 +- mixins.scss => src/styles/mixins.scss | 0 src/styles/styles.sass | 57 + sw.js => src/sw.js | 0 .../vite-plugins/hbs-recompile.js | 4 +- style.sass | 54 - vite.config.ts | 2 +- 86 files changed, 2421 insertions(+), 991 deletions(-) create mode 100644 precompiled-templates.js rename manifest.json => public/manifest.json (93%) delete mode 100644 run.sh rename {components => src/components}/AdCard/AdCard.hbs (100%) rename {components => src/components}/AdCard/AdCard.scss (100%) rename {components => src/components}/AdCard/AdCard.ts (100%) rename {components => src/components}/AuthPopup/AuthPopup.hbs (100%) rename {components => src/components}/AuthPopup/AuthPopup.scss (100%) rename {components => src/components}/AuthPopup/AuthPopup.ts (100%) rename {components => src/components}/Filter/Filter.hbs (100%) rename {components => src/components}/Filter/Filter.scss (98%) rename {components => src/components}/Filter/Filter.ts (100%) rename {components => src/components}/Header/Header.scss (100%) rename {components => src/components}/Header/Header.ts (100%) rename {components => src/components}/HorizontalAdCard/HorizontalAdCard.hbs (100%) rename {components => src/components}/HorizontalAdCard/HorizontalAdCard.ts (100%) rename {components => src/components}/MainPhoto/MainPhoto.scss (100%) rename {components => src/components}/MainPhoto/MainPhoto.ts (100%) rename {components => src/components}/PopupAlert/PopupAlert.hbs (100%) rename {components => src/components}/PopupAlert/PopupAlert.scss (100%) rename {components => src/components}/PopupAlert/PopupAlert.ts (100%) rename {components => src/components}/ProfileData/EditForm.hbs (100%) rename {components => src/components}/ProfileData/NoReviews/NoReviews.hbs (100%) rename {components => src/components}/ProfileData/NoReviews/NoReviews.sass (94%) rename {components => src/components}/ProfileData/NoReviews/NoReviews.ts (100%) rename {components => src/components}/ProfileData/ProfileData.sass (100%) rename {components => src/components}/ProfileData/ProfileData.ts (100%) rename {components => src/components}/ProfileData/RatingForm.hbs (100%) rename {components => src/components}/ProfileData/RatingForm.sass (99%) rename {components => src/components}/ProfileInfo/ProfileInfo.hbs (100%) rename {components => src/components}/ProfileInfo/ProfileInfo.scss (99%) rename {components => src/components}/ProfileInfo/ProfileInfo.ts (100%) rename {components => src/components}/ProfilePopup/ProfilePopup.hbs (100%) rename {components => src/components}/ProfilePopup/ProfilePopup.scss (100%) rename {components => src/components}/ProfilePopup/ProfilePopup.ts (100%) rename {components => src/components}/ReactiveComponent/ReactiveComponent.ts (100%) rename {components => src/components}/ReviewCard/ReviewCard.hbs (100%) rename {components => src/components}/ReviewCard/ReviewCard.sass (100%) rename {components => src/components}/ReviewCard/ReviewCard.ts (100%) rename {components => src/components}/ReviewsGraphic/ReviewsGraphic.hbs (100%) rename {components => src/components}/ReviewsGraphic/ReviewsGraphic.sass (100%) rename {components => src/components}/ReviewsGraphic/ReviewsGraphic.ts (100%) rename {components => src/components}/SearchPopup/SearchPopup.hbs (100%) rename {components => src/components}/SearchPopup/SearchPopup.sass (100%) rename {components => src/components}/SearchPopup/SearchPopup.ts (100%) rename {components => src/components}/ShortAdCard/ShortAdCard.hbs (100%) rename {components => src/components}/ShortAdCard/ShortAdCard.sass (98%) rename {components => src/components}/ShortAdCard/ShortAdCard.ts (100%) rename {components => src/components}/Spinner/Spinner.scss (100%) rename {components => src/components}/Spinner/Spinner.ts (100%) create mode 100644 src/components/precompiled-templates.js rename {include => src/include}/handlebars.runtime.js (57%) rename index.ts => src/index.ts (89%) rename {modules => src/modules}/Ajax.ts (100%) rename {modules => src/modules}/ApiClient.ts (100%) rename {modules => src/modules}/Clear.ts (100%) rename {modules => src/modules}/Router.ts (100%) rename {modules => src/modules}/Types.ts (100%) rename {modules => src/modules}/Utils.ts (100%) rename {components => src/pages}/AdListPage/AdListPage.hbs (100%) rename {components => src/pages}/AdListPage/AdListPage.sass (94%) rename {components => src/pages}/AdListPage/AdListPage.ts (89%) rename {components => src/pages}/AdPage/AdPage.hbs (100%) rename {components => src/pages}/AdPage/AdPage.scss (95%) rename {components => src/pages}/AdPage/AdPage.ts (94%) rename {components => src/pages}/CityPage/CityPage.sass (100%) rename {components => src/pages}/CityPage/CityPage.ts (97%) rename {components => src/pages}/CityPage/CityPhoto.hbs (100%) rename {components => src/pages}/EditAdvertPage/EditAdvertPage.hbs (100%) rename {components => src/pages}/EditAdvertPage/EditAdvertPage.scss (94%) rename {components => src/pages}/EditAdvertPage/EditAdvertPage.ts (96%) rename {components => src/pages}/EditAdvertPage/SecondaryImage.hbs (100%) rename {components => src/pages}/MainPage/MainPage.scss (100%) rename {components => src/pages}/MainPage/MainPage.ts (91%) rename {components => src/pages}/MapPage/MapPage.sass (100%) rename {components => src/pages}/MapPage/MapPage.ts (66%) rename {components => src/pages}/ProfilePage/ProfilePage.scss (100%) rename {components => src/pages}/ProfilePage/ProfilePage.ts (89%) rename mixins.scss => src/styles/mixins.scss (100%) create mode 100644 src/styles/styles.sass rename sw.js => src/sw.js (100%) rename hbs-recompile.js => src/vite-plugins/hbs-recompile.js (92%) delete mode 100644 style.sass diff --git a/index.html b/index.html index a84e46e5..25931938 100644 --- a/index.html +++ b/index.html @@ -4,13 +4,15 @@