website: update footer. #102
This commit is contained in:
parent
13e67d63ac
commit
709aef66fb
@ -22,6 +22,7 @@
|
||||
},
|
||||
"keywords": [],
|
||||
"devDependencies": {
|
||||
"@uiw/formatter": "^1.3.3",
|
||||
"@wcj/markdown-to-html": "^2.1.2",
|
||||
"chokidar": "^3.5.3",
|
||||
"fs-extra": "^10.1.0",
|
||||
|
@ -81,7 +81,7 @@ export function create(str = '', options = {}) {
|
||||
node.children = tocsData;
|
||||
}
|
||||
node.children.unshift(header(options));
|
||||
node.children.push(footer());
|
||||
node.children.push(footer(options));
|
||||
node.children.push(anchorPoint());
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,10 @@
|
||||
import formatter from '@uiw/formatter';
|
||||
|
||||
export function footer() {
|
||||
export function footer(options = {}) {
|
||||
const footerText = '© 2022 Kenny Wang.';
|
||||
if (options.isHome) {
|
||||
footerText += ` Updated on ${formatter('YYYY/MM/DD HH:mm:ss', new Date())}`;
|
||||
}
|
||||
return {
|
||||
type: 'element',
|
||||
tagName: 'footer',
|
||||
@ -13,10 +18,8 @@ export function footer() {
|
||||
properties: {
|
||||
class: ['max-container'],
|
||||
},
|
||||
children: [
|
||||
{ type: 'text', value: '© 2022 Kenny Wang, All rights reserved.' }
|
||||
],
|
||||
}
|
||||
children: [{ type: 'text', value: footerText }],
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
@ -1196,6 +1196,7 @@ body:not(.home) .h2wrap-body > .wrap:hover .h3wrap > h3 a::after {
|
||||
color: rgb(100 116 139/1);
|
||||
background-color: var(--color-canvas-subtle);
|
||||
text-align: center;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user