Set Leaflet into Theme
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
10
assets/js/leaflet.extra-markers.min.js
vendored
10
assets/js/leaflet.extra-markers.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,108 +0,0 @@
|
|||||||
let leafletMapsObj = {};
|
|
||||||
let leafletMarkersObj = {};
|
|
||||||
|
|
||||||
function drawTrack(trackOpts, elevationOpts, markerOpts) {
|
|
||||||
var opts = {
|
|
||||||
elevationControl: {
|
|
||||||
options: {
|
|
||||||
position: elevationOpts.graphPosition,
|
|
||||||
theme: elevationOpts.graphTheme,
|
|
||||||
width: elevationOpts.graphWidth,
|
|
||||||
height: elevationOpts.graphHeight,
|
|
||||||
margins: {
|
|
||||||
top: 20,
|
|
||||||
right: 20,
|
|
||||||
bottom: 35,
|
|
||||||
left: 50
|
|
||||||
},
|
|
||||||
followMarker: elevationOpts.graphFollowMarker,
|
|
||||||
collapsed: elevationOpts.graphCollapsed,
|
|
||||||
detached: elevationOpts.graphDetached,
|
|
||||||
legend: false,
|
|
||||||
summary: false,
|
|
||||||
downloadLink: '',
|
|
||||||
gpxOptions: {
|
|
||||||
polyline_options: {
|
|
||||||
className: 'track-' + trackOpts.trackId + '-',
|
|
||||||
color: trackOpts.lineColor,
|
|
||||||
opacity: trackOpts.lineOpacity,
|
|
||||||
weight: trackOpts.lineWeight,
|
|
||||||
},
|
|
||||||
marker_options: {
|
|
||||||
startIcon: new L.ExtraMarkers.icon({
|
|
||||||
icon: markerOpts.iconStart,
|
|
||||||
markerColor: markerOpts.iconStartColor,
|
|
||||||
shape: markerOpts.iconStartShape,
|
|
||||||
prefix: 'fa',
|
|
||||||
extraClasses: markerOpts.iconStartClasses
|
|
||||||
}),
|
|
||||||
endIcon: new L.ExtraMarkers.icon({
|
|
||||||
icon: markerOpts.iconEnd,
|
|
||||||
markerColor: markerOpts.iconEndColor,
|
|
||||||
shape: markerOpts.iconEndShape,
|
|
||||||
prefix: 'fa',
|
|
||||||
extraClasses: markerOpts.iconEndClasses
|
|
||||||
}),
|
|
||||||
wptIcons: {
|
|
||||||
'': new L.ExtraMarkers.icon({
|
|
||||||
icon: markerOpts.icon,
|
|
||||||
markerColor: markerOpts.iconColor,
|
|
||||||
shape: markerOpts.iconShape,
|
|
||||||
prefix: 'fa',
|
|
||||||
extraClasses: markerOpts.iconClasses,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
L.control.elevation(opts.elevationControl.options).addTo(leafletMapsObj[trackOpts.mapId]).load(trackOpts.trackPath);
|
|
||||||
|
|
||||||
/*map.on('eledata_loaded', function(e) {
|
|
||||||
track = e.track_info;
|
|
||||||
});*/
|
|
||||||
}
|
|
||||||
|
|
||||||
window.downloadFile = function (sUrl) {
|
|
||||||
|
|
||||||
//iOS devices do not support downloading. We have to inform user about this.
|
|
||||||
if (/(iP)/g.test(navigator.userAgent)) {
|
|
||||||
alert('Your device does not support files downloading. Please try again in desktop browser.');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//If in Chrome or Safari - download via virtual link click
|
|
||||||
if (window.downloadFile.isChrome || window.downloadFile.isSafari) {
|
|
||||||
//Creating new link node.
|
|
||||||
var link = document.createElement('a');
|
|
||||||
link.href = sUrl;
|
|
||||||
|
|
||||||
if (link.download !== undefined) {
|
|
||||||
//Set HTML5 download attribute. This will prevent file from opening if supported.
|
|
||||||
var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length);
|
|
||||||
link.download = fileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Dispatching click event.
|
|
||||||
if (document.createEvent) {
|
|
||||||
var e = document.createEvent('MouseEvents');
|
|
||||||
e.initEvent('click', true, true);
|
|
||||||
link.dispatchEvent(e);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Force file download (whether supported by server).
|
|
||||||
if (sUrl.indexOf('?') === -1) {
|
|
||||||
sUrl += '?download';
|
|
||||||
}
|
|
||||||
|
|
||||||
window.open(sUrl, '_self');
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
window.downloadFile.isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
|
|
||||||
window.downloadFile.isSafari = navigator.userAgent.toLowerCase().indexOf('safari') > -1;
|
|
||||||
@@ -2,10 +2,7 @@
|
|||||||
type: "post"
|
type: "post"
|
||||||
title: "Feri'Ain des Fanfarons 2021 - Thoissey"
|
title: "Feri'Ain des Fanfarons 2021 - Thoissey"
|
||||||
date: 2021-08-06T00:00:00+01:00
|
date: 2021-08-06T00:00:00+01:00
|
||||||
|
latitude: "46.165350"
|
||||||
|
longitude: "4.791313"
|
||||||
---
|
---
|
||||||
|
|
||||||
### Map
|
|
||||||
{{<leaflet-map mapHeight="200px" mapWidth="100%" mapLat="46.165350" mapLon="4.791313">}}
|
|
||||||
{{<leaflet-marker markerLat="46.165350" markerLon="4.791313">}}
|
|
||||||
{{</leaflet-map>}}
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
type: "post"
|
type: "post"
|
||||||
title: "Passerelle du Palais de Justice - Lyon"
|
title: "Passerelle du Palais de Justice - Lyon"
|
||||||
date: 2021-12-12T00:00:00+01:00
|
date: 2021-12-12T00:00:00+01:00
|
||||||
|
latitude: "45.761727"
|
||||||
|
longitude: "4.829074"
|
||||||
---
|
---
|
||||||
|
|
||||||
### Map
|
|
||||||
{{<leaflet-map mapHeight="200px" mapWidth="100%" mapLat="45.761727" mapLon="4.829074">}}
|
|
||||||
{{<leaflet-marker markerLat="45.761727" markerLon="4.829074">}}
|
|
||||||
{{</leaflet-map>}}
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
type: "post"
|
type: "post"
|
||||||
title: "Pont de l'Université - Lyon"
|
title: "Pont de l'Université - Lyon"
|
||||||
date: 2022-04-15T00:00:00+01:00
|
date: 2022-04-15T00:00:00+01:00
|
||||||
|
latitude: "45.752182"
|
||||||
|
longitude: "4.836530"
|
||||||
---
|
---
|
||||||
|
|
||||||
Balances Publiques en vue de l'Apéro Fanfare du 22 Avril 2022
|
Balances Publiques en vue de l'Apéro Fanfare du 22 Avril 2022
|
||||||
@@ -13,8 +15,3 @@ Balances Publiques en vue de l'Apéro Fanfare du 22 Avril 2022
|
|||||||
|
|
||||||
### Vidéo
|
### Vidéo
|
||||||
{{<video src="/video/2022-04-15/NUiJ05BRBWAZcmQDq8js.mp4">}}
|
{{<video src="/video/2022-04-15/NUiJ05BRBWAZcmQDq8js.mp4">}}
|
||||||
|
|
||||||
### Map
|
|
||||||
{{<leaflet-map mapHeight="200px" mapWidth="100%" mapLat="45.752182" mapLon="4.836530">}}
|
|
||||||
{{<leaflet-marker markerLat="45.752182" markerLon="4.836530">}}
|
|
||||||
{{</leaflet-map>}}
|
|
||||||
@@ -2,11 +2,8 @@
|
|||||||
type: "post"
|
type: "post"
|
||||||
title: "Apéro Fanfare - Pont de l'Université - Lyon"
|
title: "Apéro Fanfare - Pont de l'Université - Lyon"
|
||||||
date: 2022-04-22T00:00:00+01:00
|
date: 2022-04-22T00:00:00+01:00
|
||||||
|
latitude: "45.752182"
|
||||||
|
longitude: "4.836530"
|
||||||
---
|
---
|
||||||
|
|
||||||
Apéro Fanfare sur les quais feat Super Smash Brass et les Fat Ducks.
|
Apéro Fanfare sur les quais feat Super Smash Brass et les Fat Ducks.
|
||||||
|
|
||||||
### Map
|
|
||||||
{{<leaflet-map mapHeight="200px" mapWidth="100%" mapLat="45.752182" mapLon="4.836530">}}
|
|
||||||
{{<leaflet-marker markerLat="45.752182" markerLon="4.836530">}}
|
|
||||||
{{</leaflet-map>}}
|
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
type: "post"
|
type: "post"
|
||||||
title: "Over zeu Peepshow - Lyon"
|
title: "Over zeu Peepshow - Lyon"
|
||||||
date: 2022-05-13T00:00:00+01:00
|
date: 2022-05-13T00:00:00+01:00
|
||||||
|
latitude: "45.737637"
|
||||||
|
longitude: "4.853652"
|
||||||
---
|
---
|
||||||
|
|
||||||
Peepshow Musical sauce OzK au 18 rue Pierre Delore pour l'anniversaire de PVR
|
Peepshow Musical sauce OzK au 18 rue Pierre Delore pour l'anniversaire de PVR
|
||||||
@@ -21,8 +23,3 @@ Over zeu **PEEP** Knup **SHOW**, Mode d'emploi :
|
|||||||
|
|
||||||
### Affiche
|
### Affiche
|
||||||
{{<figure src="/images/2022-05-13/AffichePeepshow.png">}}
|
{{<figure src="/images/2022-05-13/AffichePeepshow.png">}}
|
||||||
|
|
||||||
### Map
|
|
||||||
{{<leaflet-map mapHeight="200px" mapWidth="100%" mapLat="45.737637" mapLon="4.853652">}}
|
|
||||||
{{<leaflet-marker markerLat="45.737637" markerLon="4.853652">}}
|
|
||||||
{{</leaflet-map>}}
|
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
type: "post"
|
type: "post"
|
||||||
title: "Rock à Fond - Manziat"
|
title: "Rock à Fond - Manziat"
|
||||||
date: 2022-07-30T00:00:00+01:00
|
date: 2022-07-30T00:00:00+01:00
|
||||||
|
latitude: "46.358619"
|
||||||
|
longitude: "4.903935"
|
||||||
---
|
---
|
||||||
|
|
||||||
Festival Rock à Fond organisé par les Gazafond à Manziat (01570)
|
Festival Rock à Fond organisé par les Gazafond à Manziat (01570)
|
||||||
@@ -12,8 +14,3 @@ Festival Rock à Fond organisé par les Gazafond à Manziat (01570)
|
|||||||
{{<figure src="/images/2022-07-30/IMG_20220730_200333.jpg">}}
|
{{<figure src="/images/2022-07-30/IMG_20220730_200333.jpg">}}
|
||||||
{{<figure src="/images/2022-07-30/IMG_20220730_202412.jpg">}}
|
{{<figure src="/images/2022-07-30/IMG_20220730_202412.jpg">}}
|
||||||
{{<figure src="/images/2022-07-30/IMG_20220730_202417.jpg">}}
|
{{<figure src="/images/2022-07-30/IMG_20220730_202417.jpg">}}
|
||||||
|
|
||||||
### Map
|
|
||||||
{{<leaflet-map mapHeight="200px" mapWidth="100%" mapLat="46.358619" mapLon="4.903935">}}
|
|
||||||
{{<leaflet-marker markerLat="46.358619" markerLon="4.903935">}}
|
|
||||||
{{</leaflet-map>}}
|
|
||||||
@@ -2,9 +2,6 @@
|
|||||||
type: "post"
|
type: "post"
|
||||||
title: "Decente de la Saône - Replonges"
|
title: "Decente de la Saône - Replonges"
|
||||||
date: 2022-07-31T00:00:00+01:00
|
date: 2022-07-31T00:00:00+01:00
|
||||||
|
latitude: "46.3044427"
|
||||||
|
longitude: "4.8398536"
|
||||||
---
|
---
|
||||||
|
|
||||||
### Map
|
|
||||||
{{<leaflet-map mapHeight="200px" mapWidth="100%" mapLat="46.3044427" mapLon="4.8398536">}}
|
|
||||||
{{<leaflet-marker markerLat="46.3044427" markerLon="4.8398536">}}
|
|
||||||
{{</leaflet-map>}}
|
|
||||||
@@ -2,9 +2,6 @@
|
|||||||
type: "post"
|
type: "post"
|
||||||
title: "Feri'Ain des Fanfarons 2022 - Thoissey"
|
title: "Feri'Ain des Fanfarons 2022 - Thoissey"
|
||||||
date: 2022-08-08T00:00:00+01:00
|
date: 2022-08-08T00:00:00+01:00
|
||||||
|
latitude: "46.165350"
|
||||||
|
longitude: "4.791313"
|
||||||
---
|
---
|
||||||
|
|
||||||
### Map
|
|
||||||
{{<leaflet-map mapHeight="200px" mapWidth="100%" mapLat="46.165350" mapLon="4.791313">}}
|
|
||||||
{{<leaflet-marker markerLat="46.165350" markerLon="4.791313">}}
|
|
||||||
{{</leaflet-map>}}
|
|
||||||
@@ -2,16 +2,13 @@
|
|||||||
type: "post"
|
type: "post"
|
||||||
title: "Matinale OzK - Charpennes, Villeurbanne"
|
title: "Matinale OzK - Charpennes, Villeurbanne"
|
||||||
date: 2022-10-11T00:00:00+01:00
|
date: 2022-10-11T00:00:00+01:00
|
||||||
|
latitude: "45.770751"
|
||||||
|
longitude: "4.863223"
|
||||||
---
|
---
|
||||||
|
|
||||||
Matinale Musicale de 7:00 à 8:00 place Charles Hernu à Charpennes, sur une idée orginale de TFA.
|
Matinale Musicale de 7:00 à 8:00 place Charles Hernu à Charpennes, sur une idée orginale de TFA.
|
||||||
|
|
||||||
### Concept
|
### Concept
|
||||||
A
|
Égayer la journée des étudiants et des travailleurs passant par le Charpennes un matin en semaine.
|
||||||
|
|
||||||
> Mais quelle idée de merde...
|
> Mais quelle idée de merde...
|
||||||
|
|
||||||
### Map
|
|
||||||
{{<leaflet-map mapHeight="200px" mapWidth="100%" mapLat="45.770751" mapLon="4.863223">}}
|
|
||||||
{{<leaflet-marker markerLat="45.770751" markerLon="4.863223">}}
|
|
||||||
{{</leaflet-map>}}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<!-- Leaflet (JS/CSS) -->
|
|
||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css"
|
|
||||||
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
|
|
||||||
crossorigin=""/>
|
|
||||||
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"
|
|
||||||
integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew=="
|
|
||||||
crossorigin=""></script>
|
|
||||||
|
|
||||||
<!-- leaflet-elevation -->
|
|
||||||
<link rel="stylesheet" href="https://unpkg.com/@raruto/leaflet-elevation@1.1.1/dist/leaflet-elevation.css" />
|
|
||||||
{{ $leafletElevation := resources.Get "js/leaflet.elevation.js" | minify | fingerprint "md5" }}
|
|
||||||
<script src="{{ $leafletElevation.Permalink }}"></script>
|
|
||||||
|
|
||||||
<!-- leaflet-hugo -->
|
|
||||||
{{ $leafletHugo := resources.Get "js/leaflet.hugo.js" | minify | fingerprint "md5" }}
|
|
||||||
<script src="{{ $leafletHugo.Permalink }}"></script>
|
|
||||||
|
|
||||||
<!-- Icons -->
|
|
||||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/leaflet.extra-markers.min.css">
|
|
||||||
{{ $leafletExtra := resources.Get "js/leaflet.extra-markers.min.js" }}
|
|
||||||
<script src="{{ $leafletExtra.Permalink }}"></script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.fa-icon-marker {
|
|
||||||
text-align: center;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.download-track {
|
|
||||||
background-color: #e1e1e1;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 25px;
|
|
||||||
border-radius: 0 0 10px 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
{{ if .IsNamedParams }}
|
|
||||||
|
|
||||||
{{ $trackPath := default "" (.Get "trackPath") }}
|
|
||||||
{{ $lineColor := default "#006EFF" (.Get "lineColor") }}
|
|
||||||
{{ $lineWeight := default "3" (.Get "lineWeight") }}
|
|
||||||
{{ $lineOpacity := default "1" (.Get "lineOpacity") }}
|
|
||||||
|
|
||||||
{{ $graphPosition := default "topright" (.Get "graphPosition") }}
|
|
||||||
{{ $graphTheme := default "steelblue-theme" (.Get "graphTheme") }}
|
|
||||||
{{ $graphWidth := default "500" (.Get "graphWidth") }}
|
|
||||||
{{ $graphHeight := default "150" (.Get "graphHeight") }}
|
|
||||||
{{ $graphFollowMarker := default false (.Get "graphFollowMarker") }}
|
|
||||||
{{ $graphCollapsed := default false (.Get "graphCollapsed") }}
|
|
||||||
{{ $graphDetached := default true (.Get "graphDetached") }}
|
|
||||||
|
|
||||||
{{ $markerIcon := default "fa-thumb-tack" (.Get "markerIcon") }}
|
|
||||||
{{ $markerIconColor := default "cyan" (.Get "markerIconColor") }}
|
|
||||||
{{ $markerIconShape := default "penta" (.Get "markerIconShape") }}
|
|
||||||
{{ $markerIconClasses := default "fa-icon-marker" (.Get "markerIconClasses") }}
|
|
||||||
{{ $markerStartIcon := default "fa-play" (.Get "markerStartIcon") }}
|
|
||||||
{{ $markerStartIconColor := default "green-light" (.Get "markerStartIconColor") }}
|
|
||||||
{{ $markerStartIconShape := default "circle" (.Get "markerStartIconShape") }}
|
|
||||||
{{ $markerStartIconClasses := default "fa-icon-marker fa-icon-start-stop" (.Get "markerStartIconClasses") }}
|
|
||||||
{{ $markerEndIcon := default "fa-flag-checkered" (.Get "markerEndIcon") }}
|
|
||||||
{{ $markerEndIconColor := default "red" (.Get "markerEndIconColor") }}
|
|
||||||
{{ $markerEndIconShape := default "circle" (.Get "markerEndIconShape") }}
|
|
||||||
{{ $markerEndIconClasses := default "fa-icon-marker fa-icon-start-stop" (.Get "markerEndIconClasses") }}
|
|
||||||
|
|
||||||
{{ with .Parent }}
|
|
||||||
|
|
||||||
{{ $mapLat := default "" (.Get "mapLat") }}
|
|
||||||
{{ $mapLon := default "" (.Get "mapLon") }}
|
|
||||||
{{ $mapId := default (md5 (printf "%s%s" $mapLat $mapLon)) (.Get "mapId") }}
|
|
||||||
{{ $trackId := md5 (printf "%s%s" $mapId $trackPath)}}
|
|
||||||
|
|
||||||
<script>
|
|
||||||
trackOpts = {
|
|
||||||
mapId: "{{ $mapId }}",
|
|
||||||
trackId: "{{ $trackId }}",
|
|
||||||
trackPath: '{{ "gpx" | absURL }}/{{$trackPath}}',
|
|
||||||
lineColor: "{{ $lineColor }}",
|
|
||||||
lineWeight: "{{ $lineWeight }}",
|
|
||||||
lineOpacity: "{{ $lineOpacity }}"
|
|
||||||
};
|
|
||||||
elevationOpts = {
|
|
||||||
graphPosition: "{{ $graphPosition }}",
|
|
||||||
graphTheme: "{{ $graphTheme }}",
|
|
||||||
graphWidth: "{{ $graphWidth }}",
|
|
||||||
graphHeight: "{{ $graphHeight }}",
|
|
||||||
graphFollowMarker: {{ $graphFollowMarker }},
|
|
||||||
graphCollapsed: {{ $graphCollapsed }},
|
|
||||||
graphDetached: {{ $graphDetached }}
|
|
||||||
};
|
|
||||||
markerOpts = {
|
|
||||||
icon: "{{ $markerIcon }}",
|
|
||||||
iconColor: "{{ $markerIconColor }}",
|
|
||||||
iconShape: "{{ $markerIconShape }}",
|
|
||||||
iconClasses: "{{ $markerIconClasses }}",
|
|
||||||
iconStart: "{{ $markerStartIcon }}",
|
|
||||||
iconStartColor: "{{ $markerStartIconColor }}",
|
|
||||||
iconStartShape: "{{ $markerStartIconShape }}",
|
|
||||||
iconStartClasses: "{{ $markerStartIconClasses }}",
|
|
||||||
iconEnd: "{{ $markerEndIcon }}",
|
|
||||||
iconEndColor: "{{ $markerEndIconColor }}",
|
|
||||||
iconEndShape: "{{ $markerEndIconShape }}",
|
|
||||||
iconEndClasses: "{{ $markerEndIconClasses }}"
|
|
||||||
};
|
|
||||||
drawTrack(trackOpts, elevationOpts, markerOpts);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="download-track" onclick="downloadFile('{{ "gpx" | absURL }}/{{ $trackPath }}');"><p class="download-track-link">Download</p></div>
|
|
||||||
|
|
||||||
{{ else }}
|
|
||||||
{{ errorf "Leaflet Hugo Shortcode: impossible using track outside leaflet-map" }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ else }}
|
|
||||||
{{ errorf "Leaflet Hugo Shortcode: please provide named Parameters for marker" }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 117 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 248 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 535 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB |
Submodule themes/gokarna updated: 6dfa8dad9b...c9ee674b2d
Reference in New Issue
Block a user