inverse link reso

This commit is contained in:
2018-09-18 19:23:09 +02:00
parent 52a5844ae8
commit 1c407a4328
17 changed files with 158 additions and 82 deletions
@@ -1,8 +1,11 @@
--- ---
title: title: Julien
image_align: left
id: '#Oceane'
content: content:
items: '@self.modular' items: '@self.modular'
order: order:
by: '' by: ''
dir: '' dir: ''
--- ---
+11
View File
@@ -0,0 +1,11 @@
---
title: Oceane
image_align: left
id: '#Oceane'
content:
items: '@self.modular'
order:
by: ''
dir: ''
---
@@ -36,10 +36,10 @@ form:
title: Coordonées title: Coordonées
fields: fields:
header.long:
type: text
label: Longitude
header.lat: header.lat:
type: text type: text
label: Latitude label: Latitude
header.long:
type: text
label: Longitude
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+17 -15
View File
@@ -5,13 +5,10 @@ function gestionarray() {
} }
function map() { function map() {
var mymap = L.map('mapid').setView([48.866667, 2.333333], 14); var mymap = L.map('mapid').setView([48.9267935,2.3569287], 16);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', { L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
maxZoom: 18, maxZoom: 18,
attribution: '<a href="https://www.openstreetmap.org/"></a>'
+ '<a href="https://creativecommons.org/licenses/by-sa/2.0/"></a>'
+ '<a href="https://www.mapbox.com/"></a>',
id: 'mapbox.streets' id: 'mapbox.streets'
}).addTo(mymap); }).addTo(mymap);
@@ -26,11 +23,12 @@ function map() {
for (var i = 0; i < dyn_data.mappoints.length; i++) { for (var i = 0; i < dyn_data.mappoints.length; i++) {
L.marker([dyn_data.mappoints[i].lat, dyn_data.mappoints[i].long], {icon: greenIcon}).bindPopup(dyn_data.mappoints[i].title).addTo(mymap); L.marker([dyn_data.mappoints[i].lat, dyn_data.mappoints[i].long], {icon: greenIcon}).bindPopup(dyn_data.mappoints[i].title).addTo(mymap);
// console.log("dyn_datad2", dyn_data.mappoints[i].title);
} }
}; };
function scrollbar(){ function scrollbar(){
$(window).on("load",function(){ $(window).on("load",function(){
$("#start > div > div").mCustomScrollbar({ $("#start > div > div").mCustomScrollbar({
@@ -142,15 +140,15 @@ function drag() {
$rs.css({ $rs.css({
"top": yPos2, "top": yPos2,
"left":xPos2, "bottom":0,
"width":PosHand,
"bottom":"1px",
"height": 'auto', "height": 'auto',
}) })
$links.css({ $links.css({
"top": yPos2, "top": yPos2,
"bottom":0, "left":xPos2,
"width":PosHand,
"bottom":"1px",
"height": 'auto', "height": 'auto',
}) })
@@ -257,16 +255,16 @@ function drag() {
}) })
$rs.css({ $rs.css({
"width":xPos,
"top": yPos2, "top": yPos2,
"width":PosHand1, "bottom":0,
"bottom":"1px",
"height": 'auto', "height": 'auto',
}) })
$links.css({ $links.css({
"width":xPos,
"top": yPos2, "top": yPos2,
"bottom":0, "width":PosHand1,
"bottom":"1px",
"height": 'auto', "height": 'auto',
}) })
@@ -307,8 +305,8 @@ function drag() {
}; };
function dragcanvas() { function dragcanvas() {
var $links = $('#links canvas'); var $links = $('#reseaux-sociaux canvas');
var $reseau = $('#reseaux-sociaux svg') var $reseau = $('#links svg')
$links.draggable({ $links.draggable({
// containment:"#start", // containment:"#start",
@@ -320,11 +318,15 @@ function dragcanvas() {
}); });
} }
function D3js() {
}
$(document).ready(function() { $(document).ready(function() {
// gestionarray(); // gestionarray();
clickhand(); clickhand();
drag(); drag();
dragcanvas(); dragcanvas();
map(); map();
D3js();
// scrollbar(); // scrollbar();
}); });
+13 -10
View File
@@ -1,11 +1,11 @@
var svg = d3.select("#reseaux-sociaux svg"), var svg = d3.select("#links svg"),
width = +svg.attr("width"), width = +svg.attr("width"),
height = +svg.attr("height"); height = +svg.attr("height");
var color = d3.scaleOrdinal(d3.schemeCategory20); var color = d3.scaleOrdinal(d3.schemeCategory20);
var simulation = d3.forceSimulation() var simulation = d3.forceSimulation()
.force("link", d3.forceLink().id(function(d) { return d.id; })) .force("link", d3.forceLink().distance(300).id(function(d) { return d.id; }))
.force("charge", d3.forceManyBody()) .force("charge", d3.forceManyBody())
.force("center", d3.forceCenter(width / 2, height / 2)); .force("center", d3.forceCenter(width / 2, height / 2));
@@ -19,13 +19,15 @@
.enter().append("line") .enter().append("line")
.attr("stroke-width", function(d) { return Math.sqrt(d.value); }); .attr("stroke-width", function(d) { return Math.sqrt(d.value); });
var node = svg.append("g") var node = svg.append("g")
.attr("class", "nodes") .attr("class", "nodes")
.selectAll("text") .selectAll("text")
.data(graph.nodes) .data(graph.nodes)
.enter().append("text") .enter().append("text")
.text(function(d) { return d.id; }) .text(function(d) { return d.id; })
.attr("fill", function(d) { return color(d.group); }) .attr("fill", function(d) { return color(d.group); })
.attr("id",function(d) { return d.identifiant; })
.attr("href",function(d) { return d.cible; })
.call(d3.drag() .call(d3.drag()
.on("start", dragstarted) .on("start", dragstarted)
.on("drag", dragged) .on("drag", dragged)
@@ -45,6 +47,7 @@
.attr("x2", function(d) { return d.target.x; }) .attr("x2", function(d) { return d.target.x; })
.attr("y2", function(d) { return d.target.y; }); .attr("y2", function(d) { return d.target.y; });
node node
.attr("x", function(d) { return d.x; }) .attr("x", function(d) { return d.x; })
.attr("y", function(d) { return d.y; }); .attr("y", function(d) { return d.y; });
+50 -32
View File
@@ -1,36 +1,34 @@
{ {
"nodes": [ "nodes": [
{"id": "Oceane", "group": 1}, {"identifiant":"qui_il_est", "cible": "ou_il_va", "id": "Oceane", "group": 1},
{"id": "Wiebke", "group": 1}, {"id": "Wiebke", "group": 1},
{"id": "Manon", "group": 1}, {"id": "Manon", "group": 1},
{"id": "Andreea", "group": 1}, {"id": "Andreea", "group": 1},
{"id": "Laurent", "group": 1}, {"id": "Laurent", "group": 1},
{"id": "Nadia", "group": 1}, {"id": "Nadia", "group": 1},
{"id": "Pascale", "group": 1}, {"id": "Pascale", "group": 1},
{"id": "Mireille", "group": 1},
{"id": "Martine", "group": 1}, {"id": "Martine", "group": 1},
{"id": "Line", "group": 1}, {"id": "Line", "group": 1},
{"id": "Bachir", "group": 2}, {"id": "Julien", "group": 1},
{"id": "Julien", "group": 2}, {"id": "Marie.W", "group": 1},
{"id": "Marie.W", "group": 3}, {"id": "Solen", "group": 1},
{"id": "Solen", "group": 2}, {"id": "Olivier", "group": 1},
{"id": "Olivier", "group": 2}, {"id": "Elodie", "group":1},
{"id": "Elodie", "group": 2}, {"id": "Loyce", "group": 1},
{"id": "Loyce", "group": 3}, {"id": "Marie.P", "group": 1},
{"id": "Marie.P", "group": 3}, {"id": "Victoria", "group": 1},
{"id": "Victoria", "group": 3}, {"id": "Attieke", "group": 1},
{"id": "Attieke", "group": 3}, {"id": "Kabane", "group": 1},
{"id": "Kabane", "group": 3}, {"id": "Paris 8", "group":2},
{"id": "Paris 8", "group": 3}, {"id": "La fabrique des sociologies", "group": 2},
{"id": "La fabrique des sociologies", "group": 3}, {"id": "Synesthesie", "group": 2},
{"id": "Synesthesie", "group": 3}, {"id": "Maison jaune", "group": 2},
{"id": "Maison jaune", "group": 4}, {"id": "Cooperence", "group": 2},
{"id": "Cooperence", "group": 4}, {"id": "Jardin Haguette", "group": 2},
{"id": "Jardin Haguette", "group": 5}, {"id": "Tricot partage", "group": 2},
{"id": "Tricot partage", "group": 4}, {"id": "Amap Court-circuit", "group": 2},
{"id": "Amap Court-circuit", "group": 0},
{"id": "Clinamen", "group": 2}, {"id": "Clinamen", "group": 2},
{"id": "Briche", "group": 3}, {"id": "Briche", "group": 2},
{"id": "Academie Fratellini", "group": 2}, {"id": "Academie Fratellini", "group": 2},
{"id": "Point carre", "group": 2}, {"id": "Point carre", "group": 2},
{"id": "Franciade", "group": 2}, {"id": "Franciade", "group": 2},
@@ -39,13 +37,23 @@
{"id": "Le 6B", "group": 2}, {"id": "Le 6B", "group": 2},
{"id": "Adada", "group": 2}, {"id": "Adada", "group": 2},
{"id": "Artefact 93", "group": 2}, {"id": "Artefact 93", "group": 2},
{"id": "Landykadi", "group": 4}, {"id": "Landykadi", "group": 2},
{"id": "Rien ne se perd", "group": 4}, {"id": "Rien ne se perd", "group": 2},
{"id": "Shakti 21", "group": 4}, {"id": "Shakti 21", "group": 2},
{"id": "Cop'Billon", "group": 4}, {"id": "Cop'Billon", "group": 2},
{"id": "Street mamies", "group": 4}, {"id": "Street mamies", "group": 2},
{"id": "L'oasis", "group": 4}, {"id": "L'oasis", "group": 2},
{"id": "Rajganawak", "group": 4} {"id": "Diony's voice", "group": 3},
{"id": "Scouts de St Denis", "group": 3},
{"id": "Cinéma Ecran 93", "group": 3},
{"id": "Crêperie la Bigoudène", "group": 3},
{"id": "Jardin Chez Basile", "group": 3},
{"id": "Rajganawak", "group": 2},
{"id": "YAKA", "group": 2},
{"id": "Le Pavillon", "group": 2},
{"id": "Chorale du Jazz Club", "group": 2},
{"id": "La maison des seniors", "group": 2},
{"id": "Théâtre Gérard-Philipe", "group": 3}
], ],
"links": [ "links": [
@@ -59,11 +67,14 @@
{"source": "Oceane", "target": "Cop'Billon", "value": 1}, {"source": "Oceane", "target": "Cop'Billon", "value": 1},
{"source": "Oceane", "target": "Street mamies", "value": 1}, {"source": "Oceane", "target": "Street mamies", "value": 1},
{"source": "Street mamies", "target": "Cop'Billon", "value": 1}, {"source": "Street mamies", "target": "Cop'Billon", "value": 1},
{"source": "Olivier", "target": "Chorale du Jazz Club", "value": 1},
{"source": "Landykadi", "target": "Dechets d'art", "value": 1}, {"source": "Landykadi", "target": "Dechets d'art", "value": 1},
{"source": "Landykadi", "target": "Collectif Mund Gawi", "value": 1}, {"source": "Landykadi", "target": "Collectif Mund Gawi", "value": 1},
{"source": "Laurent", "target": "Le 6B", "value": 1}, {"source": "Laurent", "target": "Le 6B", "value": 1},
{"source": "Laurent", "target": "Collectif Mund Gawi", "value": 1}, {"source": "Laurent", "target": "Collectif Mund Gawi", "value": 1},
{"source": "Shakti 21", "target": "Collectif Mund Gawi", "value": 1}, {"source": "Shakti 21", "target": "Collectif Mund Gawi", "value": 1},
{"source": "Shakti 21", "target": "Le 6B", "value": 1},
{"source": "Dechets d'art", "target": "Le 6B", "value": 1},
{"source": "Rien ne se perd", "target": "Collectif Mund Gawi", "value": 1}, {"source": "Rien ne se perd", "target": "Collectif Mund Gawi", "value": 1},
{"source": "Artefact 93", "target": "Dechets d'art", "value":1}, {"source": "Artefact 93", "target": "Dechets d'art", "value":1},
{"source": "Artefact 93", "target": "Franciade", "value": 1}, {"source": "Artefact 93", "target": "Franciade", "value": 1},
@@ -87,7 +98,6 @@
{"source": "Nadia", "target": "Pascale", "value": 1}, {"source": "Nadia", "target": "Pascale", "value": 1},
{"source": "Tricot partage", "target": "Pascale", "value": 1}, {"source": "Tricot partage", "target": "Pascale", "value": 1},
{"source": "Pascale", "target": "Maison jaune", "value": 1}, {"source": "Pascale", "target": "Maison jaune", "value": 1},
{"source": "Pascale", "target": "Mireille", "value": 1},
{"source": "Jardin Haguette", "target": "Martine", "value": 1}, {"source": "Jardin Haguette", "target": "Martine", "value": 1},
{"source": "Martine", "target": "Paris 8", "value": 1}, {"source": "Martine", "target": "Paris 8", "value": 1},
{"source": "Paris 8", "target": "Marie.W", "value": 1}, {"source": "Paris 8", "target": "Marie.W", "value": 1},
@@ -112,13 +122,21 @@
{"source": "Synesthesie", "target": "Julien", "value": 1}, {"source": "Synesthesie", "target": "Julien", "value": 1},
{"source": "Synesthesie", "target": "Marie.P", "value": 1}, {"source": "Synesthesie", "target": "Marie.P", "value": 1},
{"source": "Synesthesie", "target": "Maison jaune", "value": 1}, {"source": "Synesthesie", "target": "Maison jaune", "value": 1},
{"source": "Synesthesie", "target": "Bachir", "value": 1},
{"source": "Elodie", "target": "Julien", "value": 1}, {"source": "Elodie", "target": "Julien", "value": 1},
{"source": "Elodie", "target": "Loyce", "value": 1}, {"source": "Elodie", "target": "Loyce", "value": 1},
{"source": "Elodie", "target": "Line", "value": 1}, {"source": "Elodie", "target": "Line", "value": 1},
{"source": "Line", "target": "Julien", "value": 1}, {"source": "Line", "target": "Julien", "value": 1},
{"source": "Line", "target": "Loyce", "value": 1}, {"source": "Line", "target": "Loyce", "value": 1},
{"source": "Marie.P", "target": "Loyce", "value": 1},
{"source": "Julien", "target": "Loyce", "value": 1}, {"source": "Julien", "target": "Loyce", "value": 1},
{"source": "Victoria", "target": "Marie.P", "value": 1} {"source": "Victoria", "target": "Marie.P", "value": 1},
{"source": "Olivier", "target": "YAKA", "value": 1},
{"source": "Solen", "target": "YAKA", "value": 1},
{"source": "Cooperence", "target": "YAKA", "value": 1},
{"source": "Le Pavillon", "target": "Marie.W", "value": 1},
{"source": "Le Pavillon", "target": "Manon", "value": 1},
{"source": "Le Pavillon", "target": "Solen", "value": 1},
{"source": "La maison des seniors", "target": "Dechets d'art", "value": 1},
{"source": "La fabrique des sociologies", "target": "Martine", "value": 1}
] ]
} }
@@ -1,3 +0,0 @@
#page{
// margin: 0 25px;
}
+12 -4
View File
@@ -48,6 +48,7 @@ body{
width: $W33; width: $W33;
min-width: 200px; min-width: 200px;
height: $H50-25; height: $H50-25;
z-index: 998;
&:nth-child(3n+2){ &:nth-child(3n+2){
left: -2px; left: -2px;
} }
@@ -76,7 +77,7 @@ body{
} }
} }
#links{ #reseaux-sociaux{
canvas[resize] { canvas[resize] {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
@@ -92,13 +93,20 @@ body{
} }
} }
} }
#reseaux-sociaux{ #links{
z-index: 997!important;
display: flex;
svg{ svg{
// width: 100vw; position: fixed;
// height: 100vh; top: -33%;
left: -55%;
} }
} }
#streetmap{ #streetmap{
#mapid{
filter: grayscale(100%) contrast(1);
}
& > div:nth-of-type(1){ & > div:nth-of-type(1){
height: 100%; height: 100%;
} }
@@ -6,7 +6,7 @@
{% for module in page.collection %} {% for module in page.collection %}
<div id="{{ _self.pageLinkName(module.folder)|replace({"0":"", "1":"", "2":"", "3":"", "4":"", "5":"", "6":"", "7":"", "8":"", "9":"", ".":"","_":"" }) }}"> <div id="{{ _self.pageLinkName(module.folder)|replace({"0":"", "1":"", "2":"", "3":"", "4":"", "5":"", "6":"", "7":"", "8":"", "9":"", ".":"","_":"" }) }}">
{{ module.content }} {{ module.content }}
<canvas id="canvas" resize hidpi="on" style="background:white"></canvas>
</div> </div>
{% endfor %} {% endfor %}
<svg width="3960" height="2160" resize hidpi="on"></svg>
{% endblock %} {% endblock %}
@@ -4,9 +4,8 @@
{% block body %} {% block body %}
{% for module in page.collection %} {% for module in page.collection %}
<div id="{{ module.header.id }}">
{{ module.content }} {{ module.content }}
<svg width="500" height="500"></svg> <canvas id="canvas" resize hidpi="on" style="background:white"></canvas>
</div>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
@@ -4,10 +4,6 @@
{% block body %} {% block body %}
<div id="mapid"></div> <div id="mapid"></div>
{% for module in page.collection %} {% for module in page.collection %}{% endfor %}
<div id="{{module.header.id}} {{module.header.lat}} {{module.header.long}}">
{{ module.content }}
</div>
{% endfor %}
{% endblock %} {% endblock %}
@@ -0,0 +1,33 @@
title: Text
'@extends': default
form:
fields:
tabs:
fields:
content:
fields:
header.media_order:
label: Page Media (first one will be displayed next to your content)
header.image_align:
type: select
label: Image position
classes: fancy
default: left
options:
'left': 'Left'
'right': 'Right'
options:
fields:
identifiant:
type: section
title: Identifiant
fields:
header.id:
type: text
label: Id
multiple: true