Browse Source

Use new template system

master
F.W. Dekker 6 months ago
parent
commit
0bacdf1c7c
Signed by: FWDekker GPG Key ID: B1B567AF58D6EE0F
  1. 2
      Gruntfile.js
  2. 63
      package-lock.json
  3. 7
      package.json
  4. 8
      src/main/index.html
  5. 8
      src/main/js/main.js

2
Gruntfile.js

@ -50,7 +50,7 @@ module.exports = grunt => {
},
webpack: {
options: {
entry: "./src/main/js/Main.js",
entry: "./src/main/js/main.js",
module: {
rules: [
{

63
package-lock.json

@ -1,14 +1,11 @@
{
"name": "privacy-policy",
"version": "1.1.1",
"version": "1.1.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "1.1.1",
"dependencies": {
"@fwdekker/template": "^0.0.25"
},
"version": "1.1.2",
"devDependencies": {
"grunt": "^1.3.0",
"grunt-cli": "^1.4.2",
@ -18,7 +15,7 @@
"grunt-focus": "^1.0.0",
"grunt-text-replace": "^0.4.0",
"grunt-webpack": "^4.0.2",
"webpack": "^5.32.0",
"webpack": "^5.33.2",
"webpack-cli": "^4.6.0"
}
},
@ -31,14 +28,6 @@
"node": ">=10.0.0"
}
},
"node_modules/@fwdekker/template": {
"version": "0.0.25",
"resolved": "https://registry.npmjs.org/@fwdekker/template/-/template-0.0.25.tgz",
"integrity": "sha512-Vj3aRsXl2LKtU7ak4mp6OCkC5axmw/mhO9WDx+j4YEHPN3emZ9wiIIcMtdRjyvBOTdP+cg6UTDfg+vkDCi3WGQ==",
"dependencies": {
"milligram": "^1.4.1"
}
},
"node_modules/@types/color-name": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
@ -2512,14 +2501,6 @@
"node": ">=0.10.0"
}
},
"node_modules/milligram": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/milligram/-/milligram-1.4.1.tgz",
"integrity": "sha512-RCgh/boHhcXWOUfKJWm3RJRoUeaEguoipDg0mJ31G0tFfvcpWMUlO1Zlqqr12K4kAXfDlllaidu0x7PaL2PTFg==",
"dependencies": {
"normalize.css": "~8.0.1"
}
},
"node_modules/mime-db": {
"version": "1.46.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
@ -2651,11 +2632,6 @@
"nopt": "bin/nopt.js"
}
},
"node_modules/normalize.css": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz",
"integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg=="
},
"node_modules/npm-run-path": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
@ -3817,9 +3793,9 @@
}
},
"node_modules/webpack": {
"version": "5.32.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.32.0.tgz",
"integrity": "sha512-jB9PrNMFnPRiZGnm/j3qfNqJmP3ViRzkuQMIf8za0dgOYvSLi/cgA+UEEGvik9EQHX1KYyGng5PgBTTzGrH9xg==",
"version": "5.33.2",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.33.2.tgz",
"integrity": "sha512-X4b7F1sYBmJx8mlh2B7mV5szEkE0jYNJ2y3akgAP0ERi0vLCG1VvdsIxt8lFd4st6SUy0lf7W0CCQS566MBpJg==",
"dev": true,
"dependencies": {
"@types/eslint-scope": "^3.7.0",
@ -4036,14 +4012,6 @@
"integrity": "sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg==",
"dev": true
},
"@fwdekker/template": {
"version": "0.0.25",
"resolved": "https://registry.npmjs.org/@fwdekker/template/-/template-0.0.25.tgz",
"integrity": "sha512-Vj3aRsXl2LKtU7ak4mp6OCkC5axmw/mhO9WDx+j4YEHPN3emZ9wiIIcMtdRjyvBOTdP+cg6UTDfg+vkDCi3WGQ==",
"requires": {
"milligram": "^1.4.1"
}
},
"@types/color-name": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
@ -6067,14 +6035,6 @@
"to-regex": "^3.0.2"
}
},
"milligram": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/milligram/-/milligram-1.4.1.tgz",
"integrity": "sha512-RCgh/boHhcXWOUfKJWm3RJRoUeaEguoipDg0mJ31G0tFfvcpWMUlO1Zlqqr12K4kAXfDlllaidu0x7PaL2PTFg==",
"requires": {
"normalize.css": "~8.0.1"
}
},
"mime-db": {
"version": "1.46.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
@ -6178,11 +6138,6 @@
"abbrev": "1"
}
},
"normalize.css": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz",
"integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg=="
},
"npm-run-path": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
@ -7120,9 +7075,9 @@
}
},
"webpack": {
"version": "5.32.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.32.0.tgz",
"integrity": "sha512-jB9PrNMFnPRiZGnm/j3qfNqJmP3ViRzkuQMIf8za0dgOYvSLi/cgA+UEEGvik9EQHX1KYyGng5PgBTTzGrH9xg==",
"version": "5.33.2",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.33.2.tgz",
"integrity": "sha512-X4b7F1sYBmJx8mlh2B7mV5szEkE0jYNJ2y3akgAP0ERi0vLCG1VvdsIxt8lFd4st6SUy0lf7W0CCQS566MBpJg==",
"dev": true,
"requires": {
"@types/eslint-scope": "^3.7.0",

7
package.json

@ -1,6 +1,6 @@
{
"name": "privacy-policy",
"version": "1.1.1",
"version": "1.1.2",
"description": "The privacy policy of my website",
"author": "Felix W. Dekker",
"browser": "dist/bundle.js",
@ -15,9 +15,6 @@
"dev:server": "grunt dev:server",
"deploy": "grunt deploy"
},
"dependencies": {
"@fwdekker/template": "^0.0.25"
},
"devDependencies": {
"grunt": "^1.3.0",
"grunt-cli": "^1.4.2",
@ -27,7 +24,7 @@
"grunt-focus": "^1.0.0",
"grunt-text-replace": "^0.4.0",
"grunt-webpack": "^4.0.2",
"webpack": "^5.32.0",
"webpack": "^5.33.2",
"webpack-cli": "^4.6.0"
}
}

8
src/main/index.html

@ -10,14 +10,15 @@
<title>Privacy policy</title>
<link rel="stylesheet" href="https://static.fwdekker.com/fonts/roboto.css" crossorigin="anonymous" />
<link rel="stylesheet" href="https://static.fwdekker.com/lib/template/1.x.x/bundle.css" crossorigin="anonymous" />
</head>
<body>
<noscript>
<span style="color: red; font-weight: bold;">
This website does not function fully if JavaScript is disabled.
<p style="color: red; font-weight: bold;">
This website does not function if JavaScript is disabled.
Please check the <a href="https://www.enable-javascript.com/">
instructions on how to enable JavaScript in your web browser</a>.
</span>
</p>
</noscript>
<main> <!-- Do not hide without JavaScript -->
<div id="nav"></div>
@ -66,6 +67,7 @@
<!-- Scripts -->
<script src="https://static.fwdekker.com/lib/template/1.x.x/bundle.js" crossorigin="anonymous"></script>
<!--suppress HtmlUnknownTarget -->
<script src="bundle.js?v=%%VERSION_NUMBER%%"></script>
</body>

8
src/main/js/Main.js → src/main/js/main.js

@ -1,15 +1,11 @@
import {$, doAfterLoad, footer, header, nav, showPage} from "@fwdekker/template";
// noinspection JSUnresolvedVariable
const {$, doAfterLoad, footer, header, nav, showPage} = window.fwdekker;
doAfterLoad(() => {
$("#nav").appendChild(nav("/Privacy/"));
$("#header").appendChild(header({title: "Privacy policy"}));
$("#footer").appendChild(footer({
author: "Felix W. Dekker",
authorURL: "https://fwdekker.com/",
license: "MIT License",
licenseURL: "https://git.fwdekker.com/FWDekker/privacy-policy/src/branch/master/LICENSE",
vcs: "git",
vcsURL: "https://git.fwdekker.com/FWDekker/privacy-policy/",
version: "v%%VERSION_NUMBER%%",
privacyPolicyURL: null
Loading…
Cancel
Save