Commit 37848691 authored by Jim Tittsler's avatar Jim Tittsler

WP: Make --logo and --link optional, with no default value

Closes #6
parent 1bc157d2
......@@ -26,11 +26,11 @@ These sample scripts require [Node.js](https://nodejs.org/en/) 4.0.x or greater
>
> Then use nvm to install a recent version of [node.js](https://nodejs.org/en/):
>
> `nvm install v4.2.0`
> `nvm install v4.2.1`
>
> For future invocations now that Node.js is installed, you merely
> need to tell your shell which version to use with
> `nvm use v4.2.0`
> `nvm use v4.2.1`
1. git clone https://bitbucket.org/wikieducator/course.git
2. cd course
......
......@@ -39,8 +39,8 @@ var pages = [], // list of page URLs to be processed
Options:
-b BRAND, --brand=BRAND Menubar brand [default: OCL4Ed].
-l LOGO, --logo=LOGO Institution logo [default: OERu.png].
-k LOGOLINK, --link=LOGOLINK Institution link [default: http://OERu.org/].
-l LOGO, --logo=LOGO Institution logo
-k LOGOLINK, --link=LOGOLINK Institution link
-t THEME, --theme=THEME Desired theme [default: default].
-u URLPREFIX, --urlprefix=URLPREFIX Filesystem URL component.
-p, --prevnext Include previous/next links.
......
......@@ -39,8 +39,8 @@ var pages = [], // list of page URLs to be processed
Options:
-b BRAND, --brand=BRAND Menubar brand [default: OCL4Ed].
-l LOGO, --logo=LOGO Institution logo [default: OERu.png].
-k LOGOLINK, --link=LOGOLINK Institution link [default: http://OERu.org/].
-l LOGO, --logo=LOGO Institution logo
-k LOGOLINK, --link=LOGOLINK Institution link
-t THEME, --theme=THEME Desired theme [default: default].
-u URLPREFIX, --urlprefix=URLPREFIX Filesystem URL component.
-p, --prevnext Include previous/next links.
......@@ -59,6 +59,7 @@ Options:
`;
opt = docopt(doc, {version: VERSION});
console.log(`========================= ${(new Date()).toJSON()} =========================`);
console.log(opt);
if (opt['--theme']) {
theme = require('./themes/' + opt['--theme']);
......
......@@ -36,8 +36,10 @@ module.exports = {
.replace('/icons/', '/buttons/');
var footerlogo = '';
if (opt['--logo']) {
footerlogo = `<a href="${opt['--link']}">
<img src="${opt['--logo']}" alt="institution logo" style="float: right;"></a>`;
footerlogo = `<img src="${opt['--logo']}" alt="institution logo" style="float: right;">`;
if (opt['--link']) {
footerlogo = `<a href="${opt['--link']}">${footerlogo}</a>`;
}
}
$('.printfooter').remove();
$('body').append(`
......
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