Skip to content

Commit

Permalink
Fix modal search images, other small edits
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoibaev committed Dec 15, 2024
1 parent 8cc67bd commit 3861c67
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 5 deletions.
Binary file removed public/assets/images/background-image.jpg
Binary file not shown.
Binary file added public/assets/images/background-image.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion public/components/GridMoviesList/GridMoviesList.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{#each items}}
<div id='grid-find-id-{{this.id}}' class='grid-list__container_item'>
<img
src='{{this.albumImage}}'
src='{{this.verticalImage}}'
alt='{{title}}'
class='grid-list__container_item_image'
/>
Expand Down
1 change: 1 addition & 0 deletions public/components/GridMoviesList/GridMoviesList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
transition: transform 0.15s ease;

&:hover {
cursor: pointer;
transform: scale(1.02);
}

Expand Down
8 changes: 7 additions & 1 deletion public/components/GridMoviesList/GridMoviesList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ export class GridMoviesList {
const gridContainer = document.getElementById(
'create-room-modal-find-list',
) as HTMLElement;
const updatedItems = items.map((item) => {
return {
...item,
verticalImage: item.albumImage.replace('poster', 'album'),
};
});
gridContainer.innerHTML = template({
items,
items: updatedItems,
isEmpty,
});
this.handleItemClick();
Expand Down
2 changes: 1 addition & 1 deletion public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ body {
}

&-image {
background-image: url('./assets/images/background-image.jpg');
background-image: url('./assets/images/background-image.webp');
background-size: cover;
background-position: center;
}
Expand Down
2 changes: 1 addition & 1 deletion public/modules/IsMobileDevice.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DEVICES_LIST } from 'consts';
import { DEVICES_LIST } from '../consts';

export const isMobileDevice = () => {
return window.matchMedia('only screen and (max-width: 750px)').matches;
Expand Down
3 changes: 2 additions & 1 deletion public/modules/Serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const serializeMovie = (movie: any) => {
title: movie.title,
albumImage: HOST + movie.album_url,
cardImage: HOST + movie.card_url,
verticalImage: HOST + movie.ver_url,
country: movie.country,
description: movie.description,
movieType: movie.movie_type,
Expand Down Expand Up @@ -123,7 +124,7 @@ export const serializeUserData = (user: any) => {
birthdate: user.birthdate,
sex: user.sex,
avatar: HOST + user.avatar_url,
isPremium: true,
isPremium: user.subscription_status,
expirationDate: user.subscription_expiration_date,
};
};
Expand Down
1 change: 1 addition & 0 deletions public/types/movie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export type Movie = {
description: string;
cardImage: string;
albumImage: string;
verticalImage?: string;
rating: number;
releaseDate: string;
movieType: string;
Expand Down

0 comments on commit 3861c67

Please sign in to comment.