Skip to content

Commit

Permalink
update voxelTable
Browse files Browse the repository at this point in the history
  • Loading branch information
qndm committed Oct 27, 2024
1 parent 714a97d commit 6b666f3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions docs/_assets/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ a>a:active {
}

/*解决方块速查表颜色太深看不见字问题*/
.voxelsTableTableData span,
.voxelTableData span,
.coloredWord {
transition: background-color 300ms;
padding: 5px;
border-radius: 3px;
}

.voxelsTableTableData span:hover,
.voxelTableData span:hover,
.coloredWord:hover {
background-color: unset !important;
}
Expand Down Expand Up @@ -118,12 +118,12 @@ summary {
border-right: 2px solid #ff0000;
}

#voxelsTable .new-voxel{
#voxelTable .new-voxel{
border-left: 3px solid #00ff00;
}

#voxelsTable caption,
#voxelsTable tfoot {
#voxelTable caption,
#voxelTable tfoot {
margin-top: 5px;
margin-bottom: 5px;
}
Expand Down
4 changes: 2 additions & 2 deletions docs/_assets/voxelIdsTable.js → docs/_assets/voxelTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function createTableRow(option, ...datas) {
td.appendChild(textNode);
if (option.colSpan && typeof option.colSpan[index] === "number" && !isNaN(option.colSpan[index]))
td.colSpan = option.colSpan[index];
td.classList.add('voxelsTableTableData');
td.classList.add('voxelTableData');
td.style.textAlign = 'center';
if (option.color && typeof option.color[index] === "string") {
td.classList.add('coloredWord');
Expand Down Expand Up @@ -61,7 +61,7 @@ if (new URL(document.URL).pathname === '/api/voxels/') {
if (localVoxelTypes !== null) {
oldVoxelNames.push(...JSON.parse(localVoxelTypes));
}
const el = document.getElementById('voxelIdsTable');
const el = document.getElementById('voxelTable');
if (el instanceof HTMLElement) {
console.log('方块速查表开始渲染');
const table = document.createElement('table'),
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/api/voxels.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,6 @@ tags:

要是棋盘方块的描述看不懂,可以把描述里的制表符叠加起来看

<span id="voxelIdsTable"></span>
<span id="voxelTable"></span>

[^1]: 其判定方法为,用户上次查看文档时文档未收录的方块
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ extra_javascript:
- _assets/iconsParser.js
- _assets/mathjax.js
#- _assets/anchorParser.js
- _assets/voxelsType.js
- _assets/voxelIdsTable.js
- _assets/voxelTypes.js
- _assets/voxelTable.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
- https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/gsap.min.js
Expand Down

0 comments on commit 6b666f3

Please sign in to comment.