Fix behaviour when no header args are given
This commit is contained in:
parent
e094cdcfa6
commit
c25ad1619d
|
@ -3,6 +3,9 @@ const path = require("path");
|
|||
module.exports = grunt => {
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON("package.json"),
|
||||
clean: {
|
||||
default: ["dist/"],
|
||||
},
|
||||
focus: {
|
||||
dev: {
|
||||
include: ["css", "js"],
|
||||
|
@ -53,6 +56,7 @@ module.exports = grunt => {
|
|||
},
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks("grunt-contrib-clean");
|
||||
grunt.loadNpmTasks("grunt-contrib-watch");
|
||||
grunt.loadNpmTasks("grunt-focus");
|
||||
grunt.loadNpmTasks("grunt-webpack");
|
||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@fwdekker/template",
|
||||
"version": "0.0.14",
|
||||
"version": "0.0.15",
|
||||
"description": "The base template for pages on fwdekker.com.",
|
||||
"author": "Felix W. Dekker (https://fwdekker.com)",
|
||||
"license": "MIT",
|
||||
|
@ -14,6 +14,7 @@
|
|||
},
|
||||
"browser": "dist/index.js",
|
||||
"scripts": {
|
||||
"clean": "grunt clean",
|
||||
"dev": "grunt dev",
|
||||
"dev:server": "grunt dev:server",
|
||||
"deploy": "grunt deploy"
|
||||
|
@ -28,6 +29,7 @@
|
|||
"css-loader": "^3.5.3",
|
||||
"grunt": "^1.1.0",
|
||||
"grunt-cli": "^1.3.2",
|
||||
"grunt-contrib-clean": "^2.0.0",
|
||||
"grunt-contrib-watch": "^1.1.0",
|
||||
"grunt-focus": "^1.0.0",
|
||||
"grunt-webpack": "^3.1.3",
|
||||
|
|
|
@ -82,6 +82,9 @@ const unpackEntry = function (entry) {
|
|||
* @returns {HTMLElement} a header element
|
||||
*/
|
||||
export const header = function ({title, description}) {
|
||||
if (title === undefined && description === undefined)
|
||||
return h("header.header");
|
||||
|
||||
return h("header.header",
|
||||
h("section.container",
|
||||
title !== undefined ? h("h1", {innerHTML: title}) : undefined,
|
||||
|
|
Loading…
Reference in New Issue