Skip to content

Commit

Permalink
🔖 v2.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Achuan-2 committed Nov 2, 2024
1 parent a8f5a7a commit 33673d9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v2.3.2 / 2024.11.02
- 🐛 link icon 根据锚文本来选择是否显示规则完善,被[]包裹的文本才不显示,而不是含有[]就不显示
- 💄Dark主题适配数据库属性面板插件,使得文档的属性面板背景色正常

## v2.3.1 / 2024.10.31

- 💄引述块样式修改
Expand Down
3 changes: 2 additions & 1 deletion style/theme/Tsundoku_dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ span[data-type='text'][style='background-color: var(--b3-font-background13);'] {
}

.block__popover .block__icons,
.layout-tab-container .block__icons {
.layout__dockr .layout-tab-container .block__icons,
.layout__dockl .layout-tab-container .block__icons {
background-color: #041f29 !important;
}

Expand Down
12 changes: 8 additions & 4 deletions theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,15 +693,19 @@ function ViewMonitor(event) {
function link_icon_filter() {
let spans = document.querySelectorAll('span[data-type="a"]');
spans.forEach(span => {
const isWrappedInBracketsOrNumber = /\[.+?\]|^\d+$/.test(span.textContent);
if (span.textContent === '*' || isWrappedInBracketsOrNumber) {
const textContent = span.textContent.trim();
// 检查文本是否完全被方括号包裹或是否为纯数字
const isFullyWrappedInBrackets = /^\[.*\]$/.test(textContent);
const isNumber = /^\d+$/.test(textContent);

if (textContent === '*' || isFullyWrappedInBrackets || isNumber) {
span.setAttribute('custom-linkicon', 'false');
}
else {
} else {
span.removeAttribute('custom-linkicon');
}
});
}

linkIconFilterInterval = setInterval(link_icon_filter, 100);

/**++++++++++++++++++++++++++++++++主题功能执行:按需调用++++++++++++++++++++++++++++++ */
Expand Down
2 changes: 1 addition & 1 deletion theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Tsundoku",
"author": "Achuan-2",
"url": "https://github.com/Achuan-2/siyuan-themes-tsundoku",
"version": "2.3.1",
"version": "2.3.2",
"displayName": {
"default": "Tsundoku",
"zh_CN": "積読"
Expand Down

0 comments on commit 33673d9

Please sign in to comment.