chore: change the style of the calendar.

This commit is contained in:
Yufan Sheng 2024-11-27 17:25:51 +08:00
parent b2163ef1b2
commit 0730a865b9
Signed by: syhily
GPG Key ID: 9D18A22A7DCD5A9B
7 changed files with 33 additions and 55 deletions

View File

@ -71,7 +71,7 @@ export default defineConfig({
}, },
vite: { vite: {
// Add this for avoiding the needless import optimize in Vite. // Add this for avoiding the needless import optimize in Vite.
optimizeDeps: { exclude: ['@napi-rs/canvas', 'opendal'] }, optimizeDeps: { exclude: ['@napi-rs/canvas', 'opendal', 'sharp'] },
}, },
build: { build: {
assets: 'cats', assets: 'cats',

View File

@ -177,7 +177,7 @@ const options: z.input<typeof Options> = {
category: ['article', 'think', 'gossip', 'coding'], category: ['article', 'think', 'gossip', 'coding'],
}, },
pagination: { pagination: {
posts: 5, posts: 6,
category: 7, category: 7,
tags: 7, tags: 7,
search: 7, search: 7,

66
package-lock.json generated
View File

@ -12,7 +12,7 @@
"@astrojs/mdx": "^3.1.9", "@astrojs/mdx": "^3.1.9",
"@astrojs/rss": "^4.0.9", "@astrojs/rss": "^4.0.9",
"@zeabur/astro-adapter": "^1.0.6", "@zeabur/astro-adapter": "^1.0.6",
"astro": "^4.16.14", "astro": "^4.16.15",
"drizzle-orm": "^0.36.4", "drizzle-orm": "^0.36.4",
"fuse.js": "^7.0.0", "fuse.js": "^7.0.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
@ -20,6 +20,7 @@
"marked": "^15.0.2", "marked": "^15.0.2",
"pg": "^8.13.1", "pg": "^8.13.1",
"qrcode-svg": "^1.1.0", "qrcode-svg": "^1.1.0",
"sharp": "^0.33.5",
"ultrahtml": "^1.5.3" "ultrahtml": "^1.5.3"
}, },
"devDependencies": { "devDependencies": {
@ -35,7 +36,7 @@
"aplayer": "^1.10.1", "aplayer": "^1.10.1",
"astro-uploader": "^1.1.3", "astro-uploader": "^1.1.3",
"bootstrap": "^5.3.3", "bootstrap": "^5.3.3",
"prettier": "^3.4.0", "prettier": "^3.4.1",
"prettier-plugin-astro": "^0.14.1", "prettier-plugin-astro": "^0.14.1",
"prettier-plugin-astro-organize-imports": "^0.4.11", "prettier-plugin-astro-organize-imports": "^0.4.11",
"prettier-plugin-organize-imports": "^4.1.0", "prettier-plugin-organize-imports": "^4.1.0",
@ -44,7 +45,6 @@
"rehype-slug": "^6.0.0", "rehype-slug": "^6.0.0",
"resize-sensor": "^0.0.6", "resize-sensor": "^0.0.6",
"rimraf": "^6.0.1", "rimraf": "^6.0.1",
"sharp": "^0.33.5",
"typescript": "^5.7.2", "typescript": "^5.7.2",
"unist-util-select": "^5.1.0" "unist-util-select": "^5.1.0"
}, },
@ -760,7 +760,6 @@
"version": "1.3.1", "version": "1.3.1",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz",
"integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==",
"dev": true,
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"dependencies": { "dependencies": {
@ -1142,7 +1141,6 @@
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -1165,7 +1163,6 @@
"cpu": [ "cpu": [
"x64" "x64"
], ],
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -1188,7 +1185,6 @@
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
"dev": true,
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@ -1205,7 +1201,6 @@
"cpu": [ "cpu": [
"x64" "x64"
], ],
"dev": true,
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@ -1222,7 +1217,6 @@
"cpu": [ "cpu": [
"arm" "arm"
], ],
"dev": true,
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@ -1239,7 +1233,6 @@
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
"dev": true,
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@ -1256,7 +1249,6 @@
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
"dev": true,
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@ -1273,7 +1265,6 @@
"cpu": [ "cpu": [
"x64" "x64"
], ],
"dev": true,
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@ -1290,7 +1281,6 @@
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
"dev": true,
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@ -1307,7 +1297,6 @@
"cpu": [ "cpu": [
"x64" "x64"
], ],
"dev": true,
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@ -1324,7 +1313,6 @@
"cpu": [ "cpu": [
"arm" "arm"
], ],
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -1347,7 +1335,6 @@
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -1370,7 +1357,6 @@
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -1393,7 +1379,6 @@
"cpu": [ "cpu": [
"x64" "x64"
], ],
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -1416,7 +1401,6 @@
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -1439,7 +1423,6 @@
"cpu": [ "cpu": [
"x64" "x64"
], ],
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"optional": true, "optional": true,
"os": [ "os": [
@ -1462,7 +1445,6 @@
"cpu": [ "cpu": [
"wasm32" "wasm32"
], ],
"dev": true,
"license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
"optional": true, "optional": true,
"dependencies": { "dependencies": {
@ -1482,7 +1464,6 @@
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
"dev": true,
"license": "Apache-2.0 AND LGPL-3.0-or-later", "license": "Apache-2.0 AND LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@ -1502,7 +1483,6 @@
"cpu": [ "cpu": [
"x64" "x64"
], ],
"dev": true,
"license": "Apache-2.0 AND LGPL-3.0-or-later", "license": "Apache-2.0 AND LGPL-3.0-or-later",
"optional": true, "optional": true,
"os": [ "os": [
@ -2907,9 +2887,9 @@
} }
}, },
"node_modules/astro": { "node_modules/astro": {
"version": "4.16.14", "version": "4.16.15",
"resolved": "https://registry.npmjs.org/astro/-/astro-4.16.14.tgz", "resolved": "https://registry.npmjs.org/astro/-/astro-4.16.15.tgz",
"integrity": "sha512-2IuLkIp4idyspugq+F52rHZyNqHHi2AdQzuKp3SGytg/YAm50dNeWhP/7l+enjgWZLloLq5xsH5gVQpoDFoyFg==", "integrity": "sha512-usybZ7nEUiwYKT7r47l4VbkqjKfaE+BgWV/ed4PT3mE3vFRTBWFsXLnkzrN7awfN6+/ekZTAcE+MAkdA551Umw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@astrojs/compiler": "^2.10.3", "@astrojs/compiler": "^2.10.3",
@ -3535,7 +3515,6 @@
"version": "4.2.3", "version": "4.2.3",
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
"devOptional": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"color-convert": "^2.0.1", "color-convert": "^2.0.1",
@ -3549,7 +3528,6 @@
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"devOptional": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"color-name": "~1.1.4" "color-name": "~1.1.4"
@ -3562,14 +3540,12 @@
"version": "1.1.4", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"devOptional": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/color-string": { "node_modules/color-string": {
"version": "1.9.1", "version": "1.9.1",
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
"devOptional": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"color-name": "^1.0.0", "color-name": "^1.0.0",
@ -4950,7 +4926,6 @@
"version": "0.3.2", "version": "0.3.2",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
"devOptional": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/is-decimal": { "node_modules/is-decimal": {
@ -6549,9 +6524,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "3.3.7", "version": "3.3.8",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@ -7276,9 +7251,9 @@
} }
}, },
"node_modules/prettier": { "node_modules/prettier": {
"version": "3.4.0", "version": "3.4.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.0.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz",
"integrity": "sha512-/OXNZcLyWkfo13ofOW5M7SLh+k5pnIs07owXK2teFpnfaOEcycnSy7HQxldaVX1ZP/7Q8oO1eDuQJNwbomQq5Q==", "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
@ -8169,7 +8144,6 @@
"version": "0.33.5", "version": "0.33.5",
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz",
"integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==",
"devOptional": true,
"hasInstallScript": true, "hasInstallScript": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
@ -8252,7 +8226,6 @@
"version": "0.2.2", "version": "0.2.2",
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
"devOptional": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"is-arrayish": "^0.3.1" "is-arrayish": "^0.3.1"
@ -8576,14 +8549,13 @@
"version": "2.8.1", "version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"dev": true,
"license": "0BSD", "license": "0BSD",
"optional": true "optional": true
}, },
"node_modules/type-fest": { "node_modules/type-fest": {
"version": "4.28.0", "version": "4.28.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.28.0.tgz", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.28.1.tgz",
"integrity": "sha512-jXMwges/FVbFRe5lTMJZVEZCrO9kI9c8k0PA/z7nF3bo0JSCCLysvokFjNPIUK/itEMas10MQM+AiHoHt/T/XA==", "integrity": "sha512-LO/+yb3mf46YqfUC7QkkoAlpa7CTYh//V1Xy9+NQ+pKqDqXIq0NTfPfQRwFfCt+if4Qkwb9gzZfsl6E5TkXZGw==",
"license": "(MIT OR CC0-1.0)", "license": "(MIT OR CC0-1.0)",
"engines": { "engines": {
"node": ">=16" "node": ">=16"
@ -8946,16 +8918,16 @@
} }
}, },
"node_modules/vitefu": { "node_modules/vitefu": {
"version": "1.0.3", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.3.tgz", "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.4.tgz",
"integrity": "sha512-iKKfOMBHob2WxEJbqbJjHAkmYgvFDPhuqrO82om83S8RLk+17FtyMBfcyeH8GqD0ihShtkMW/zzJgiA51hCNCQ==", "integrity": "sha512-y6zEE3PQf6uu/Mt6DTJ9ih+kyJLr4XcSgHR2zUkM8SWDhuixEJxfJ6CZGMHh1Ec3vPLoEA0IHU5oWzVqw8ulow==",
"license": "MIT", "license": "MIT",
"workspaces": [ "workspaces": [
"tests/deps/*", "tests/deps/*",
"tests/projects/*" "tests/projects/*"
], ],
"peerDependencies": { "peerDependencies": {
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0-beta.0" "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"vite": { "vite": {

View File

@ -45,7 +45,7 @@
"@astrojs/mdx": "^3.1.9", "@astrojs/mdx": "^3.1.9",
"@astrojs/rss": "^4.0.9", "@astrojs/rss": "^4.0.9",
"@zeabur/astro-adapter": "^1.0.6", "@zeabur/astro-adapter": "^1.0.6",
"astro": "^4.16.14", "astro": "^4.16.15",
"drizzle-orm": "^0.36.4", "drizzle-orm": "^0.36.4",
"fuse.js": "^7.0.0", "fuse.js": "^7.0.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
@ -53,6 +53,7 @@
"marked": "^15.0.2", "marked": "^15.0.2",
"pg": "^8.13.1", "pg": "^8.13.1",
"qrcode-svg": "^1.1.0", "qrcode-svg": "^1.1.0",
"sharp": "^0.33.5",
"ultrahtml": "^1.5.3" "ultrahtml": "^1.5.3"
}, },
"devDependencies": { "devDependencies": {
@ -68,7 +69,7 @@
"aplayer": "^1.10.1", "aplayer": "^1.10.1",
"astro-uploader": "^1.1.3", "astro-uploader": "^1.1.3",
"bootstrap": "^5.3.3", "bootstrap": "^5.3.3",
"prettier": "^3.4.0", "prettier": "^3.4.1",
"prettier-plugin-astro": "^0.14.1", "prettier-plugin-astro": "^0.14.1",
"prettier-plugin-astro-organize-imports": "^0.4.11", "prettier-plugin-astro-organize-imports": "^0.4.11",
"prettier-plugin-organize-imports": "^4.1.0", "prettier-plugin-organize-imports": "^4.1.0",
@ -77,7 +78,6 @@
"rehype-slug": "^6.0.0", "rehype-slug": "^6.0.0",
"resize-sensor": "^0.0.6", "resize-sensor": "^0.0.6",
"rimraf": "^6.0.1", "rimraf": "^6.0.1",
"sharp": "^0.33.5",
"typescript": "^5.7.2", "typescript": "^5.7.2",
"unist-util-select": "^5.1.0" "unist-util-select": "^5.1.0"
}, },

View File

@ -1,6 +1,7 @@
--- ---
import options from '@/options'; import options from '@/options';
import { DateTime } from 'luxon'; import { DateTime } from 'luxon';
import sharp from 'sharp';
const loadCalendarImage = async (): Promise<string> => { const loadCalendarImage = async (): Promise<string> => {
const now = DateTime.now().setZone(options.settings.timeZone); const now = DateTime.now().setZone(options.settings.timeZone);
@ -14,7 +15,11 @@ const loadCalendarImage = async (): Promise<string> => {
return ''; return '';
} }
const encodedImage = Buffer.from(await response.arrayBuffer()).toString('base64'); const encodedImage = (
await sharp(await response.arrayBuffer())
.extract({ width: 1096, height: 1550, left: 90, top: 110 })
.toBuffer()
).toString('base64');
return `data:image/jpeg;base64,${encodedImage}`; return `data:image/jpeg;base64,${encodedImage}`;
}; };
@ -24,6 +29,7 @@ const calendarImage = !options.settings.sidebar.calendar ? '' : await loadCalend
{ {
calendarImage !== '' && ( calendarImage !== '' && (
<div class="widget widget-owspace-calendar"> <div class="widget widget-owspace-calendar">
<div class="widget-title">单向历</div>
<img src={calendarImage} /> <img src={calendarImage} />
</div> </div>
) )

View File

@ -14,7 +14,7 @@ const randomSize = options.settings.sidebar.post;
{ {
randomSize > 0 && ( randomSize > 0 && (
<div id="recent_posts" class="widget widget-recent-entries"> <div id="recent-posts" class="widget widget-recent-entries">
<div class="widget-title">随机文章</div> <div class="widget-title">随机文章</div>
<ul class="line"> <ul class="line">
{_.sampleSize(posts, randomSize).map((post) => ( {_.sampleSize(posts, randomSize).map((post) => (

View File

@ -14,7 +14,7 @@ const randomSize = options.settings.sidebar.tag;
{ {
randomSize > 0 && ( randomSize > 0 && (
<div id="tag_cloud" class="widget widget-tag-cloud"> <div id="tag-cloud" class="widget widget-tag-cloud">
<div class="widget-title">文章标签</div> <div class="widget-title">文章标签</div>
<div class="tagcloud"> <div class="tagcloud">
{_.sampleSize(tags, randomSize).map((tag) => ( {_.sampleSize(tags, randomSize).map((tag) => (