Commit 6f751dd2 authored by Matt Mascarenhas's avatar Matt Mascarenhas

cinera.c: Add support for alternative URL prefixes

This is hardcoded for now, for ease of use, pending the config system

Also add Medium to the ProjectInfo array, to save users having to set
this with -m (which option remains available to them)

Reorganise the CSS, Images and JS files back to their location in the
same directory, since a default invocation of the program assumes they
are in the same directory as the Root Directory, to hopefully alleviate
some potential user frustration thanks to the requirement to set their
locations (with -c, -i and -j) before any usable output is produced
parent f454e01e
This diff is collapsed.
......@@ -17,7 +17,7 @@ var rendering = false;
var dayContainerPrototype = document.createElement("DIV");
dayContainerPrototype.classList.add("dayContainer");
dayContainerPrototype.classList.add(projectID);
dayContainerPrototype.classList.add(theme);
var dayNamePrototype = document.createElement("SPAN");
dayNamePrototype.classList.add("dayName");
......@@ -25,7 +25,7 @@ dayContainerPrototype.appendChild(dayNamePrototype);
var markerListPrototype = document.createElement("DIV");
markerListPrototype.classList.add("markerList");
markerListPrototype.classList.add(projectID);
markerListPrototype.classList.add(theme);
dayContainerPrototype.appendChild(markerListPrototype);
var markerPrototype = document.createElement("A");
......@@ -206,7 +206,12 @@ xhr.addEventListener("load", function() {
episode = {};
mode = "none";
} else if (line.startsWith("name:")) {
episode.name = line.slice(6);
if(projectID != outputURLPrefix) {
episode.name = line.slice(6).replace(projectID, outputURLPrefix);
}
else {
episode.name = line.slice(6);
}
} else if (line.startsWith("title:")) {
episode.title = line.slice(7).replace(/"/g, "");
} else if (line.startsWith("markers")) {
......@@ -233,7 +238,7 @@ xhr.addEventListener("load", function() {
xhr.addEventListener("error", function() {
console.error("Failed to load content");
});
xhr.open("GET", indexLocation);
xhr.open("GET", projectID + ".index");
xhr.setRequestHeader("Content-Type", "text/plain");
xhr.send();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment