Commit 8df81db1 authored by Jim Tittsler's avatar Jim Tittsler

Template:PDF rewrite

Handling Template:PDF #25 can be much more succinct
now that 4c76b67e handles WikiEducator-relative URLs
parent 4c76b67e
......@@ -282,8 +282,8 @@ function processPage(pi) {
$(this).attr("href", urls[orig]);
} else {
// other WikiEducator relative pages that are not in the outline
if (orig && orig.indexOf('//') === -1) {
$(this).attr("href", '//wikieducator.org' + orig);
if (orig && orig.indexOf("//") === -1) {
$(this).attr("href", "//wikieducator.org" + orig);
}
}
});
......
......@@ -314,8 +314,8 @@ function processPage(pi) {
$(this).attr("href", urls[orig]);
} else {
// other WikiEducator relative pages that are not in the outline
if (orig && orig.indexOf('//') === -1) {
$(this).attr("href", '//wikieducator.org' + orig);
if (orig && orig.indexOf("//") === -1) {
$(this).attr("href", "//wikieducator.org" + orig);
}
}
});
......
{
"name": "wecourse",
"version": "0.9.8",
"version": "0.9.9",
"author": "Jim Tittsler <jim@oerfoundation.org>",
"description": "build a static course from WikiEducator open resources",
"keywords": [
......
......@@ -473,12 +473,7 @@ module.exports = {
.find("img")
.not(".pedagogicalicon")
.addClass("img-responsive");
// Template:Pdf has some special cases
$(".pdfdown").each(function() {
// override Bootstrap's img block
$(this)
.find('img[alt="PDF down.png"]')
.attr("style", "display: inline-block;");
});
// override Bootstrap's img block in Template:Pdf
$('.pdfdown img[alt="PDF down.png"]').css("display", "inline-block");
}
};
......@@ -433,13 +433,8 @@ ${idbody}
$('a[href^="/Special"]').each(function() {
$(this).attr("href", "http://WikiEducator.org" + $(this).attr("href"));
});
// Template:Pdf has some special cases
$(".pdfdown").each(function() {
// override Bootstrap's img block
$(this)
.find('img[alt="PDF down.png"]')
.attr("style", "display: inline-block;");
});
// override Bootstrap's img block in Template:Pdf
$('.pdfdown img[alt="PDF down.png"]').css("display", "inline-block");
// use WEnotes plugin
$(".WEnotes").each(function() {
var tag = $(this).data("tag"),
......
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