website: add search feature. #32

This commit is contained in:
jaywcjlove
2022-11-20 03:26:06 +08:00
parent 9290c65fdc
commit 3bd4114c63
12 changed files with 516 additions and 84 deletions

View File

@ -1,8 +1,8 @@
import formatter from '@uiw/formatter';
export function footer(options = {}) {
export function footer({ isHome } = {}) {
let footerText = '© 2022 Kenny Wang.';
if (options.isHome) {
if (isHome) {
const now = new Date();
const utc = now.getTime() + now.getTimezoneOffset() * 60000;
const cst = new Date(utc + 3600000 * 8);