Make header title clickable

This commit is contained in:
Florine W. Dekker 2022-08-20 20:19:07 +02:00
parent 9592715507
commit bf1bfdc079
Signed by: FWDekker
GPG Key ID: D3DCFAA8A4560BE0
4 changed files with 7 additions and 3 deletions

BIN
package-lock.json generated

Binary file not shown.

View File

@ -1,6 +1,6 @@
{
"name": "@fwdekker/template",
"version": "2.7.0",
"version": "2.7.1",
"description": "The base template for pages on fwdekker.com.",
"author": "Florine W. Dekker",
"license": "MIT",
@ -35,7 +35,7 @@
"grunt-focus": "^1.0.0",
"grunt-webpack": "^5.0.0",
"ts-loader": "^9.3.1",
"ts-node": "^10.7.0",
"ts-node": "^10.9.1",
"typescript": "^4.7.4",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"

View File

@ -46,6 +46,10 @@ header .container {
text-align: center;
}
header h1 > a {
color: black;
}
/* Footer */
footer {

View File

@ -134,7 +134,7 @@ const header = function({title, description}) {
return stringToHtml(
`<header><section class="container">` +
(title !== undefined ? `<h1>${title}</h1>` : "") +
(title !== undefined ? `<h1><a href="./">${title}</a></h1>` : "") +
(description !== undefined ? `<p><em>${description}</em></p>` : "") +
`</section></header>`,
"header"