Skip to content

Commit 0b44cad

Browse files
Deploy to GitHub pages
0 parents  commit 0b44cad

10 files changed

Lines changed: 607 additions & 0 deletions

File tree

README.md

Lines changed: 92 additions & 0 deletions
Large diffs are not rendered by default.

README_zh_CN.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<div align="center">
2+
<img alt="图标" src="https://cdn.jsdelivr.net/gh/Zuoqiu-Yingyi/siyuan-plugin-custom-block/public/icon.png" style="width: 8em; height: 8em;">
3+
4+
---
5+
6+
[![GitHub 最新发行版本 (最新一次发行/预发行)](https://img.shields.io/github/v/release/Zuoqiu-Yingyi/siyuan-plugin-custom-block?include_prereleases&style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-custom-block/releases/latest)
7+
[![GitHub 最新发行时间](https://img.shields.io/github/release-date/Zuoqiu-Yingyi/siyuan-plugin-custom-block?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-custom-block/releases/latest)
8+
[![GitHub 许可证](https://img.shields.io/github/license/Zuoqiu-Yingyi/siyuan-plugin-custom-block?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-custom-block/blob/main/LICENSE)
9+
[![GitHub 最后一次提交时间](https://img.shields.io/github/last-commit/Zuoqiu-Yingyi/siyuan-plugin-custom-block?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-custom-block/commits/main)
10+
![GitHub 仓库大小](https://img.shields.io/github/repo-size/Zuoqiu-Yingyi/siyuan-plugin-custom-block?style=flat-square)
11+
![查看次数](https://hits.b3log.org/Zuoqiu-Yingyi/siyuan-plugin-custom-block.svg)
12+
[![GitHub 发行版本下载次数](https://img.shields.io/github/downloads/Zuoqiu-Yingyi/siyuan-plugin-custom-block/total?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-custom-block/releases)
13+
14+
---
15+
16+
简体中文 \| [English](./README.md)
17+
18+
---
19+
20+
</div>
21+
22+
# 思源自定义块样式插件
23+
24+
一款可以使用自定义块属性设置块样式的[思源笔记](https://github.com/siyuan-note/siyuan)插件。
25+
26+
## 预览
27+
28+
![预览图片](https://cdn.jsdelivr.net/gh/Zuoqiu-Yingyi/siyuan-plugin-custom-block/public/preview.png)
29+
30+
## 常见问题
31+
32+
1. 在列表导图视图中若无法点击块标, 如何打开块菜单?
33+
34+
使用快捷键 <kbd>Shift + ↑</kbd> 选择指定的块, 然后使用快捷键 <kbd>Ctrl + /</kbd>打开该块的块菜单
35+
36+
## 介绍
37+
38+
### 功能介绍
39+
40+
使用 <kbd>块菜单</kbd> \> <kbd>插件</kbd> > <kbd>自定义块样式</kbd> 设置选中块所支持的样式。
41+
42+
| 菜单项名称 | 块属性 | 功能介绍 | 文档块 | 超级块 | 引述块 | 列表块 | 列表项 | 标题块 | 段落块 | 公式块 | 表格块 | 代码块 | HTML 块 | 分割线 | 音频块 | 视频块 | Iframe 块 | 挂件块 | 嵌入块 |
43+
| --------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :-----: | :----: | :----: | :----: | :-------: | :----: | :----: |
44+
| 块样式 | `style` | 自定义块的 `style` 属性<br />详情请参考: [style - HTML(超文本标记语言) \| MDN](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Global_attributes/style) | |||||||||||||||||
45+
| 全宽显示 | `block-width`:`full` | 设置该块的宽度为文档宽度 | | | | | | | | | | | | ||||| |
46+
| 全屏显示 || 全屏显示该块 ||||||||||||||||||
47+
| 滚屏显示 | `block-render`:`scroll` | 文档块: 该文档下所有过高的块都显示块内的纵向滚动条<br />其他块: 若该块高度过高则在块内显示纵向滚动条 ||||||||||||||||||
48+
| 弹幕 | `block-render`:`danmaku` | 文档块: 该文档下所有块都以弹幕的形式显示<br />其他块: 以弹幕的形式显示该块 ||||||||||||||||||
49+
| 显示块 ID | `block-render`:`id` | 文档块: 该文档下所有块都在其下方显示块 ID<br />其他块: 该块及其下级块都在其下方显示块 ID ||||||||||||||||||
50+
| 显示块序号 | `block-render`:`index` | 显示文档下顶层块在文档中的序号 || | | | | | | | | | | | | | | | |
51+
| 显示块内容 | `block-render`:`content` | 文档块: 该文档下所有的块都显示隐藏的内容<br />其他块: 该块内所有的块都显示隐藏的内容<br />超链接显示链接地址<br />行内公式显示公式文本<br />行内备注显示备注文本<br />公式块显示公式文本<br />其他需要渲染的块显示对应的文本 |||||||||||| | | | | ||
52+
| 显示块轮廓 | `block-render`:`outline` | 文档块: 该文档下所有块显示其轮廓<br />其他块: 显示该块轮廓 ||||||||||||||||||
53+
| 排版模式 | `block-writing-mode`:`vertical-rl`<br /> `block-writing-mode`:`vertical-lr` | 文档块: 切换该文档下所有块的书写模式<br />其他块: 切换该块及其下级块的书写模式<br /> `vertical-rl`: 从右向左竖排显示文本<br /> `vertical-lr`: 从左向右竖排显示文本 |||||||| || | | | | | | | |
54+
| 只读模式 | `block-user-modify`:`read-only` | 禁止编辑该块及其下级块 | |||||||||||||||||
55+
| 表格-默认宽度 || 默认样式<br />表格中未手动调整宽度的列不会自动换行 | | | | | | | | || | | | | | | | |
56+
| 表格-自动宽度 | `block-table-width`:`auto` | 表格最大宽度与文档宽度一致<br />表格单元格中的内容自动换行 | | | | | | | | || | | | | | | | |
57+
| 表格-单元格等宽 | `block-table-width`:`equal` | 表格所有单元格宽度为固定值 | | | | | | | | || | | | | | | | |
58+
| 列表-默认视图 || 默认样式<br />文档块: 该文档下所有列表以大纲的样式显示<br />列表块: 以大纲的样式显示该列表 ||||| | | | | | | | | | | | ||
59+
| 列表-导图视图 | `block-list-view`:`map` | 文档块: 该文档下所有列表以思维导图的样式显示<br />列表块: 以思维导图的样式显示该列表 ||||| | | | | | | | | | | | ||
60+
| 列表-表格视图 | `block-list-view`:`table` | 文档块: 该文档下所有列表以表格的样式显示<br />列表块: 以表格的样式显示该列表 ||||| | | | | | | | | | | | ||
61+
| 列表-看板视图 | `block-list-view`:`board` | 文档块: 该文档下所有列表以看板的样式显示<br />列表块: 以看板的样式显示该列表 ||||| | | | | | | | | | | | ||
62+
| 导出-启用样式 | `block-export`:`true` | 文档块: 在导出为图片或 PDF 时启用本插件的样式 || | | | | | | | | | | | | | | | |
63+
| 导出-禁用样式 | | 文档块: 在导出为图片或 PDF 时禁用本插件的样式 || | | | | | | | | | | | | | | | |
64+
65+
### 设置项介绍
66+
67+
- `常规设置`
68+
69+
- `重置设置选项`
70+
71+
- 这是一个按钮
72+
- 重置所有设置选项为默认选项
73+
- 点击该按钮后会弹出确认对话框
74+
75+
- 点击对话框确认按钮后会重置本插件所有选项为默认选项, 之后会自动刷新当前界面
76+
- `菜单设置`
77+
78+
- `菜单`
79+
80+
- 这是一个开关
81+
- 默认状态: _打开_
82+
- 关闭该开关后禁用对应的菜单项
83+
- `样式`
84+
85+
- 这是一个开关
86+
- 默认状态: _打开_
87+
- 关闭该开关后禁用插件对应的内置样式
88+
- 若主题兼容对应的样式, 可关闭该开关
89+
90+
## 更改日志
91+
92+
[CHANGELOG.md](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-custom-block/blob/main/CHANGELOG.md)

i18n/en_US.json

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"config": {
3+
"reset": {
4+
"description": "The plugin configuration has been updated and requires resetting all settings options to default (The page will be refreshed after resetting)",
5+
"title": "Reset settings options"
6+
}
7+
},
8+
"displayName": "Custom Block Styles",
9+
"menu": {
10+
"custom-block-export-disable": {
11+
"label": "Export - Disable Style"
12+
},
13+
"custom-block-export-enable": {
14+
"label": "Export - Enable Style"
15+
},
16+
"custom-block-fullscreen": {
17+
"label": "Full-screen Display"
18+
},
19+
"custom-block-list-view-board": {
20+
"label": "List - Kanban View"
21+
},
22+
"custom-block-list-view-default": {
23+
"label": "List - Default View"
24+
},
25+
"custom-block-list-view-map": {
26+
"label": "List - Mind-Map View"
27+
},
28+
"custom-block-list-view-table": {
29+
"label": "List - Table View"
30+
},
31+
"custom-block-position-sticky": {
32+
"label": "Floating Display"
33+
},
34+
"custom-block-render-content": {
35+
"label": "Display Block Content"
36+
},
37+
"custom-block-render-danmaku": {
38+
"label": "Bullet Screen"
39+
},
40+
"custom-block-render-id": {
41+
"label": "Display Block ID"
42+
},
43+
"custom-block-render-index": {
44+
"label": "Display Block Index"
45+
},
46+
"custom-block-render-outline": {
47+
"label": "Display Block Outline"
48+
},
49+
"custom-block-render-scroll": {
50+
"label": "Scrolling Display"
51+
},
52+
"custom-block-style": {
53+
"label": "Block Style"
54+
},
55+
"custom-block-table-width-auto": {
56+
"label": "Table - Auto Width"
57+
},
58+
"custom-block-table-width-default": {
59+
"label": "Table - Default Width"
60+
},
61+
"custom-block-table-width-equal": {
62+
"label": "Table - Equally Cells Width"
63+
},
64+
"custom-block-user-modify": {
65+
"label": "Read-only Mode"
66+
},
67+
"custom-block-width-full": {
68+
"label": "Full-width Display"
69+
},
70+
"custom-block-writing-mode": {
71+
"label": "Text Layout Mode"
72+
}
73+
},
74+
"settings": {
75+
"featureSettings": {
76+
"menu": {
77+
"label": "Menu"
78+
},
79+
"style": {
80+
"label": "Style"
81+
},
82+
"title": "Feature"
83+
},
84+
"generalSettings": {
85+
"reset": {
86+
"description": "Reset all settings options to default (The page will be refreshed after resetting)",
87+
"text": "Reset",
88+
"title": "Reset settings options"
89+
},
90+
"title": "General"
91+
}
92+
}
93+
}

i18n/zh_CHT.json

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"config": {
3+
"reset": {
4+
"description": "插件配置已更新,需要重置所有設置選項為默認選項(重置後將刷新頁面)",
5+
"title": "重置設置選項"
6+
}
7+
},
8+
"displayName": "自定義塊樣式",
9+
"menu": {
10+
"custom-block-export-disable": {
11+
"label": "導出-禁用樣式"
12+
},
13+
"custom-block-export-enable": {
14+
"label": "導出-啟用樣式"
15+
},
16+
"custom-block-fullscreen": {
17+
"label": "全屏顯示"
18+
},
19+
"custom-block-list-view-board": {
20+
"label": "列表-看板視圖"
21+
},
22+
"custom-block-list-view-default": {
23+
"label": "列表-默認視圖"
24+
},
25+
"custom-block-list-view-map": {
26+
"label": "列表-導圖視圖"
27+
},
28+
"custom-block-list-view-table": {
29+
"label": "列表-表格視圖"
30+
},
31+
"custom-block-position-sticky": {
32+
"label": "懸浮顯示"
33+
},
34+
"custom-block-render-content": {
35+
"label": "顯示塊內容"
36+
},
37+
"custom-block-render-danmaku": {
38+
"label": "彈幕"
39+
},
40+
"custom-block-render-id": {
41+
"label": "顯示塊 ID"
42+
},
43+
"custom-block-render-index": {
44+
"label": "顯示塊序號"
45+
},
46+
"custom-block-render-outline": {
47+
"label": "顯示塊輪廓"
48+
},
49+
"custom-block-render-scroll": {
50+
"label": "滾屏顯示"
51+
},
52+
"custom-block-style": {
53+
"label": "塊樣式"
54+
},
55+
"custom-block-table-width-auto": {
56+
"label": "表格-自動寬度"
57+
},
58+
"custom-block-table-width-default": {
59+
"label": "表格-默認寬度"
60+
},
61+
"custom-block-table-width-equal": {
62+
"label": "表格-單元格等寬"
63+
},
64+
"custom-block-user-modify": {
65+
"label": "只讀模式"
66+
},
67+
"custom-block-width-full": {
68+
"label": "全寬顯示"
69+
},
70+
"custom-block-writing-mode": {
71+
"label": "文本排版模式"
72+
}
73+
},
74+
"settings": {
75+
"featureSettings": {
76+
"menu": {
77+
"label": "菜單"
78+
},
79+
"style": {
80+
"label": "樣式"
81+
},
82+
"title": "功能設置"
83+
},
84+
"generalSettings": {
85+
"reset": {
86+
"description": "重置所有設置選項為默認選項(重置後將刷新頁面)",
87+
"text": "重置",
88+
"title": "重置設置選項"
89+
},
90+
"title": "常規設置"
91+
}
92+
}
93+
}

0 commit comments

Comments
 (0)