diff --git a/package.json b/package.json index 6fb79a7..dba7bce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fwdekker/template", - "version": "0.0.9", + "version": "0.0.10", "description": "The base template for pages on fwdekker.com.", "author": "Felix W. Dekker (https://fwdekker.com)", "license": "MIT", diff --git a/src/main/css/common.css b/src/main/css/common.css index f5878ea..43f846f 100644 --- a/src/main/css/common.css +++ b/src/main/css/common.css @@ -1,14 +1,17 @@ +/* Variables */ :root { --fwdekker-theme-color: #0033cc; --fwdekker-theme-color-dark: #00279d; } + +/* Base elements */ html { height: 100%; } body { - position: relative; + position: relative; /* Required for footer positioning */ min-height: 100%; } @@ -27,6 +30,12 @@ body { } +/* Custom styling */ +header .container { + text-align: center; +} + + /* Make arrow next to dropdown visible */ select { -webkit-appearance: menulist; diff --git a/src/main/js/Template.js b/src/main/js/Template.js index 0a64ee6..4a6246d 100644 --- a/src/main/js/Template.js +++ b/src/main/js/Template.js @@ -71,15 +71,15 @@ export const nav = function () { /** * Creates a header element with the given title and description. * - * @param title {string} the title to display - * @param description {string} the description to display + * @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", title), - h("p", h("em", description)) + h("h1", {innerHTML: title}), + description !== undefined ? h("p", h("em", {innerHTML: description})) : undefined ) ); };