summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-12-16 22:35:49 +0100
committerJules Laplace <julescarbon@gmail.com>2018-12-16 22:35:49 +0100
commitf968f0e4bcc6e195eb293c4e2b965e8879075d8b (patch)
treed8c0c09787df4bcabc81e438c420075119f007a4
parentf9e4b621c9daf66a599c28481b3bf59926144461 (diff)
ok
-rw-r--r--client/index.js8
-rw-r--r--client/tables.js2
-rw-r--r--site/assets/css/applets.css7
-rw-r--r--webpack.config.prod.js2
4 files changed, 14 insertions, 5 deletions
diff --git a/client/index.js b/client/index.js
index 90fc22e1..2beb5526 100644
--- a/client/index.js
+++ b/client/index.js
@@ -69,7 +69,8 @@ function runApplets() {
dataset = null
url = opt
} else if (opt.indexOf('assets') === 0) {
- url = 'https://nyc3.digitaloceanspaces.com/megapixels/v1' + window.location.pathname + opt
+ let pathname = window.location.pathname.replace('index.html', '')
+ url = 'https://nyc3.digitaloceanspaces.com/megapixels/v1' + pathname + opt
dataset = null
// console.log(url)
} else {
@@ -80,7 +81,10 @@ function runApplets() {
if (!dataset && !url) {
const path = window.location.pathname.split('/').filter(s => !!s)
if (path.length) {
- dataset = path[path.length - 1]
+ dataset = path.pop()
+ if (dataset === 'index.html') {
+ dataset = path.pop()
+ }
// console.log('dataset from path:', dataset)
} else {
console.log('couldnt determine citations dataset')
diff --git a/client/tables.js b/client/tables.js
index b2b3d39c..2a2699f9 100644
--- a/client/tables.js
+++ b/client/tables.js
@@ -68,7 +68,7 @@ export default function append(el, payload) {
table.setData(data)
el.classList.add('loaded')
} catch (e) {
- console.error("error parsing json:", payload.url)
+ console.error("error making json:", payload.url)
console.error(e)
// console.log(text)
}
diff --git a/site/assets/css/applets.css b/site/assets/css/applets.css
index 2b531908..54508f44 100644
--- a/site/assets/css/applets.css
+++ b/site/assets/css/applets.css
@@ -22,6 +22,11 @@
}
.cta {
padding-left: 20px;
+ font-size: 11pt;
+}
+.cta ol {
+ margin: 0;
+ padding: 0 0 20px 20px;
}
.uploadContainer > div {
position: relative;
@@ -49,4 +54,4 @@
}
.uploadContainer img {
max-width: 40px;
-} \ No newline at end of file
+}
diff --git a/webpack.config.prod.js b/webpack.config.prod.js
index 69bc63ec..b9d3f411 100644
--- a/webpack.config.prod.js
+++ b/webpack.config.prod.js
@@ -10,7 +10,7 @@ module.exports = {
main: './client/index.js',
},
output: {
- path: path.resolve(__dirname, 'dist'),
+ path: path.resolve(__dirname, 'site/assets/js/dist'),
filename: 'index.js',
},
plugins: [