Skip to content
Open
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
8 changes: 6 additions & 2 deletions src/components/MapContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,15 @@
</ion-button>
</div>

<ion-accordion value="ionaccordion">
<ion-accordion value="ionaccordion" toggle-icon-slot="none">
<!-- TODO Move recenter button with accordion and update when position changed -->
<!-- TODO Put between 5 and 12 discoveries depending on discoveries in viewport and add number of discoveries in header?? (to confirm with team to understand what to do) -->
<!-- TODO Check if discoveries match with user location when it changes -->
<ion-item slot="header">
<ion-label>Découvertes à proximité: </ion-label>
<span class="custom-chevron" :class="{ open: ionAccordionOpen }">
<ion-icon :icon="chevronUpOutline"></ion-icon>
</span>
</ion-item>
<div slot="content" style="height: 20vh; width: 100vw">
<ion-list :inset="false" lines="none">
Expand Down Expand Up @@ -163,7 +166,7 @@

<script>
import "ol/ol.css";
import { arrowForward as arrowRightIcon } from "ionicons/icons";
import { arrowForward as arrowRightIcon, chevronUpOutline } from "ionicons/icons";
import {
IonButton,
IonContent,
Expand Down Expand Up @@ -387,6 +390,7 @@ export default {
// if location is not available, use the default zoom level = 4.5
TILE_LAYER: layer,
arrowRightIcon,
chevronUpOutline,
customLocationIconBlack,
customLocationIconPurple,
isAlertOpen: false,
Expand Down
13 changes: 13 additions & 0 deletions src/theme/Map.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ ion-accordion-group.closestDiscoveriesAccordion ion-accordion ion-item[slot="hea
padding: 0.8vh 0;
}

/* Custom chevron for accordion - points up when closed, down when open */
.custom-chevron {
display: flex;
align-items: center;
margin-right: 1vw;
font-size: 20px;
transition: transform 0.3s ease;
}

.custom-chevron.open {
transform: rotate(180deg);
}

ion-accordion-group.closestDiscoveriesAccordion ion-accordion div[slot="content"] ion-list {
display: flex;
overflow-x: scroll;
Expand Down