Prep for Publication - WIP

This commit is contained in:
Ruben van de Ven 2020-03-10 09:05:17 +01:00
parent 90822d761a
commit 9e8ea3803a
2 changed files with 27 additions and 3 deletions

View file

@ -121,7 +121,7 @@ class CocoCanvas {
}.bind(this)); }.bind(this));
} }
loadNav() { loadNav() {
let r = new Request('/categories.json'); let r = new Request('categories.json');
fetch(r) fetch(r)
.then(response => response.json()) .then(response => response.json())
.then(categories => { .then(categories => {
@ -183,7 +183,7 @@ class CocoCanvas {
} }
requestAnnotation(category_id) { 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) return fetch(r)
.then(response => response.json()) .then(response => response.json())
.then(annotation => { .then(annotation => {
@ -352,7 +352,7 @@ class CocoCanvas {
'scene': this.sceneSelectEl.value, 'scene': this.sceneSelectEl.value,
'annotations': annotations 'annotations': annotations
}); });
let r = new Request('/save', {'method': 'POST', 'body': data}); let r = new Request('save', {'method': 'POST', 'body': data});
fetch(r) fetch(r)
.then(response => response.json()) .then(response => response.json())
.then(submission => { .then(submission => {

View file

@ -1,9 +1,33 @@
<html> <html>
<head> <head>
<meta charset='utf-8'> <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"> <link rel="stylesheet" type="text/css" href="coco.css">
</head> </head>
<body> <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 id='catNav' class='catNav'>
</nav> </nav>
<nav id='catNav2' class='catNav'> <nav id='catNav2' class='catNav'>