diff --git a/package-lock.json b/package-lock.json index ba42221..a22cdd9 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index 3f09258..54ba47d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fwdekker/template", - "version": "0.0.13", + "version": "0.0.14", "description": "The base template for pages on fwdekker.com.", "author": "Felix W. Dekker (https://fwdekker.com)", "license": "MIT", @@ -21,7 +21,8 @@ "dependencies": { "hyperscript": "^2.0.2", "milligram": "^1.3.0", - "normalize.css": "^8.0.1" + "normalize.css": "^8.0.1", + "npm-check-updates": "^6.0.1" }, "devDependencies": { "css-loader": "^3.5.3", @@ -31,7 +32,7 @@ "grunt-focus": "^1.0.0", "grunt-webpack": "^3.1.3", "style-loader": "^1.2.1", - "webpack": "^4.42.1", + "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } } diff --git a/src/main/js/Template.js b/src/main/js/Template.js index 0bb34a0..33efcfb 100644 --- a/src/main/js/Template.js +++ b/src/main/js/Template.js @@ -77,14 +77,14 @@ const unpackEntry = function (entry) { /** * Creates a header element with the given title and description. * - * @param title {string} the title to display, possibly including HTML + * @param [title] {string} the title to display, possibly including HTML * @param [description] {string} the description to display, possibly including HTML * @returns {HTMLElement} a header element */ export const header = function ({title, description}) { return h("header.header", h("section.container", - h("h1", {innerHTML: title}), + title !== undefined ? h("h1", {innerHTML: title}) : undefined, description !== undefined ? h("p", h("em", {innerHTML: description})) : undefined ) );