diff --git a/.obsidian/plugins/dataview/data.json b/.obsidian/plugins/dataview/data.json new file mode 100644 index 0000000..51e7aa3 --- /dev/null +++ b/.obsidian/plugins/dataview/data.json @@ -0,0 +1,27 @@ +{ + "renderNullAs": "\\-", + "taskCompletionTracking": false, + "taskCompletionUseEmojiShorthand": false, + "taskCompletionText": "completion", + "taskCompletionDateFormat": "yyyy-MM-dd", + "recursiveSubTaskCompletion": false, + "warnOnEmptyResult": true, + "refreshEnabled": true, + "refreshInterval": 2500, + "defaultDateFormat": "", + "defaultDateTimeFormat": "h:mm a - MMMM dd, yyyy", + "maxRecursiveRenderDepth": 4, + "tableIdColumnName": "File", + "tableGroupColumnName": "Group", + "showResultCount": true, + "allowHtml": true, + "inlineQueryPrefix": "=", + "inlineJsQueryPrefix": "$=", + "inlineQueriesInCodeblocks": true, + "enableInlineDataview": true, + "enableDataviewJs": true, + "enableInlineDataviewJs": true, + "prettyRenderInlineFields": true, + "prettyRenderInlineFieldsInLivePreview": true, + "dataviewJsKeyword": "dataviewjs" +} \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 8174bf3..28ea700 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -25,6 +25,36 @@ { "id": "d8d92457ad86b663", "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "🏡HOME.md", + "mode": "preview", + "source": false, + "backlinks": false + }, + "icon": "lucide-file", + "title": "🏡HOME" + } + }, + { + "id": "8a832c30d9e7fd85", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "🏡HOME.md", + "mode": "preview", + "source": false, + "backlinks": false + }, + "icon": "lucide-file", + "title": "🏡HOME" + } + }, + { + "id": "57cb83371c292b10", + "type": "leaf", "state": { "type": "markdown", "state": { @@ -36,9 +66,24 @@ "icon": "lucide-file", "title": "🏡HOME" } + }, + { + "id": "19c94029af5d9b60", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "YueQian/相关网站.md", + "mode": "preview", + "source": false, + "backlinks": false + }, + "icon": "lucide-file", + "title": "相关网站" + } } ], - "currentTab": 1 + "currentTab": 4 } ], "direction": "vertical" @@ -105,13 +150,13 @@ "state": { "type": "outline", "state": { - "file": "🏡HOME.md", + "file": "YueQian/相关网站.md", "followCursor": true, "showSearch": false, "searchQuery": "" }, "icon": "lucide-list", - "title": "🏡HOME 的大纲" + "title": "相关网站 的大纲" } }, { @@ -270,37 +315,38 @@ "obsidian-livesync:显示自定义同步": false } }, - "active": "d8d92457ad86b663", + "active": "19c94029af5d9b60", "lastOpenFiles": [ - "Diary/2026/01/2026-01-29 周四.md", "🏡HOME.md", "YueQian/相关网站.md", + "Diary/2026/02/2026-02-07 周六.md", + "Diary/2026/01/2026-01-28 周三.md", + "Diary/2026/01/2026-01-29 周四.md", + "Diary/2026/01/2026-01-30 周五.md", + "Diary/2026/01/2026-01-31 周六.md", + "Diary/2026/01/2026-01-27 周二.md", + "README.md", + "Collection/未命名.md", + "Collection/未命名 1.md", + "Diary/2026/04/2026-04-16 周四.md", "Bases/未命名.base", "Bases/Diay.base", "Template/AutoAdd.md", "Template/Diary.md", "Diary/2026/02/2026-02-05 周四.md", "Diary/2026/02/2026-02-11 周三.md", - "Collection/未命名.md", "Bases", "Diary/2026/02/2026-02-03 周二.md", "Diary/2026/02/2026-02-01 周日.md", - "Diary/2026/04/2026-04-16 周四.md", "Diary/2026/04/2026-04-17 周五.md", "Diary/2026-04-16 周四.md", "未命名.md", "Diary/2026/04", "2026-04-16.md", - "Diary/2026/01/2026-01-31 周六.md", "Diary/2026/01/2026-01-22 周四.md", "Diary/2026/01/2026-01-21 周三.md", "Diary/2026/01/2026-01-20 周二.md", "Diary/2026/01/2026-01-19 周一.md", - "Diary/2026/01/2026-01-30 周五.md", - "Diary/2026/01/2026-01-28 周三.md", - "Diary/2026/01/2026-01-27 周二.md", - "Diary/2026/01/2026-01-26 周一.md", - "Diary/2026/01/2026-01-25 周日.md", "Diary/2026/01", "Diary/2026/02", "Diary/2026", diff --git a/Collection/未命名.md b/Collection/未命名.md deleted file mode 100644 index 030a414..0000000 --- a/Collection/未命名.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -tags: - - empty -aliases: empty -日期: 2026/4/16 -笔记类型: 未分类 ---- diff --git a/🏡HOME.md b/🏡HOME.md index 19514e9..5173777 100644 --- a/🏡HOME.md +++ b/🏡HOME.md @@ -8,25 +8,52 @@ aliases: 日期: 2026/4/16 --- ## 准备将这个页面作为导航页,还没想好怎么做 -```heatmap-tracker -heatmapTitle: 笔记活跃度 -heatmapSubtitle: "全库动态追踪" -# 核心修改:使用 file.mday (修改日期) 或 file.cday (创建日期) -property: file.mday -# 范围修改:留空代表统计全库,或者写 "/" -folderPath: "/" -year: 2026 -separateMonths: true -showCurrentDayBorder: true -# 颜色修改:使用经典绿色系 -colorScheme: - paletteName: green -# 这里的 intensity 决定了颜色深浅的阈值 -intensity: - - 1 - - 3 - - 5 - - 10 +```dataviewjs +// 1. 获取全库页面 (排除附件和模板,避免干扰) +const pages = dv.pages('!"Template" and !"Attachments"'); +// 2. 统计每天的数据 +const activityMap = new Map(); + +pages.forEach(p => { + // 获取创建日期和修改日期 + const dates = [ + window.moment(p.file.cday.ts).format("YYYY-MM-DD"), + window.moment(p.file.mday.ts).format("YYYY-MM-DD") + ]; + + // 获取权重:使用文件大小 (Bytes),这是反映“活跃度”最稳健的指标 + const weight = p.file.size || 0; + + // 对创建和修改日期都进行打点 + dates.forEach(d => { + activityMap.set(d, (activityMap.get(d) || 0) + weight); + }); +}); + +// 3. 转换为渲染条目 +const entries = []; +for (let [date, value] of activityMap) { + entries.push({ + date: date, + intensity: value, + content: "" // 关键修改:设为空,彻底去除格子上的文字 + }); +} + +// 4. 渲染 +renderHeatmapTracker(this.container, { + year: 2026, + entries: entries, + colors: "green", + showValue: true, // 鼠标悬停时依然能看到数值,但格子表面是干净的 + // 根据你的库大小,调整颜色深浅的阈值(单位:字节) + intensity: [ + { min: 1, color: "#9be9a8" }, // 有轻微改动 + { min: 100, color: "#40c463" }, // 中度活跃 + { min: 1000, color: "#30a14e" }, // 深度编辑 + { min: 5000, color: "#216e39" } // 爆更状态 + ] +}); ```