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

pull request #55

Merged
merged 3 commits into from
Oct 22, 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
16 changes: 16 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import AppFooter from './components/AppFooter.vue'

<!-- Optional -->
<template #acceptContent>J'accepte!</template>

</vue-cookie-accept-decline>

</template>
Expand All @@ -48,4 +49,19 @@ import AppFooter from './components/AppFooter.vue'
display: flex;
flex-direction: column;
}

#cookconsent {
color:#3C002E !important;
}

.cookie__floating__buttons__button--accept:hover {
background-color:#FF803D !important;
color:#fff !important;
}

.cookie__floating__buttons__button--accept {
background-color:#fff !important;
color: #FF803D !important;
}

</style>
4 changes: 2 additions & 2 deletions src/components/AlertComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const props = defineProps({

.alert.alert-success {
background-color: #fff !important;
color: #FF953D;
border: #FF953D solid 1px;
color: #FF803D;
border: #FF803D solid 1px;
}

</style>
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function goToMaps() {
}

.inter-footer {
color: #390040 !important;
color: #3C002E !important;
font-family: "Inter", sans-serif;
font-optical-sizing: auto;
font-weight: 550 !important;
Expand Down
10 changes: 5 additions & 5 deletions src/components/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ onMounted(async () => {
<div v-if="isAuthLoading" class="overlay">
<div class="overlay__wrapper">
<div class="overlay__spinner">
<div class="spinner-grow" style="width: 3rem; height: 3rem; color:#390040" role="status">
<div class="spinner-grow" style="width: 3rem; height: 3rem; color:#3C002E" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
</div>
</div>

<div id="header">
<nav class="navbar navbar-expand-md navbar-light" style="border-bottom: 1.5px solid #390040;">
<nav class="navbar navbar-expand-md navbar-light" style="border-bottom: 1.5px solid #3C002E;">
<div class="container-fluid">
<a class="navbar-brand">
<img src="./icons/logo.svg" alt="Kavalé Logo"/>
Expand All @@ -97,8 +97,8 @@ onMounted(async () => {
</ul>
<form class="form-inline">
<button class="btn btn-outline-secondary" style="margin-right: 8px;" type="button" @click="showLogin()">Mon compte</button>
<button class="btn btn-danger" style="margin-left: 5px;" type="button" @click="showLogout()" data-toggle="tooltip" title="Se déconnecter" :disabled="!isLoggedIn">
<i class="pi pi-sign-out" style="color:white;"></i>
<button class="btn btn-outline-primary" style="margin-left: 5px;" type="button" @click="showLogout()" data-toggle="tooltip" title="Se déconnecter" :disabled="!isLoggedIn">
<i class="pi pi-sign-out"></i>
</button>
</form>
</div>
Expand Down Expand Up @@ -156,7 +156,7 @@ onMounted(async () => {
}

.dropdown-item.inter-maps:hover {
background-color: #390040;
background-color: #3C002E;
color: #fff !important;
}

Expand Down
6 changes: 3 additions & 3 deletions src/components/CreateComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ async function onSubmit() {
<style>

.range-cust::-webkit-slider-thumb {
background: #390040 !important;
background: #3C002E !important;
}
.range-cust::-moz-range-thumb {
background: #390040 !important;
background: #3C002E !important;
}
.range-cust::-ms-thumb {
background: #390040 !important;
background: #3C002E !important;
}

</style>
Expand Down
6 changes: 3 additions & 3 deletions src/components/DeleteComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ async function deleteHike() {

<div class="modal fade" id="#delete" tabindex="-1" aria-labelledby="#delete" aria-hidden="true">
<div class="modal-dialog modal-confirm">
<div class="modal-content">
<div class="modal-header inter-maps">
<div class="modal-content inter-maps">
<div class="modal-header">
<h1 class="modal-title fs-5" id="#delete">Êtes-vous certain ?</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body inter-maps">
<div class="modal-body">
<p>Voulez-vous vraiment supprimer l'itinéraire ? Cette action est irréversible.</p>
</div>
<div class="modal-footer">
Expand Down
6 changes: 3 additions & 3 deletions src/components/LoginComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function signInAsGuest() {
<div v-if="isAuthLoading" class="overlay">
<div class="overlay__wrapper">
<div class="overlay__spinner">
<div class="spinner-grow" style="width: 3rem; height: 3rem; color:#390040" role="status">
<div class="spinner-grow" style="width: 3rem; height: 3rem; color:#3C002E" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
Expand Down Expand Up @@ -106,8 +106,8 @@ async function signInAsGuest() {

<div>
Continuer en tant qu'invité &#x1F609;
<button class="btn btn-danger btn-sm" style="margin-left: 5px;" type="button" @click="signInAsGuest()">
<i class="pi pi-sign-in" style="color:white;"></i>
<button class="btn btn-outline-primary btn-sm" style="margin-left: 5px;" type="button" @click="signInAsGuest()">
<i class="pi pi-sign-in"></i>
</button>
<br/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/LogoutComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function signout() {

<div class="modal fade" id="#logout" tabindex="-1" aria-labelledby="#logout" aria-hidden="true">
<div class="modal-dialog modal-confirm">
<div class="modal-content">
<div class="modal-content inter-maps">
<div class="modal-header">
<h1 class="modal-title fs-5" id="#logout">Êtes-vous certain ?</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
Expand Down
64 changes: 30 additions & 34 deletions src/components/MapDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import 'leaflet.heightgraph/dist/L.Control.Heightgraph.min.css'
// custom markers
// todo use font-awesome
import hostCustomMarker from './icons/host.svg'
import viewpointCustomMarker from './icons/viewpoint.svg'
import viewpointCustomMarker from './icons/street-view.svg'

import { Modal } from 'bootstrap';
import axios from 'axios';
Expand Down Expand Up @@ -164,7 +164,7 @@ async function getJourneys() {
// leaflet map
const myMap = ref(null)
const mapcenter = ref('')
const mapzoom = ref('')
const mapzoom = ref(13)
const ismapdata = ref(false)

watch(mapcenter, () => {
Expand All @@ -173,14 +173,14 @@ watch(mapcenter, () => {

const selectedStyle = ref(
{
'color':'#FF953D',
'color':'#FF803D',
'weight': 5
}
)

const unselectedStyle = ref(
{
'color':'#390040',
'color':'#3C002E',
'weight': 5
}
)
Expand All @@ -197,7 +197,7 @@ const colorMappings = {
Simaps: {
'Elevation': {
text: 'Altitude',
color: '#FF953D'
color: '#FF803D'
}
}
}
Expand Down Expand Up @@ -420,7 +420,7 @@ onMounted(async () => {
<div v-if="isResponseLoading" class="overlay">
<div class="overlay__wrapper">
<div class="overlay__spinner">
<div class="spinner-grow" style="width: 3rem; height: 3rem; color:#390040" role="status">
<div class="spinner-grow" style="width: 3rem; height: 3rem; color:#3C002E" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
Expand All @@ -432,7 +432,7 @@ onMounted(async () => {
<div class="col-lg-7" style='padding: 10px;'>
<br/>

<div class="mapContainer" v-if="ismapdata" style='border: 2px solid #390040;'>
<div class="mapContainer" v-if="ismapdata" style='border: 2px solid #3C002E;'>
<l-map ref="myMap" :zoom="13" :center="mapcenter" :use-global-leaflet="true" @ready="onReady()" @update:zoom="zoomUpdated">

<l-control-layers position="topright"></l-control-layers>
Expand All @@ -452,29 +452,25 @@ onMounted(async () => {

<l-geo-json @click="selectedHike=hike.id, showHeightgraph(hike.trail.geojson), fitBounds(hike.trail.geojson)" v-for="hike in sortedHikes" :key="hike.id" :geojson="hike.trail.geojson" :options-style="selectedHike == hike.id ? function() {return selectedStyle} : function() {return unselectedStyle}">
<l-popup :options="{ closeButton:true, closeOnClick:true }" class="inter-maps">{{ hike.name }}<br/>
<i v-for="rate in hike.rates" class="pi pi-star-fill" style="font-size: 1rem; color:#390040;"></i>
<i v-for="rate in (4 - hike.rates)" class="pi pi-star" style="font-size: 1rem; color:#390040;"></i>
<i v-for="rate in hike.rates" class="pi pi-star-fill" style="font-size: 1rem; color:#3C002E;"></i>
<i v-for="rate in (4 - hike.rates)" class="pi pi-star" style="font-size: 1rem; color:#3C002E;"></i>
</l-popup>
</l-geo-json>

<l-layer-group
:visible="true"
layerType="overlay"
name="Points de vue">
<l-marker-cluster-group>
<l-marker-rotate
v-for="(item, index) in viewpoints"
:key="index"
:lat-lng="[item.lat, item.lng]"
:rotationAngle=45>
<l-popup class="inter-maps">{{ item.name }}</l-popup>
<l-icon
:iconSize="mapzoom >= 15 ? [30, 30] : [20, 20]"
:icon-url="viewpointCustomMarker"
:icon-anchor="[3, 3]"
/>
</l-marker-rotate>
</l-marker-cluster-group>
<l-marker
v-for="(item, index) in viewpoints"
:key="index"
:lat-lng="[item.lat, item.lng]">
<l-popup class="inter-maps">{{ item.name }}</l-popup>
<l-icon
:iconSize="mapzoom >= 15 ? [35, 35] : ((mapzoom >= 13 ? [25, 25] : [18, 18]))"
:icon-url="viewpointCustomMarker"
/>
</l-marker>
</l-layer-group>

<l-layer-group
Expand Down Expand Up @@ -531,7 +527,7 @@ onMounted(async () => {
</div>
<div class="col-2 inter-maps">
<button class="btn btn-light btn-sm" @click="resetFilters()" data-toggle="tooltip" title="réinitialiser">
<i class="pi pi-filter-slash" style="color:#390040;"></i>
<i class="pi pi-filter-slash" style="color:#3C002E;"></i>
</button>
</div>
</div>
Expand All @@ -556,8 +552,8 @@ onMounted(async () => {
<span v-if="hike.difficulty == 4" class="badge bg-dark">Très difficile</span>
</div>
<div class="col-2">
<i v-for="rate in hike.rates" class="pi pi-star-fill" style="font-size: 1rem; color:#390040;"></i>
<i v-for="rate in (4 - hike.rates)" class="pi pi-star" style="font-size: 1rem; color:#390040;"></i>
<i v-for="rate in hike.rates" class="pi pi-star-fill" style="font-size: 1rem; color:#3C002E;"></i>
<i v-for="rate in (4 - hike.rates)" class="pi pi-star" style="font-size: 1rem; color:#3C002E;"></i>
</div>
</button>
</h2>
Expand All @@ -572,16 +568,16 @@ onMounted(async () => {
<br/><br/>
<div class="col text-end">
<button class="btn btn-light" @click="showHeightgraph(hike.trail.geojson), fitBounds(hike.trail.geojson), selectedHike = hike.id" data-toggle="tooltip" title="voir sur la carte" :disabled="!hike.trail.geojson">
<i class="pi pi-map" style="color:#390040;"></i>
<i class="pi pi-map" style="color:#3C002E;"></i>
</button>
<button class="btn btn-light" @click="isLoggedIn ? (getJourneys(), showUpdate(), hikeDetails = hike) : showLogin()" data-toggle="tooltip" title="mettre à jour l'itinéraire">
<i class="pi pi-file-edit" style="color:#390040;"></i>
<i class="pi pi-file-edit" style="color:#3C002E;"></i>
</button>
<button class="btn btn-light" @click="downloadGPX(hike.trail.geojson, hike.name)" data-toggle="tooltip" title="télécharger la trace gpx" :disabled="!hike.trail.geojson">
<i class="pi pi-download" style="color:#390040;"></i>
<i class="pi pi-download" style="color:#3C002E;"></i>
</button>
<button class="btn btn-light" @click="showDelete(), hikeDetails = hike" data-toggle="tooltip" :disabled="!isAdmin" title="supprimer l'itinéraire">
<i class="pi pi-trash" style="color:#FF953D;"></i>
<i class="pi pi-trash" style="color:#FF803D;"></i>
</button>
</div>
</div>
Expand Down Expand Up @@ -676,9 +672,9 @@ onMounted(async () => {
}

.badge.bg-info {
color:#390040 !important;
color:#3C002E !important;
background-color: #fff !important;
border: #390040 solid 1px;
border: #3C002E solid 1px;
margin-left: 5px;
margin-right: 5px;

Expand Down Expand Up @@ -721,9 +717,9 @@ onMounted(async () => {
}

.badge.bg-info {
color:#390040 !important;
color:#3C002E !important;
background-color: #fff !important;
border: #390040 solid 1px;
border: #3C002E solid 1px;
margin-left: 5px;
margin-right: 5px;
}
Expand Down
20 changes: 10 additions & 10 deletions src/components/UpdateComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,19 @@ const errors = ref([])
async function onSubmit() {
errors.value = []
if (!updatedName.value) {
errors.value.push('Name is required.')
errors.value.push('Le nom est obligatoire.')
}
if (!updatedDistance.value) {
errors.value.push('Distance is required.')
errors.value.push('La distance est obligatoire.')
}
if (!updatedElevation.value) {
errors.value.push('Positive elevation is required.')
errors.value.push('Le dénivelé positif est obligatoire.')
}
if (!updatedDuration.value) {
errors.value.push('Duration is required.')
errors.value.push('La durée est obligatoire.')
}
if (!updatedJourney.value.name) {
errors.value.push('Journey type is required.')
errors.value.push('Le type d\'itinéraire est obligatoire.')
}
if (errors.value.length == 0) {
updateHike()
Expand All @@ -161,10 +161,10 @@ async function onSubmit() {
</div>
<div class="modal-body">
<form @submit.prevent="onSubmit()" novalidate>
<p v-if="errors.length">
<p v-if="errors.length" style="color:#FF803D;">
<b>Veuillez corriger les erreurs suivantes :</b>
<ul>
<li v-for="error in errors" style="color:#D6955B;">{{ error }}</li>
<li v-for="error in errors">{{ error }}</li>
</ul>
</p>
<div class="form-group inter-maps">
Expand Down Expand Up @@ -224,13 +224,13 @@ async function onSubmit() {
<style>

.range-cust::-webkit-slider-thumb {
background: #390040 !important;
background: #3C002E !important;
}
.range-cust::-moz-range-thumb {
background: #390040 !important;
background: #3C002E !important;
}
.range-cust::-ms-thumb {
background: #390040 !important;
background: #3C002E !important;
}

</style>
Expand Down
1 change: 1 addition & 0 deletions src/components/icons/street-view.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions src/components/icons/viewpoint.svg

This file was deleted.

Loading