Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#47): add map preview #54

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/accueil/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Image from 'next/image';
import Link from 'next/link';

import {Slider} from '../../src/components/blocs/slider/Slider';
import {MapPreview} from '../../src/components/map/MapPreview';
import {Navbar} from '../../src/components/navbar/Navbar';
import {Onboarding} from '../../src/components/onboarding/Onboarding';
import {Profile} from '../../src/components/profile/Profile';
Expand Down Expand Up @@ -64,6 +65,7 @@ export default function Home() {
link="/accueil#"
/>
<Slider title="ActualitΓ©s" items={tempData} link="/accueil#" />
<MapPreview />
</div>
</div>
</>
Expand Down
5 changes: 5 additions & 0 deletions public/icons/map/filter/map_appareil_photo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/icons/map/filter/map_cle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/icons/map/filter/map_coeur.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/icons/map/filter/map_localisation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/icons/map/filter/map_point_interrogation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/icons/map/filter/map_restaurant.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/icons/map/filter/map_supermarche.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions public/illustrations/map.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions src/components/map/MapPreview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import Image from 'next/image';
import Link from 'next/link';

import styles from './mapPreview.module.css';

const filtersImageUrls = [
'/icons/map/filter/map_restaurant.svg',
'/icons/map/filter/map_cle.svg',
'/icons/map/filter/map_coeur.svg',
'/icons/map/filter/map_point_interrogation.svg',
'/icons/map/filter/map_localisation.svg',
'/icons/map/filter/map_appareil_photo.svg',
'/icons/map/filter/map_supermarche.svg',
];

export const MapPreview = () => {
return (
<div className={styles.previewContainer}>
<h4>Se repΓ©rer au Japon</h4>

<div className={styles.mapContainer}>
<Link href="#">
<Image
src="/illustrations/map.svg"
width={315}
height={200}
alt="Carte"
/>
</Link>
<div className={styles.filters}>
{filtersImageUrls.map((url, id) => (
<Image
key={id}
className={styles.filter}
src={url}
alt="filtre"
width={25}
height={25}
/>
))}
</div>
</div>
</div>
);
};
37 changes: 37 additions & 0 deletions src/components/map/mapPreview.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.previewContainer {
text-align: center;

h4 {
font-size: 16px;
margin-bottom: 20px;
}

.mapContainer,
a {
display: block;
position: relative;
width: max-content;
height: max-content;

.filters {
position: absolute;
width: max-content;
height: max-content;
bottom: 0;
left: 50%;
transform: translate(-50%, 50%);
display: flex;
justify-content: space-between;
gap: 15px;
flex-wrap: nowrap;
padding: 15px 10px;
border-radius: 15px;
background: white;
box-shadow: 0 8px 28px 0 rgba(20, 20, 43, 0.1);
Boyadjie marked this conversation as resolved.
Show resolved Hide resolved

.filter:hover {
cursor: pointer;
}
}
}
}
Loading