Add option to link to privacy policy in footer
This commit is contained in:
parent
1b6488fc4a
commit
5d105387fd
|
@ -29,6 +29,8 @@ $> npm run deploy
|
||||||
```shell script
|
```shell script
|
||||||
# Log in to npm
|
# Log in to npm
|
||||||
$> npm login
|
$> npm login
|
||||||
|
# Build before publishing
|
||||||
|
$> npm run prepare
|
||||||
# Push to npm
|
# Push to npm
|
||||||
$> npm publish --access public
|
$> npm publish --access public
|
||||||
```
|
```
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@fwdekker/template",
|
"name": "@fwdekker/template",
|
||||||
"version": "0.0.20",
|
"version": "0.0.21",
|
||||||
"description": "The base template for pages on fwdekker.com.",
|
"description": "The base template for pages on fwdekker.com.",
|
||||||
"author": "Felix W. Dekker (https://fwdekker.com)",
|
"author": "Felix W. Dekker (https://fwdekker.com)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -29,8 +29,8 @@
|
||||||
"normalize.css": "^8.0.1"
|
"normalize.css": "^8.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"css-loader": "^4.2.0",
|
"css-loader": "^4.3.0",
|
||||||
"grunt": "^1.2.1",
|
"grunt": "^1.3.0",
|
||||||
"grunt-cli": "^1.3.2",
|
"grunt-cli": "^1.3.2",
|
||||||
"grunt-contrib-clean": "^2.0.0",
|
"grunt-contrib-clean": "^2.0.0",
|
||||||
"grunt-contrib-watch": "^1.1.0",
|
"grunt-contrib-watch": "^1.1.0",
|
||||||
|
|
|
@ -110,21 +110,33 @@ export const header = function ({title, description}) {
|
||||||
/**
|
/**
|
||||||
* Creates a footer element with the given data.
|
* Creates a footer element with the given data.
|
||||||
*
|
*
|
||||||
* @param [author] {string} the author
|
* @param [author] {string|undefined} the author
|
||||||
* @param [authorURL] {string} the URL to link the author's name to
|
* @param [authorURL] {string|undefined} the URL to link the author's name to
|
||||||
* @param [license] {string} the type of license
|
* @param [license] {string|undefined} the type of license
|
||||||
* @param [licenseURL] {string} the URL to the license file
|
* @param [licenseURL] {string|undefined} the URL to the license file
|
||||||
* @param [vcs] {string} the type of version control
|
* @param [vcs] {string|undefined} the type of version control
|
||||||
* @param [vcsURL] {string} the URL to the repository
|
* @param [vcsURL] {string|undefined} the URL to the repository
|
||||||
* @param [version] {string} the page version
|
* @param [version] {string|undefined} the page version
|
||||||
|
* @param [privacyPolicyURL] {string|null|undefined} the URL to the privacy policy, or `null` if there should be no
|
||||||
|
* privacy policy, or `undefined` if the default privacy policy should be used
|
||||||
* @returns {HTMLElement} a footer element
|
* @returns {HTMLElement} a footer element
|
||||||
*/
|
*/
|
||||||
export const footer = function ({author, authorURL, license, licenseURL, vcs, vcsURL, version}) {
|
export const footer = function (
|
||||||
|
{
|
||||||
|
author, authorURL, license, licenseURL, vcs, vcsURL, version,
|
||||||
|
privacyPolicyURL = undefined
|
||||||
|
}) {
|
||||||
return h("footer.footer",
|
return h("footer.footer",
|
||||||
h("section.container",
|
h("section.container",
|
||||||
footerLink("Made by ", author, authorURL, ". "),
|
footerLink("Made by ", author, authorURL, ". "),
|
||||||
footerLink("Licensed under the ", license, licenseURL, ". "),
|
footerLink("Licensed under the ", license, licenseURL, ". "),
|
||||||
footerLink("Source code available on ", vcs, vcsURL, ". "),
|
footerLink("Source code available on ", vcs, vcsURL, ". "),
|
||||||
|
footerLink(
|
||||||
|
"Consider reading the ",
|
||||||
|
privacyPolicyURL === null ? undefined : "privacy policy",
|
||||||
|
privacyPolicyURL === undefined ? "https://fwdekker.com/privacy/" : privacyPolicyURL,
|
||||||
|
". "
|
||||||
|
),
|
||||||
h("div", version || "", {style: {"float": "right"}})
|
h("div", version || "", {style: {"float": "right"}})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue