Compare commits
8 Commits
5dad1826e0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| db040050c4 | |||
| 0bc592530b | |||
| c9ee674b2d | |||
| 6dfa8dad9b | |||
| 9ed7c5a582 | |||
|
|
dad6bc2570 | ||
| 7c508355de | |||
|
|
0fe9d215b3 |
@@ -3,7 +3,7 @@
|
|||||||
<div class="text-404">
|
<div class="text-404">
|
||||||
<h1 class="error-emoji"></h1>
|
<h1 class="error-emoji"></h1>
|
||||||
<h2>
|
<h2>
|
||||||
404 ... This is not the page you are looking for. Go back <a href="{{ "/" | relURL }}">home</a>
|
404 ... This is not the page you are looking for. Go back <a href="{{ .Site.BaseURL }}">home</a>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<ul class="post-tags">
|
<ul class="post-tags">
|
||||||
{{ range $.Site.Taxonomies.tags.ByCount }}
|
{{ range $.Site.Taxonomies.tags.ByCount }}
|
||||||
<li class="post-tag">
|
<li class="post-tag">
|
||||||
<a href="/tags/{{ .Name | urlize }}/">
|
<a href="{{ $.Site.BaseURL }}/tags/{{ .Name | urlize }}/">
|
||||||
<div class="tag-name">{{ .Name }}</div>
|
<div class="tag-name">{{ .Name }}</div>
|
||||||
<div class="tag-posts-count">{{ .Count }}</div>
|
<div class="tag-posts-count">{{ .Count }}</div>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<section class="home-about">
|
<section class="home-about">
|
||||||
<div class="avatar">
|
<div class="avatar">
|
||||||
{{ if isset .Site.Params "avatarurl" }}
|
{{ if isset .Site.Params "avatarurl" }}
|
||||||
<img class={{ .Site.Params.AvatarSize | default "size-m" }} src='{{ .Site.Params.AvatarURL }}'>
|
<img class={{ .Site.Params.AvatarSize | default "size-m" }} src='{{ .Site.BaseURL }}{{ .Site.Params.AvatarURL }}'>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<h1>{{ .Site.Title }}</h1>
|
<h1>{{ .Site.Title }}</h1>
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
<ul class="social-icons-list">
|
<ul class="social-icons-list">
|
||||||
{{ range .Site.Params.SocialIcons }}
|
{{ range .Site.Params.SocialIcons }}
|
||||||
<li class="social-icon">
|
<li class="social-icon">
|
||||||
<a rel="me" href="{{ .url }}">
|
<a href="{{ .url }}">
|
||||||
<img class="svg-inject" src="/icons/{{ .name }}.svg" />
|
<img class="svg-inject" src="{{ .Site.BaseURL }}/icons/{{ .name }}.svg" />
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
{{ if isset .Site.Params "showpostsonhomepage" }}
|
{{ if isset .Site.Params "showpostsonhomepage" }}
|
||||||
|
|
||||||
<div class="home-posts list-posts">
|
<div class="home-posts list-posts">
|
||||||
<h2>{{ .Site.Params.ShowPostsOnHomePage | humanize }} Posts</h2>
|
<h2>Prochaines Dates</h2>
|
||||||
|
|
||||||
{{ $posts := where .Site.Pages "Params.type" "post" }}
|
{{ $posts := where .Site.Pages "Params.type" "post" }}
|
||||||
|
|
||||||
@@ -40,7 +40,14 @@
|
|||||||
{{ range $posts.ByDate.Reverse | first 4 }}
|
{{ range $posts.ByDate.Reverse | first 4 }}
|
||||||
{{- partial "list-posts.html" . -}}
|
{{- partial "list-posts.html" . -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ else if eq .Site.Params.ShowPostsOnHomePage "future" }}
|
||||||
|
{{ range $posts.ByDate }}
|
||||||
|
{{ if ge .Params.Date.Unix now.Unix }}
|
||||||
|
{{- partial "list-posts.html" . -}}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<span>Ce site est sous licence <a target="_blank" href="https://fr.wikipedia.org/wiki/Beerware">BeerWare 🍺</a>. N'héstitez pas à nous payer une bière quand vous nous croisez !</span>
|
{{ if .Site.Params.LicenseName }}
|
||||||
|
<span>Ce site est sous licence <a target="_blank" href="https://fr.wikipedia.org/wiki/Beerware">{{ .Site.Params.LicenseName }}</a>. {{ .Site.Params.LicenseDescription }}</span>
|
||||||
|
{{ end }}
|
||||||
<span>© {{ now.Year }} {{ .Site.Params.Footer}}</span>
|
<span>© {{ now.Year }} {{ .Site.Params.Footer}}</span>
|
||||||
<span>
|
<span>
|
||||||
Made with 🦈 using <a target="_blank" href="https://github.com/526avijitgupta/gokarna">Gokarna</a>
|
Made with 🦈 using <a target="_blank" href="https://github.com/526avijitgupta/gokarna">Gokarna</a>
|
||||||
|
|||||||
@@ -36,13 +36,13 @@
|
|||||||
<!-- SEO canonicals: helps Google understand your site better when using marketing campaign tagging etc -->
|
<!-- SEO canonicals: helps Google understand your site better when using marketing campaign tagging etc -->
|
||||||
<link rel="canonical" href="{{ .Permalink }}" />
|
<link rel="canonical" href="{{ .Permalink }}" />
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="/css/normalize.min.css" media="print" onload="this.media='all'">
|
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}/css/normalize.min.css" media="print" onload="this.media='all'">
|
||||||
<link rel="stylesheet" type="text/css" href="/css/main.css">
|
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}/css/main.css">
|
||||||
<link disabled id="dark-theme" rel="stylesheet" href="/css/dark.css">
|
<link disabled id="dark-theme" rel="stylesheet" href="{{ .Site.BaseURL }}/css/dark.css">
|
||||||
|
|
||||||
<script src="/js/svg-injector.min.js"></script>
|
<script src="{{ .Site.BaseURL }}/js/svg-injector.min.js"></script>
|
||||||
<script src="/js/feather-icons.min.js"></script>
|
<script src="{{ .Site.BaseURL }}/js/feather-icons.min.js"></script>
|
||||||
<script src="/js/main.js"></script>
|
<script src="{{ .Site.BaseURL }}/js/main.js"></script>
|
||||||
|
|
||||||
<!-- Option for user to inject custom html -->
|
<!-- Option for user to inject custom html -->
|
||||||
{{ if .Site.Params.CustomHeadHTML }}
|
{{ if .Site.Params.CustomHeadHTML }}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
{{ if isset .Site.Params "smallavatarurl" }}
|
{{ if isset .Site.Params "smallavatarurl" }}
|
||||||
<div class="avatar">
|
<div class="avatar">
|
||||||
<a href="{{ .Site.BaseURL }}">
|
<a href="{{ .Site.BaseURL }}">
|
||||||
<img src="{{ .Site.Params.SmallAvatarURL }}" alt="avatar" />
|
<img src="{{ .Site.BaseURL }}{{ .Site.Params.SmallAvatarURL }}" alt="avatar" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<div class="nav-links">
|
<div class="nav-links">
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<div class="nav-link">
|
<div class="nav-link">
|
||||||
<a href="{{ .URL }}">
|
<a href="{{ .URL | absURL }}">
|
||||||
{{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
|
{{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<ul class="nav-hamburger-list visibility-hidden">
|
<ul class="nav-hamburger-list visibility-hidden">
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ .URL }}">
|
<a href="{{ .URL | absURL }}">
|
||||||
{{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
|
{{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
28
layouts/partials/leaflet-loader.html
Normal file
28
layouts/partials/leaflet-loader.html
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<!-- 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" />
|
||||||
|
<script src="{{ .Site.BaseURL }}/js/leaflet.elevation.js"></script>
|
||||||
|
|
||||||
|
<!-- leaflet-hugo -->
|
||||||
|
<script src="{{ .Site.BaseURL }}/js/leaflet.hugo.js"></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>
|
||||||
23
layouts/partials/leaflet-map.html
Normal file
23
layouts/partials/leaflet-map.html
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{{ $mapLat := default "" .mapLat }}
|
||||||
|
{{ $mapLon := default "" .mapLon }}
|
||||||
|
{{ $zoom := default "13" .zoom }}
|
||||||
|
{{ $mapWidth := default "100%" .mapWidth }}
|
||||||
|
{{ $mapHeight := default "400px" .mapHeight }}
|
||||||
|
{{ $mapId := default (md5 (printf "%s%s" $mapLat $mapLon)) .mapId }}
|
||||||
|
{{ $scrollWheelZoom := default "true" .scrollWheelZoom }}
|
||||||
|
|
||||||
|
<!--Container-->
|
||||||
|
<div id='mapid_{{ $mapId }}' class="leaflet-map" width="{{ $mapWidth }}" style='height: {{ $mapHeight}};'></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
//Create Map
|
||||||
|
leafletMapsObj[{{ $mapId }}] = L.map('mapid_{{ $mapId }}').setView([{{ $mapLat }}, {{ $mapLon }}], {{ $zoom }});
|
||||||
|
{{ if eq $scrollWheelZoom "false" }}
|
||||||
|
leafletMapsObj[{{ $mapId }}].scrollWheelZoom.disable();
|
||||||
|
{{ end }}
|
||||||
|
//Add tiles
|
||||||
|
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
|
}).addTo(leafletMapsObj[{{ $mapId }}]);
|
||||||
|
|
||||||
|
</script>
|
||||||
12
layouts/partials/leaflet-marker.html
Normal file
12
layouts/partials/leaflet-marker.html
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{{ $markerLat := default "" .markerLat }}
|
||||||
|
{{ $markerLon := default "" .markerLon }}
|
||||||
|
{{ $mapId := default (md5 (printf "%s%s" $markerLat $markerLon)) .mapId }}
|
||||||
|
{{ $markerId := md5 (printf "%s%s%s" $mapId $markerLat $markerLon)}}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
//Marker
|
||||||
|
leafletMarkersObj[{{ $markerId }}] = L.marker([{{ $markerLat }}, {{ $markerLon }}]).addTo(leafletMapsObj[{{ $mapId }}]);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<article class="post-title">
|
<article class="post-title">
|
||||||
<a href="{{ .RelPermalink }}" class="post-link">{{ .Title }}</a>
|
<a href="{{ .Permalink }}" class="post-link">{{ .Title }}</a>
|
||||||
<div class="flex-break"></div>
|
<div class="flex-break"></div>
|
||||||
<span class="post-date">{{ dateFormat "2 January, 2006" .Date }}</span>
|
<span class="post-date">{{ dateFormat "2 January, 2006" .Date }}</span>
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
{{ $Lat := $.Param "Latitude" }}
|
||||||
|
{{ $Lon := $.Param "Longitude" }}
|
||||||
|
|
||||||
<div class="post container">
|
<div class="post container">
|
||||||
|
|
||||||
<div class="post-header-section">
|
<div class="post-header-section">
|
||||||
@@ -9,7 +12,7 @@
|
|||||||
|
|
||||||
<ul class="post-tags">
|
<ul class="post-tags">
|
||||||
{{ range .Params.tags }}
|
{{ range .Params.tags }}
|
||||||
<li class="post-tag"><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
|
<li class="post-tag"><a href="{{ "/tags/" | absLangURL }}{{ . | urlize }}">{{ . }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -18,6 +21,12 @@
|
|||||||
<p>
|
<p>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</p>
|
</p>
|
||||||
|
{{ if (and (isset .Params "longitude") (isset .Params "latitude")) }}
|
||||||
|
{{ partial "leaflet-loader" . }}
|
||||||
|
<h3>Map</h3>
|
||||||
|
{{ partial "leaflet-map" (dict "context" . "mapHeight" "200px" "mapLat" $Lat "mapLon" $Lon) }}
|
||||||
|
{{ partial "leaflet-marker" (dict "context" . "markerLat" $Lat "markerLon" $Lon) }}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
8
static/css/leaflet.extra-markers.min.css
vendored
Executable file
8
static/css/leaflet.extra-markers.min.css
vendored
Executable file
File diff suppressed because one or more lines are too long
BIN
static/img/markers_default.png
Executable file
BIN
static/img/markers_default.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 117 KiB |
BIN
static/img/markers_default@2x.png
Executable file
BIN
static/img/markers_default@2x.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 248 KiB |
BIN
static/img/markers_shadow.png
Executable file
BIN
static/img/markers_shadow.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 535 B |
BIN
static/img/markers_shadow@2x.png
Executable file
BIN
static/img/markers_shadow@2x.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
1660
static/js/leaflet.elevation.js
Normal file
1660
static/js/leaflet.elevation.js
Normal file
File diff suppressed because it is too large
Load Diff
1
static/js/leaflet.extra-markers.js.map
Executable file
1
static/js/leaflet.extra-markers.js.map
Executable file
File diff suppressed because one or more lines are too long
10
static/js/leaflet.extra-markers.min.js
vendored
Executable file
10
static/js/leaflet.extra-markers.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
108
static/js/leaflet.hugo.js
Normal file
108
static/js/leaflet.hugo.js
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
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;
|
||||||
Reference in New Issue
Block a user