.github
.husky
docs
scripts
assets
nodes
footer.mjs
header.mjs
htmlTagAddAttri.mjs
logo.mjs
style
utils
build.mjs
create.mjs
index.mjs
watch.mjs
.dockerignore
.editorconfig
.gitattributes
.gitignore
.lintstagedrc
.markdownlint.json
.prettierignore
.prettierrc
CONTRIBUTING.md
Dockerfile
LICENSE
README.md
package.json
renovate.json
26 lines
564 B
JavaScript
26 lines
564 B
JavaScript
import formatter from '@uiw/formatter';
|
|
|
|
export function footer(options = {}) {
|
|
let footerText = '© 2022 Kenny Wang.';
|
|
if (options.isHome) {
|
|
footerText += ` Updated on ${formatter('YYYY/MM/DD HH:mm:ss', new Date())}`;
|
|
}
|
|
return {
|
|
type: 'element',
|
|
tagName: 'footer',
|
|
properties: {
|
|
class: 'footer-wrap',
|
|
},
|
|
children: [
|
|
{
|
|
type: 'element',
|
|
tagName: 'footer',
|
|
properties: {
|
|
class: ['max-container'],
|
|
},
|
|
children: [{ type: 'text', value: footerText }],
|
|
},
|
|
],
|
|
};
|
|
}
|