symbols!
This commit is contained in:
10
dist/wikimaptotal.js
vendored
10
dist/wikimaptotal.js
vendored
@@ -4932,7 +4932,7 @@ var wikimap = (function (exports) {
|
|||||||
seconds = date.getUTCSeconds(),
|
seconds = date.getUTCSeconds(),
|
||||||
milliseconds = date.getUTCMilliseconds();
|
milliseconds = date.getUTCMilliseconds();
|
||||||
return isNaN(date) ? "Invalid Date"
|
return isNaN(date) ? "Invalid Date"
|
||||||
: formatYear(date.getUTCFullYear(), 4) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2)
|
: formatYear(date.getUTCFullYear()) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2)
|
||||||
+ (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z"
|
+ (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z"
|
||||||
: seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z"
|
: seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z"
|
||||||
: minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z"
|
: minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z"
|
||||||
@@ -5179,6 +5179,7 @@ var wikimap = (function (exports) {
|
|||||||
node_enter.append("use")
|
node_enter.append("use")
|
||||||
.attr("xlink:href", d => this.get_symbol(d, "default"))
|
.attr("xlink:href", d => this.get_symbol(d, "default"))
|
||||||
.attr("class", "testcolor");
|
.attr("class", "testcolor");
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// for (var i=0, l=d.cats.length; i<l; i++) {
|
// for (var i=0, l=d.cats.length; i<l; i++) {
|
||||||
// if (this.symbols[d.cats[i]]) {
|
// if (this.symbols[d.cats[i]]) {
|
||||||
@@ -5203,6 +5204,7 @@ var wikimap = (function (exports) {
|
|||||||
|
|
||||||
node.classed("active", d=>d.active);
|
node.classed("active", d=>d.active);
|
||||||
|
|
||||||
|
|
||||||
this.simulation
|
this.simulation
|
||||||
.nodes(graph.nodes)
|
.nodes(graph.nodes)
|
||||||
.on("tick", ticked);
|
.on("tick", ticked);
|
||||||
@@ -5225,6 +5227,10 @@ var wikimap = (function (exports) {
|
|||||||
node
|
node
|
||||||
.attr("transform", d => `translate(${d.x},${d.y})`);
|
.attr("transform", d => `translate(${d.x},${d.y})`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// document.querySelector("#page").style.background = "purple";
|
||||||
|
// return;
|
||||||
|
|
||||||
this.update_nodes();
|
this.update_nodes();
|
||||||
this.update_forces();
|
this.update_forces();
|
||||||
// this.simulation.alphaTarget(0.3).restart();
|
// this.simulation.alphaTarget(0.3).restart();
|
||||||
@@ -5304,7 +5310,7 @@ var wikimap = (function (exports) {
|
|||||||
|
|
||||||
async load_json (source) {
|
async load_json (source) {
|
||||||
var data = await json(source);
|
var data = await json(source);
|
||||||
|
// console.log("got data!", data);
|
||||||
// index the nodes by title, init link-arity count
|
// index the nodes by title, init link-arity count
|
||||||
var index = {};
|
var index = {};
|
||||||
this.nodes_by_title = index;
|
this.nodes_by_title = index;
|
||||||
|
|||||||
198
img/symbols.svg
Normal file
198
img/symbols.svg
Normal file
@@ -0,0 +1,198 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="210mm"
|
||||||
|
height="297mm"
|
||||||
|
viewBox="0 0 210 297"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
inkscape:version="0.92.1 r15371"
|
||||||
|
sodipodi:docname="symbols.svg">
|
||||||
|
<defs
|
||||||
|
id="defs2" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="2.8284271"
|
||||||
|
inkscape:cx="216.47094"
|
||||||
|
inkscape:cy="1066.4499"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="704"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="27"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<g
|
||||||
|
id="g4669"
|
||||||
|
inkscape:export-xdpi="101.24"
|
||||||
|
inkscape:export-ydpi="101.24">
|
||||||
|
<g
|
||||||
|
style="stroke:#606060;stroke-opacity:1"
|
||||||
|
transform="matrix(0.42450461,0,0,0.42450461,19.61278,7.9970163)"
|
||||||
|
id="g4600">
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#606060;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 78.937409,12.378389 h 12.06565"
|
||||||
|
id="path4572"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#606060;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 78.937409,15.438998 h 12.06565"
|
||||||
|
id="path4572-6"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#606060;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 78.859443,18.646139 h 12.06565"
|
||||||
|
id="path4572-2"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
<rect
|
||||||
|
y="10.81856"
|
||||||
|
x="51.903004"
|
||||||
|
height="7.5269685"
|
||||||
|
width="7.5269685"
|
||||||
|
id="rect4602"
|
||||||
|
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g4676"
|
||||||
|
inkscape:export-xdpi="101.24"
|
||||||
|
inkscape:export-ydpi="101.24">
|
||||||
|
<g
|
||||||
|
inkscape:transform-center-y="-1.5700831"
|
||||||
|
inkscape:transform-center-x="-1.6012813"
|
||||||
|
inkscape:export-ydpi="71.145638"
|
||||||
|
inkscape:export-xdpi="71.145638"
|
||||||
|
transform="matrix(0.43229192,0,0,0.43229192,17.802805,7.5991505)"
|
||||||
|
id="g4513-7">
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#606060;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 98.928194,14.954166 6.198716,-3.578827 5.9449,3.432289"
|
||||||
|
id="path4487-5"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
inkscape:export-xdpi="71.145638"
|
||||||
|
inkscape:export-ydpi="71.145638" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#606060;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 98.928194,18.014776 6.198716,-3.578828 5.9449,3.432289"
|
||||||
|
id="path4487-3-3"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
inkscape:export-xdpi="71.145638"
|
||||||
|
inkscape:export-ydpi="71.145638" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#606060;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 98.928194,21.075378 6.198716,-3.578827 5.9449,3.432289"
|
||||||
|
id="path4487-6-5"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
inkscape:export-xdpi="71.145638"
|
||||||
|
inkscape:export-ydpi="71.145638" />
|
||||||
|
</g>
|
||||||
|
<rect
|
||||||
|
y="10.81856"
|
||||||
|
x="59.429974"
|
||||||
|
height="7.5269685"
|
||||||
|
width="7.5269685"
|
||||||
|
id="rect4602-9"
|
||||||
|
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g4689"
|
||||||
|
inkscape:export-xdpi="101.24"
|
||||||
|
inkscape:export-ydpi="101.24">
|
||||||
|
<g
|
||||||
|
transform="matrix(0.41838874,0,0,0.41838874,27.098315,8.7927188)"
|
||||||
|
id="g4547">
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#606060;stroke-width:0.77449554;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path4539"
|
||||||
|
cx="121.70833"
|
||||||
|
cy="13.366666"
|
||||||
|
r="4.6106687" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#606060;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 124.78814,16.46054 2.66602,2.478925"
|
||||||
|
id="path4541"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
</g>
|
||||||
|
<rect
|
||||||
|
y="10.81856"
|
||||||
|
x="74.48391"
|
||||||
|
height="7.5269685"
|
||||||
|
width="7.5269685"
|
||||||
|
id="rect4602-1-2"
|
||||||
|
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g4683"
|
||||||
|
inkscape:export-xdpi="101.24"
|
||||||
|
inkscape:export-ydpi="101.24">
|
||||||
|
<rect
|
||||||
|
y="10.81856"
|
||||||
|
x="66.95694"
|
||||||
|
height="7.5269685"
|
||||||
|
width="7.5269685"
|
||||||
|
id="rect4602-1"
|
||||||
|
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<g
|
||||||
|
inkscape:transform-center-y="1.5700833"
|
||||||
|
inkscape:transform-center-x="1.6012835"
|
||||||
|
inkscape:export-ydpi="71.145638"
|
||||||
|
inkscape:export-xdpi="71.145638"
|
||||||
|
transform="matrix(-0.43229191,0,0,-0.43229191,116.11108,21.564937)"
|
||||||
|
id="g4513-7-7">
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#606060;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 98.928194,14.954166 6.198716,-3.578827 5.9449,3.432289"
|
||||||
|
id="path4487-5-0"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
inkscape:export-xdpi="71.145638"
|
||||||
|
inkscape:export-ydpi="71.145638" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#606060;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 98.928194,18.014776 6.198716,-3.578828 5.9449,3.432289"
|
||||||
|
id="path4487-3-3-9"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
inkscape:export-xdpi="71.145638"
|
||||||
|
inkscape:export-ydpi="71.145638" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#606060;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 98.928194,21.075378 6.198716,-3.578827 5.9449,3.432289"
|
||||||
|
id="path4487-6-5-3"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
inkscape:export-xdpi="71.145638"
|
||||||
|
inkscape:export-ydpi="71.145638" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 7.7 KiB |
BIN
img/symhamburger.png
Normal file
BIN
img/symhamburger.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 332 B |
BIN
img/symsearch.png
Normal file
BIN
img/symsearch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 756 B |
BIN
img/symup.png
Normal file
BIN
img/symup.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 976 B |
136
index.html
136
index.html
@@ -1,80 +1,104 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title></title>
|
<title>erg - école de recherche graphique</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<link rel="stylesheet" type="text/css" href="style.css">
|
<link rel="stylesheet" type="text/css" href="style.css">
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
overflow: hidden;
|
margin: 0;
|
||||||
background: pink;
|
padding: 0;
|
||||||
}
|
background: #f1f2f3;
|
||||||
#map {
|
|
||||||
position: absolute;
|
|
||||||
left: 0; top: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 160vh;
|
|
||||||
z-index: 0;
|
|
||||||
background: gray;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
#map #radio {
|
|
||||||
position: absolute;
|
|
||||||
left: 10px;
|
|
||||||
bottom: 10px;
|
|
||||||
width: 360px;
|
|
||||||
height: 60px;
|
|
||||||
}
|
|
||||||
#map a {
|
|
||||||
position: relative;
|
|
||||||
left: 200px;
|
|
||||||
top: 200px;
|
|
||||||
}
|
|
||||||
#pagediv {
|
|
||||||
position: absolute;
|
|
||||||
left: 0; top: 0;
|
|
||||||
bottom: 0; right: 0;
|
|
||||||
z-index: 0;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* https://stackoverflow.com/questions/24859452/css-how-to-center-absolute-position-div-with-max-width-in-ie9-10-11 */
|
|
||||||
#page {
|
#page {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 60vh;
|
left: 0; right: 0; top: 0;
|
||||||
height: 100vh;
|
height: 160vh;
|
||||||
left: 0px;
|
|
||||||
right: 0px;
|
|
||||||
/*left: 80px; right: 80px;*/
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
#page iframe {
|
#page.touched {
|
||||||
width: 100%;
|
background: #444;
|
||||||
height: 100%;
|
}
|
||||||
border: none;
|
#bottompane {
|
||||||
|
position: absolute;
|
||||||
|
top: 60vh;
|
||||||
|
left: 0; right: 0;
|
||||||
|
height: 100vh;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
#bottompane #bottompage {
|
||||||
|
position: absolute;
|
||||||
|
left: 0; right: 0;
|
||||||
|
margin: 0 auto;
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
|
background: white;
|
||||||
|
border: 1px solid #E6E6E6;
|
||||||
|
border-radius: 10px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
height: 100%;
|
||||||
|
}
|
||||||
|
#bottompane #menubar {
|
||||||
|
height: 48px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
#wikiframediv {
|
||||||
|
position: absolute;
|
||||||
|
left: 0; top: 48px;
|
||||||
|
right: 0; bottom: 0;
|
||||||
|
}
|
||||||
|
#bottompane iframe {
|
||||||
|
border: none;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
#debug {
|
||||||
|
width: 300px;
|
||||||
|
font-size: 10px;
|
||||||
|
height: 8em;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
#cats {
|
#cats {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
svg {
|
||||||
|
position: absolute;
|
||||||
|
left: 0; top: 0; right: 0; bottom: 0;
|
||||||
|
}
|
||||||
|
#searchinput {
|
||||||
|
min-width: 220px;
|
||||||
|
font-family: "combinedregular";
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
#menubar {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#menubar img {
|
||||||
|
position: relative;
|
||||||
|
top: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="pagediv">
|
|
||||||
<div id="map">
|
|
||||||
<svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>
|
|
||||||
|
|
||||||
<!-- <div id="radio"><iframe width="100%" height="60" src="https://www.mixcloud.com/widget/iframe/?hide_cover=1&mini=1&feed=%2FErgote_Radio%2Fmagma-reclaim-the-climax-publication-exposition-documentation%2F" frameborder="0" ></iframe></div>
|
|
||||||
-->
|
|
||||||
</div>
|
|
||||||
<div id="page">
|
<div id="page">
|
||||||
|
<svg id="svg"></svg>
|
||||||
|
<pre id="debug" style="position: absolute; left: 10px; top: 10px; z-index:23"></pre>
|
||||||
|
<div id="bottompane">
|
||||||
|
<div id="bottompage">
|
||||||
|
<div id="menubar">
|
||||||
|
<span id="menu"><img src="img/symhamburger.png"></span>
|
||||||
|
<input id="searchinput" type="input" placeholder="école de recherche graphique" />
|
||||||
|
<label for="searchinput" id="search"><img src="img/symsearch.png"></label>
|
||||||
|
<img src="img/symup.png" />
|
||||||
|
</div>
|
||||||
|
<div id="wikiframediv">
|
||||||
<iframe id="wikiframe" src="/mw"></iframe>
|
<iframe id="wikiframe" src="/mw"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div id="cats" class="expanded">
|
<div id="cats" class="expanded">
|
||||||
<div class="ocontents">
|
<div class="ocontents">
|
||||||
<div class="contents">
|
<div class="contents">
|
||||||
@@ -88,6 +112,10 @@
|
|||||||
<div class="botright"><div class="thumb"></div></div>
|
<div class="botright"><div class="thumb"></div></div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
<script src="custom_scroller_menu.js"></script>
|
||||||
|
<script>
|
||||||
|
custom_scroller_menu(document.scrollingElement, document.getElementById("menubar"), document.getElementById("debug"));
|
||||||
|
</script>
|
||||||
<script type="text/javascript" src="dist/wikimaptotal.js"></script>
|
<script type="text/javascript" src="dist/wikimaptotal.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var svg = document.querySelector("#svg"),
|
var svg = document.querySelector("#svg"),
|
||||||
@@ -100,6 +128,7 @@
|
|||||||
current_title = null,
|
current_title = null,
|
||||||
loaded = false;
|
loaded = false;
|
||||||
|
|
||||||
|
|
||||||
window.addEventListener("resize", resize);
|
window.addEventListener("resize", resize);
|
||||||
function resize() {
|
function resize() {
|
||||||
var w = window,
|
var w = window,
|
||||||
@@ -110,9 +139,10 @@
|
|||||||
y = w.innerHeight|| e.clientHeight|| g.clientHeight;
|
y = w.innerHeight|| e.clientHeight|| g.clientHeight;
|
||||||
svg.setAttribute("width", x);
|
svg.setAttribute("width", x);
|
||||||
svg.setAttribute("height", y);
|
svg.setAttribute("height", y);
|
||||||
console.log("resize", x, y);
|
//console.log("resize", x, y);
|
||||||
}
|
}
|
||||||
resize();
|
resize();
|
||||||
|
|
||||||
// console.log("mediawikiapi", mediawikiapi);
|
// console.log("mediawikiapi", mediawikiapi);
|
||||||
var symbols = {
|
var symbols = {
|
||||||
"Orientations": "symbols.svg#Orientations",
|
"Orientations": "symbols.svg#Orientations",
|
||||||
@@ -125,10 +155,12 @@
|
|||||||
"default": "symbols.svg#Main"
|
"default": "symbols.svg#Main"
|
||||||
};
|
};
|
||||||
var map = new wikimap.SimpleMap(symbols);
|
var map = new wikimap.SimpleMap(symbols);
|
||||||
|
|
||||||
map.init_svg("#svg");
|
map.init_svg("#svg");
|
||||||
async function doload () {
|
async function doload () {
|
||||||
console.log("loading map");
|
console.log("loading map");
|
||||||
await map.load_json("sitemap.json");
|
await map.load_json("sitemap.json");
|
||||||
|
return;
|
||||||
console.log("loading categories");
|
console.log("loading categories");
|
||||||
await map.load_cats("cats.json", cats_contents);
|
await map.load_cats("cats.json", cats_contents);
|
||||||
console.log("LOADED!");
|
console.log("LOADED!");
|
||||||
@@ -166,6 +198,8 @@
|
|||||||
return "http://wiki.erg.be/mw/index.php/"+encodeURI(title.replace(/ /g, "_"));
|
return "http://wiki.erg.be/mw/index.php/"+encodeURI(title.replace(/ /g, "_"));
|
||||||
}
|
}
|
||||||
window.addEventListener("DOMContentLoaded", doload);
|
window.addEventListener("DOMContentLoaded", doload);
|
||||||
|
</script>
|
||||||
|
<noscript>
|
||||||
iframe.addEventListener("load", function () {
|
iframe.addEventListener("load", function () {
|
||||||
var href = strip_fragment(iframe.contentWindow.location.href);
|
var href = strip_fragment(iframe.contentWindow.location.href);
|
||||||
console.log("iframe loaded", href);
|
console.log("iframe loaded", href);
|
||||||
@@ -200,5 +234,5 @@
|
|||||||
// console.log("history", historycb.checked);
|
// console.log("history", historycb.checked);
|
||||||
map.set_show_history(historycb.checked);
|
map.set_show_history(historycb.checked);
|
||||||
})
|
})
|
||||||
</script>
|
</noscript>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ export class ForceNet {
|
|||||||
node_enter.append("use")
|
node_enter.append("use")
|
||||||
.attr("xlink:href", d => this.get_symbol(d, "default"))
|
.attr("xlink:href", d => this.get_symbol(d, "default"))
|
||||||
.attr("class", "testcolor");
|
.attr("class", "testcolor");
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// for (var i=0, l=d.cats.length; i<l; i++) {
|
// for (var i=0, l=d.cats.length; i<l; i++) {
|
||||||
// if (this.symbols[d.cats[i]]) {
|
// if (this.symbols[d.cats[i]]) {
|
||||||
@@ -152,6 +153,7 @@ export class ForceNet {
|
|||||||
|
|
||||||
node.classed("active", d=>d.active);
|
node.classed("active", d=>d.active);
|
||||||
|
|
||||||
|
|
||||||
this.simulation
|
this.simulation
|
||||||
.nodes(graph.nodes)
|
.nodes(graph.nodes)
|
||||||
.on("tick", ticked);
|
.on("tick", ticked);
|
||||||
@@ -174,6 +176,10 @@ export class ForceNet {
|
|||||||
node
|
node
|
||||||
.attr("transform", d => `translate(${d.x},${d.y})`);
|
.attr("transform", d => `translate(${d.x},${d.y})`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// document.querySelector("#page").style.background = "purple";
|
||||||
|
// return;
|
||||||
|
|
||||||
this.update_nodes();
|
this.update_nodes();
|
||||||
this.update_forces();
|
this.update_forces();
|
||||||
// this.simulation.alphaTarget(0.3).restart();
|
// this.simulation.alphaTarget(0.3).restart();
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export class SimpleMap {
|
|||||||
|
|
||||||
async load_json (source) {
|
async load_json (source) {
|
||||||
var data = await json(source);
|
var data = await json(source);
|
||||||
|
// console.log("got data!", data);
|
||||||
// index the nodes by title, init link-arity count
|
// index the nodes by title, init link-arity count
|
||||||
var index = {};
|
var index = {};
|
||||||
this.nodes_by_title = index;
|
this.nodes_by_title = index;
|
||||||
|
|||||||
93
style.css
93
style.css
@@ -1,33 +1,78 @@
|
|||||||
#content {
|
/* F O N T E S */
|
||||||
position: absolute;
|
@font-face {
|
||||||
left: 0; top: 0; right: 0; bottom: 0;
|
font-family: "Combined";
|
||||||
background: #EEE;
|
src: url('/typo/Combined/combined.otf');
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wiki {
|
@font-face {
|
||||||
position: absolute;
|
font-family: 'combinedregular';
|
||||||
left: 50%;
|
src: url('/typo/Combined/web/combined.eot');
|
||||||
right: 0;
|
src: url('/typo/Combined/web/combined.eot?#iefix') format('embedded-opentype'),
|
||||||
top: 0;
|
url('/typo/Combined/web/combined.woff2') format('woff2'),
|
||||||
bottom: 0;
|
url('/typo/Combined/web/combined.woff') format('woff'),
|
||||||
}
|
url('/typo/Combined/web/combined.ttf') format('truetype'),
|
||||||
#wiki iframe {
|
url('/typo/Combined/web/combined.svg#combinedregular') format('svg');
|
||||||
width: 100%;
|
font-weight: normal;
|
||||||
height: 100%;
|
font-style: normal;
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#controls {
|
@font-face {
|
||||||
position: absolute;
|
font-family: 'wremena';
|
||||||
z-index:10;
|
src: url('typo/Wremema/webfont/wremena_bold-webfont.woff2') format('woff2'),
|
||||||
bottom: 0;
|
url('typo/Wremema/webfont/wremena_bold-webfont.woff') format('woff'),
|
||||||
display: none;
|
url('typo/Wremema/webfont/wremena_bold-webfont.ttf') format('truetype'),
|
||||||
|
url('typo/Wremema/webfont/wremena_bold-webfont.svg#wremenabold') format('svg');
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'wremena';
|
||||||
|
src: url('typo/Wremema/webfont/wremena_regular-webfont.woff2') format('woff2'),
|
||||||
|
url('typo/Wremema/webfont/wremena_regular-webfont.woff') format('woff'),
|
||||||
|
url('typo/Wremema/webfont/wremena_regular-webfont.ttf') format('truetype'),
|
||||||
|
url('typo/Wremema/webfont/wremena_regular-webfont.svg#wremenaregular') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'wremena';
|
||||||
|
src: url('typo/Wremema/webfont/wremena_light-webfont.woff2') format('woff2'),
|
||||||
|
url('typo/Wremema/webfont/wremena_light-webfont.woff') format('woff'),
|
||||||
|
url('typo/Wremema/webfont/wremena_light-webfont.ttf') format('truetype'),
|
||||||
|
url('typo/Wremema/webfont/wremena_light-webfont.svg#wremenalight') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Coupeur Monospace Bold';
|
||||||
|
src: url('/typo/Coupeur/webfont/CoupeurMonospace-Bold.eot'); /* IE9 Compat Modes */
|
||||||
|
src: url('/typo/Coupeur/webfont/CoupeurMonospace-Bold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||||
|
url('/typo/Coupeur/webfont/CoupeurMonospace-Bold.woff') format('woff'), /* Modern Browsers */
|
||||||
|
url('/typo/Coupeur/webfont/CoupeurMonospace-Bold.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||||
|
url('/typo/Coupeur/webfont/CoupeurMonospace-Bold.svg#fcf36b8f65c0f0737cd36a2be6922659') format('svg'); /* Legacy iOS */
|
||||||
|
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Coupeur Monospace Normal';
|
||||||
|
src: url('/typo/Coupeur/webfont/CoupeurMonospace-Normal.eot'); /* IE9 Compat Modes */
|
||||||
|
src: url('/typo/Coupeur/webfont/CoupeurMonospace-Normal.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||||
|
url('/typo/Coupeur/webfont/CoupeurMonospace-Normal.woff') format('woff'), /* Modern Browsers */
|
||||||
|
url('/typo/Coupeur/webfont/CoupeurMonospace-Normal.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||||
|
url('/typo/Coupeur/webfont/CoupeurMonospace-Normal.svg#4b219f539d302a6ffd9fd41e2da16172') format('svg'); /* Legacy iOS */
|
||||||
|
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.links line {
|
.links line {
|
||||||
/*stroke: #aaa;*/
|
/*stroke: #aaa;*/
|
||||||
stroke: none;
|
stroke: none;
|
||||||
|
|||||||
Reference in New Issue
Block a user