forked from ti-nuage/site
Ajout de la carte de Vieux-Marché.
This commit is contained in:
parent
7966d5d7ba
commit
c493be5b4f
BIN
assets/production/images/map.png
Normal file
BIN
assets/production/images/map.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
@ -1,4 +1,5 @@
|
||||
---
|
||||
layout: with-map.njk
|
||||
permalink: false
|
||||
title: Mentions légales
|
||||
---
|
||||
@ -12,6 +13,24 @@ L'adresse électronique de contact de l'association est : contact @ ti-nuage.fr.
|
||||
|
||||
Il est possible de nous rencontrer tous les premiers jeudi du mois à partir de 20 heures à [la Hutte](https://lahutte.ti-nuage.fr/), l'espace de travail partagé à Vieux Marché.
|
||||
|
||||
<div id="map"></div>
|
||||
<script>
|
||||
const el = document.getElementById('map')
|
||||
el.style['height'] = '240px'
|
||||
el.style['margin-top'] = '1em'
|
||||
const map = L.map('map').setView([48.60679, -3.44874], 17)
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
}).addTo(map)
|
||||
L.marker([48.60679, -3.44874]).addTo(map)
|
||||
</script>
|
||||
<noscript>
|
||||
<a href="https://www.openstreetmap.org/?mlat=48.60678&mlon=-3.44872#map=17/48.60678/-3.44872">
|
||||
<img src="/images/map.png" style="margin-top: 1em"/>
|
||||
</a>
|
||||
</noscript>
|
||||
|
||||
## Publication
|
||||
Directeur de publication : Nourdine Gernelle, président de l'association.
|
||||
|
||||
@ -23,7 +42,7 @@ Siège social : `Mairie, 11 places aux Chevaux, 22420 Le Vieux Marché - France`
|
||||
|
||||
## Données
|
||||
|
||||
Ce site n'exploite aucun *cookie*, ne procède à aucun pistage ni ne requiert une quelconque collecte de données. Il ne nécessite en outre pas l'usage de Javascript, sauf pour l'affichage du calendrier.
|
||||
Ce site n'exploite aucun *cookie*, ne procède à aucun pistage ni ne requiert une quelconque collecte de données. Il ne nécessite en outre pas l'usage de Javascript, sauf pour l'affichage du calendrier et des cartes dynamiques.
|
||||
|
||||
## Propriété intellectuelle
|
||||
|
||||
|
13
layouts/with-map.njk
Normal file
13
layouts/with-map.njk
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "base.njk" %}
|
||||
|
||||
{% block head %}
|
||||
<link rel="stylesheet" href="/css/leaflet.css" />
|
||||
<script src="/js/leaflet.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block article %}
|
||||
<h1 class="mt128">{{ title }}</h1>
|
||||
|
||||
{{ contents | safe }}
|
||||
|
||||
{% endblock %}
|
13
package-lock.json
generated
13
package-lock.json
generated
@ -8,7 +8,8 @@
|
||||
"name": "ti-nuage.fr",
|
||||
"version": "2022.05.24",
|
||||
"dependencies": {
|
||||
"ical": "^0.8.0"
|
||||
"ical": "^0.8.0",
|
||||
"leaflet": "^1.9.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@metalsmith/collections": "^1.2.1",
|
||||
@ -5804,6 +5805,11 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/leaflet": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
|
||||
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
|
||||
},
|
||||
"node_modules/levn": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
|
||||
@ -14967,6 +14973,11 @@
|
||||
"package-json": "^6.3.0"
|
||||
}
|
||||
},
|
||||
"leaflet": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
|
||||
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
|
||||
},
|
||||
"levn": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
|
||||
|
@ -19,7 +19,8 @@
|
||||
},
|
||||
"author": "Ti Nuage <contact@ti-nuage.fr>",
|
||||
"dependencies": {
|
||||
"ical": "^0.8.0"
|
||||
"ical": "^0.8.0",
|
||||
"leaflet": "^1.9.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@metalsmith/collections": "^1.2.1",
|
||||
|
@ -10,7 +10,7 @@ module.exports = {
|
||||
paths: {
|
||||
projectRoot,
|
||||
/* Nodes */
|
||||
nodeModules: join(projectRoot, 'node_modules'),
|
||||
leaflet: join(projectRoot, 'node_modules', 'leaflet', 'dist'),
|
||||
/* Metalsmith */
|
||||
metalsmithSource: 'content',
|
||||
metalsmithDestination: distribution,
|
||||
|
47
scripts/metalsmith-copy.js
Normal file
47
scripts/metalsmith-copy.js
Normal file
@ -0,0 +1,47 @@
|
||||
const debug = require('debug')('metalsmith-copy')
|
||||
const fs = require('fs')
|
||||
const mode = require('stat-mode')
|
||||
const path = require('path')
|
||||
|
||||
module.exports = plugin
|
||||
|
||||
function plugin (options) {
|
||||
options = Object.assign({ destination: '.' }, options)
|
||||
|
||||
return function (files, metalsmith, done) {
|
||||
const dest = options.destination
|
||||
const items = options.files.length
|
||||
const promises = []
|
||||
|
||||
const addTask = function (promise) {
|
||||
promises.push(promise)
|
||||
if (items === promises.length) {
|
||||
debug('Waiting for ' + items + 'copy operations.')
|
||||
Promise.all(promises)
|
||||
.then((data) => {
|
||||
done()
|
||||
})
|
||||
.catch((err) => {
|
||||
done(err)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
options.files.forEach((filename) => {
|
||||
addTask(new Promise(function (resolve, reject) {
|
||||
fs.stat(filename, function (err, stats) {
|
||||
if (err) return reject(err)
|
||||
fs.readFile(filename, function (err, buffer) {
|
||||
if (err) return reject(err)
|
||||
const file = {
|
||||
contents: buffer,
|
||||
mode: mode(stats).toOctal()
|
||||
}
|
||||
files[path.join(dest, path.basename(filename))] = file
|
||||
resolve({})
|
||||
})
|
||||
})
|
||||
}))
|
||||
})
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ const cleanCSS = require('metalsmith-clean-css')
|
||||
const chatons = require('./metalsmith-tinuage-chatons')
|
||||
const config = require('./config.js')
|
||||
const collections = require('@metalsmith/collections')
|
||||
const copy = require('./metalsmith-copy')
|
||||
const excerpts = require('@metalsmith/excerpts')
|
||||
const groff = require('metalsmith-groff')
|
||||
const layouts = require('@metalsmith/layouts')
|
||||
@ -72,6 +73,25 @@ module.exports = new Metalsmith(config.paths.projectRoot)
|
||||
source: './assets/' + (process.env.NODE_ENV || 'dev'),
|
||||
destination: './'
|
||||
}))
|
||||
.use(copy({
|
||||
files: [join(config.paths.leaflet, 'leaflet.css')],
|
||||
destination: './css'
|
||||
}))
|
||||
.use(copy({
|
||||
files: [
|
||||
join(config.paths.leaflet, 'images', 'marker-icon.png'),
|
||||
join(config.paths.leaflet, 'images', 'marker-icon-2x.png'),
|
||||
join(config.paths.leaflet, 'images', 'marker-shadow.png')
|
||||
],
|
||||
destination: './css/images'
|
||||
}))
|
||||
.use(copy({
|
||||
files: [
|
||||
join(config.paths.leaflet, 'leaflet.js'),
|
||||
join(config.paths.leaflet, 'leaflet.js.map')
|
||||
],
|
||||
destination: './js'
|
||||
}))
|
||||
.use(groff({
|
||||
macroPackages: ['mm', 'tinuage'],
|
||||
macroPaths: [join(config.paths.projectRoot, 'scripts/tmac')],
|
||||
|
Loading…
Reference in New Issue
Block a user