Skip to content

Commit

Permalink
🔖 v2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Achuan-2 committed Aug 11, 2024
1 parent b786349 commit a5bd49a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## v2.2.1 / 2024.08.11
## v2.2.2 / 2024.08.11
- ✨ 代码块菜单支持设置输出样式
- 💄 标题折叠样式优化
- 💄 笔记区和侧栏的分割线调细
Expand Down
16 changes: 15 additions & 1 deletion theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ function ViewSelect(selectid, selecttype) {
button.id = 'viewselect';
button.className = 'b3-menu__item';
button.innerHTML =
'<svg class="b3-menu__icon" style="null"><use xlink:href="#iconGlobalGraph"></use></svg><span class="b3-menu__label" style="">视图选择</span><svg class="b3-menu__icon b3-menu__icon--arrow" style="null"><use xlink:href="#iconRight"></use></svg></button>';
'<svg class="b3-menu__icon" style="null"><use xlink:href="#iconGlobalGraph"></use></svg><span class="b3-menu__label" style="">主题块样式更改</span><svg class="b3-menu__icon b3-menu__icon--arrow" style="null"><use xlink:href="#iconRight"></use></svg></button>';
button.appendChild(SubMenu(selectid, selecttype));
return button;
}
Expand All @@ -538,6 +538,7 @@ function SubMenu(selectid, selecttype, className = 'b3-menu__submenu') {
}
if (selecttype == 'NodeCodeBlock') {
node.appendChild(setCodeOutput(selectid));
node.appendChild(cancelCodeOutput(selectid));
}
return node;
}
Expand All @@ -552,6 +553,19 @@ function setCodeOutput(selectid) {
button.onclick = ViewMonitor;
return button;
}
function cancelCodeOutput(selectid) {
let button = document.createElement('button');
button.className = 'b3-menu__item';
button.setAttribute('data-node-id', selectid);
button.setAttribute('custom-attr-name', 'code');
button.setAttribute('custom-attr-value', '');

button.innerHTML = `<svg class="b3-menu__icon" style=""><use xlink:href="#iconFiles"></use></svg><span class="b3-menu__label">取消代码块输出样式</span>`;
button.onclick = ViewMonitor;
return button;
}



function GraphView(selectid) {
let button = document.createElement('button');
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.2.1",
"version": "2.2.2",
"displayName": {
"default": "Tsundoku",
"zh_CN": "積読"
Expand Down

0 comments on commit a5bd49a

Please sign in to comment.