Updated page style & added drop love button

This commit is contained in:
2024-09-03 19:36:34 +02:00
parent f357cd97fb
commit 8c5423887b
4 changed files with 49 additions and 11 deletions
+3
View File
@@ -11,7 +11,10 @@
} }
body { body {
--navSize: 60px;
position: relative; position: relative;
display: grid;
grid-template-rows: calc(100svh - var(--navSize)) var(--navSize);
width: 100svw; width: 100svw;
height: 100svh; height: 100svh;
background-color: #d94253; background-color: #d94253;
+6
View File
@@ -15,6 +15,7 @@ import { useData } from './hooks/useData';
// ------------------------------------------------- Assets & Styles --------------------------------------------------- // ------------------------------------------------- Assets & Styles ---------------------------------------------------
import './styles.scss'; import './styles.scss';
import 'mapbox-gl/dist/mapbox-gl.css'; import 'mapbox-gl/dist/mapbox-gl.css';
import HeartIcon from '@/assets/HeartIcon';
// --------------------------------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------------------------------
const Home = () => { const Home = () => {
@@ -57,6 +58,11 @@ const Home = () => {
preserveDrawingBuffer preserveDrawingBuffer
></Map> ></Map>
</DeckGL> </DeckGL>
<button className='dropLove'>
<HeartIcon />
Placer un love
</button>
</div> </div>
); );
}; };
+18 -2
View File
@@ -1,7 +1,23 @@
.mapContainer { .mapContainer {
position: relative; position: relative;
width: 100svw;
height: 100svh; & > .dropLove {
z-index: 1;
position: absolute;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
display: grid;
grid-template-columns: 20px 1fr;
gap: 10px;
align-items: center;
padding: 10px 30px;
border: none;
border-radius: 300px;
background-color: #d94253;
color: #ffffff;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
} }
.appMessage { .appMessage {
+22 -9
View File
@@ -1,34 +1,47 @@
.navbar { .navbar {
$navSize: 60px; position: relative;
position: fixed; z-index: 1;
bottom: 0;
left: 0;
display: grid; display: grid;
justify-items: center; justify-items: center;
align-items: center; align-items: center;
width: 100svw; width: 100svw;
height: $navSize; height: var(--navSize);
background-color: #d94253; background-color: #d94253;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
& > .navButton { & > .navButton {
position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
gap: 5px; gap: 5px;
width: $navSize; width: var(--navSize);
height: $navSize; height: var(--navSize);
border-radius: 50%; border-radius: 50%;
background-color: #d94253; background-color: #d94253;
color: #ffffff; color: #ffffff;
& > svg { & > svg {
width: $navSize / 2.5; width: calc(var(--navSize) / 2.5);
} }
&.selected { &.selected {
margin-top: $navSize / -2;
scale: 1.2; scale: 1.2;
margin-top: calc(var(--navSize) / -2);
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
border-radius: 50%;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
clip-path: inset(-6px -6px 42px -6px);
}
} }
& > .navButtonLabel { & > .navButtonLabel {