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