2020-06-06 00:03:37 +02:00
|
|
|
"use strict";
|
2016-05-21 11:48:23 +02:00
|
|
|
|
2020-06-06 00:03:37 +02:00
|
|
|
const views = require("../util/views.js");
|
2016-05-21 11:48:23 +02:00
|
|
|
|
2020-06-06 00:03:37 +02:00
|
|
|
const template = views.getTemplate("not-found");
|
2016-06-14 10:31:48 +02:00
|
|
|
|
2016-05-21 11:48:23 +02:00
|
|
|
class NotFoundView {
|
2016-06-14 10:31:48 +02:00
|
|
|
constructor(path) {
|
2020-06-06 00:03:37 +02:00
|
|
|
this._hostNode = document.getElementById("content-holder");
|
2016-05-21 11:48:23 +02:00
|
|
|
|
2020-06-06 00:03:37 +02:00
|
|
|
const sourceNode = template({ path: path });
|
2016-06-14 10:31:48 +02:00
|
|
|
views.replaceContent(this._hostNode, sourceNode);
|
2016-07-13 17:18:28 +02:00
|
|
|
views.syncScrollPosition();
|
2016-05-21 11:48:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = NotFoundView;
|