Browse Source

Prep for Publication - WIP

master
Ruben van de Ven 2 years ago
parent
commit
9e8ea3803a
  1. 6
      www/coco.js
  2. 24
      www/index.html

6
www/coco.js

@ -121,7 +121,7 @@ class CocoCanvas { @@ -121,7 +121,7 @@ class CocoCanvas {
}.bind(this));
}
loadNav() {
let r = new Request('/categories.json');
let r = new Request('categories.json');
fetch(r)
.then(response => response.json())
.then(categories => {
@ -183,7 +183,7 @@ class CocoCanvas { @@ -183,7 +183,7 @@ class CocoCanvas {
}
requestAnnotation(category_id) {
let r = new Request(`/annotation.json?category=${category_id}&normalise=100`);
let r = new Request(`annotation.json?category=${category_id}&normalise=100`);
return fetch(r)
.then(response => response.json())
.then(annotation => {
@ -352,7 +352,7 @@ class CocoCanvas { @@ -352,7 +352,7 @@ class CocoCanvas {
'scene': this.sceneSelectEl.value,
'annotations': annotations
});
let r = new Request('/save', {'method': 'POST', 'body': data});
let r = new Request('save', {'method': 'POST', 'body': data});
fetch(r)
.then(response => response.json())
.then(submission => {

24
www/index.html

@ -1,9 +1,33 @@ @@ -1,9 +1,33 @@
<html>
<head>
<meta charset='utf-8'>
<!-- Publication CSS: -->
<link rel="stylesheet" type="text/css" href="/a/css/main.css">
<!-- COCO CSS -->
<link rel="stylesheet" type="text/css" href="coco.css">
</head>
<body>
<nav id='publication'>
<a href="http://plottingd.at/a/introduction.html">
Introduction
</a>
<a href="http://plottingd.at/a/coco/" class='current'>
COCO
</a>
<a href="http://plottingd.at/a/enron/">
Enron
</a>
<a href="http://plottingd.at/a/20bn/">
Something-Something
</a>
<a href="http://plottingd.at/a/interviews.html">
Interviews
</a>
</nav>
<nav id='catNav' class='catNav'>
</nav>
<nav id='catNav2' class='catNav'>

Loading…
Cancel
Save