From e4270fe1b5a6c400bae2d449242db04e09167eac Mon Sep 17 00:00:00 2001 From: Qianshanyao Date: Sun, 5 May 2024 21:28:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8B=B1=E6=96=87=E5=8E=9F?= =?UTF-8?q?=E6=96=87=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3warning=E5=91=8A=E7=A4=BA=E7=B1=BB=E5=9E=8Bid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0/24/piston/sapi/_getTopmostBlock.mdx | 2 +- .../preview/1.21/0/24/tech.mdx | 16 ++++++++------- .../preview/1.21/0/24/tech_sapi_exp.mdx | 20 ++++++------------- .../preview/1.21/0/24/tech_sapi_stable.mdx | 10 +++++----- .../0/24/piston/sapi/_getTopmostBlock.mdx | 2 +- src/components/controls/Hidden.tsx | 3 ++- src/components/controls/list/SingleItem.tsx | 17 ++++++++++++++++ src/css/article.css | 9 +++++++-- src/theme/MDXComponents.js | 4 +++- 9 files changed, 51 insertions(+), 32 deletions(-) create mode 100644 src/components/controls/list/SingleItem.tsx diff --git a/docs/changelog_source/preview/1.21/0/24/piston/sapi/_getTopmostBlock.mdx b/docs/changelog_source/preview/1.21/0/24/piston/sapi/_getTopmostBlock.mdx index 15e2373512..fd6ca17e33 100644 --- a/docs/changelog_source/preview/1.21/0/24/piston/sapi/_getTopmostBlock.mdx +++ b/docs/changelog_source/preview/1.21/0/24/piston/sapi/_getTopmostBlock.mdx @@ -1,6 +1,6 @@ ## getTopmostBlock -:::warn 警告 +:::warning 警告 本页内容暂未经过严格测试,暂时仅用于测试本站新功能:**活塞盒**,请谨慎参考。 ::: diff --git a/docs/changelog_source/preview/1.21/0/24/tech.mdx b/docs/changelog_source/preview/1.21/0/24/tech.mdx index 9b0ab5f53a..a367ca9160 100644 --- a/docs/changelog_source/preview/1.21/0/24/tech.mdx +++ b/docs/changelog_source/preview/1.21/0/24/tech.mdx @@ -3,6 +3,8 @@ import TechSapiExp from './tech_sapi_exp.mdx'; import TechSapiStableDiff from './tech_sapi_stable_diff.md'; import TechSapiExpDiff from './tech_sapi_exp_diff.md'; import Switcher from '../../../../../components/TechChangelogSwitcher.mdx'; +import {HiddenSourceText} from '../../../../../../src/components/controls/HiddenSourceText' +import {SingleItem} from '../../../../../../src/components/controls/list/SingleItem' @@ -14,7 +16,7 @@ import Switcher from '../../../../../components/TechChangelogSwitcher.mdx'; - 更改了群系文档,使其通过不同的系统生成,这将导致文档布局和元素的顺序发生变化 -
  • Changed Biome documentation to generate with a different system, which will cause the layout and order of those documentation elements to change
  • + Changed Biome documentation to generate with a different system, which will cause the layout and order of those documentation elements to change
    @@ -29,22 +31,22 @@ import Switcher from '../../../../../components/TechChangelogSwitcher.mdx'; - 添加了 `addTable` API -
  • Added addTable API
  • + Added addTable API
    - 修复了 `addImage` 接口的GIF资产支持 -
  • Fixed GIF asset support for addImage API
  • + Fixed GIF asset support for addImage API
    - 修复了视口随着UI或字体缩放异常的问题 -
  • Fixed a bug where the viewport did not scale properly with changes in UI or font scaling
  • + Fixed a bug where the viewport did not scale properly with changes in UI or font scaling
    - 解决了工具提示定位和内容尺寸的问题 -
  • Resolved tooltip positioning and content size issues
  • + Resolved tooltip positioning and content size issues
    ## 常规 @@ -54,7 +56,7 @@ import Switcher from '../../../../../components/TechChangelogSwitcher.mdx'; - 实验性自由相机已被弃用。随着新功能的逐步解锁,自由摄像机预设的后续优化将会在新增的实验性设置中呈现。欲查看示例,请参阅摄像机命令的相关文档 -
  • The Free camera experiment has been deprecated and the toggle removed as this feature has shipped. Future improvements to the free camera preset will be found in new experimental toggles as those capabilities become available. Samples can be found in the document for the camera command.
  • + The Free camera experiment has been deprecated and the toggle removed as this feature has shipped. Future improvements to the free camera preset will be found in new experimental toggles as those capabilities become available. Samples can be found in the document for the camera command.
    ## 物品 @@ -64,7 +66,7 @@ import Switcher from '../../../../../components/TechChangelogSwitcher.mdx'; - 修复了方块和物品注册为同一个id时,方块被“选取”会返回一个null物品的问题 -
  • Fixed a bug where, if a block and item are registered with the same identifier, the block returns a null item when 'picked'
  • + Fixed a bug where, if a block and item are registered with the same identifier, the block returns a null item when 'picked'
    diff --git a/docs/changelog_source/preview/1.21/0/24/tech_sapi_exp.mdx b/docs/changelog_source/preview/1.21/0/24/tech_sapi_exp.mdx index 17657a7682..839b0bcef3 100644 --- a/docs/changelog_source/preview/1.21/0/24/tech_sapi_exp.mdx +++ b/docs/changelog_source/preview/1.21/0/24/tech_sapi_exp.mdx @@ -1,36 +1,28 @@ import {HiddenSourceText} from '../../../../../../src/components/controls/HiddenSourceText' import GetTopmostBlock from './piston/sapi/_getTopmostBlock.mdx' +import {SingleItem} from '../../../../../../src/components/controls/list/SingleItem' - 修复了在不蹲下的情况下无法在带有自定义组件的方块上放置方块的问题 -
  • Fixed issue where block with custom components could not have a block placed onto them without crouching
  • + Fixed issue where block with custom components could not have a block placed onto them without crouching
    - 添加了新接口 `VectorXZ` -
  • Added new interface VectorXZ
  • + Added new interface VectorXZ
    - 添加了新方法 }/> `getTopmostBlock` ,此方法将从世界顶部向下执行射线检测,尝试寻找首个固体方块 -
  • - Added method getTopmostBlock which will perform a raycast from the top of the world downwards, trying - to find the first solid block -
  • + Added method getTopmostBlock which will perform a raycast from the top of the world downwards, trying to find the first solid block
    - 添加了新方法 `getBlockAbove` ,此方法将从指定位置执行射线检测,尝试寻找其上方的首个固体方块 -
  • - Added method getBlockAbove which will perform a raycast from a given position, trying to find the - first solid block above -
  • + Added method getBlockAbove which will perform a raycast from a given position, trying to find the first solid block above
    - 添加了新方法 `getBlockBelow` ,此方法将从指定位置执行射线检测,尝试寻找其下方的首个固体方块 -
  • - Added method getBlockBelow which will perform a raycast from a given position, trying to find the - first solid block below -
  • + Added method getBlockBelow which will perform a raycast from a given position, trying to find the first solid block below
    \ No newline at end of file diff --git a/docs/changelog_source/preview/1.21/0/24/tech_sapi_stable.mdx b/docs/changelog_source/preview/1.21/0/24/tech_sapi_stable.mdx index 38eb5aefe1..906ae24a2c 100644 --- a/docs/changelog_source/preview/1.21/0/24/tech_sapi_stable.mdx +++ b/docs/changelog_source/preview/1.21/0/24/tech_sapi_stable.mdx @@ -3,26 +3,26 @@ import {HiddenSourceText} from '../../../../../../src/components/controls/Hidden - 将 `entity` 从 `beta` 移动到了 `1.11.0` -
  • Moved entity from betato 1.11.0
  • + Moved entity from betato 1.11.0
    - 将 `EntityTameMountComponent` 和 `tame` 方法从 `beta` 移动到了 `1.11.0` -
  • Moved EntityTameMountComponent and method tame from beta to 1.11.0
  • + Moved EntityTameMountComponent and method tame from beta to 1.11.0
    - 将 `EntityAddRiderComponent` 从 `beta` 移动到了 `1.11.0` -
  • Moved EntityAddRiderComponent from beta to 1.11.0
  • + Moved EntityAddRiderComponent from beta to 1.11.0
    - 将 `Seat` 从 `beta` 移动到了 `1.11.0` -
  • Moved Seat from beta to 1.11.0
  • + Moved Seat from beta to 1.11.0
    - 将 `EntityRidingComponent` 从 `beta` 移动到了 `1.11.0` -
  • Moved EntityRidingComponent from beta to 1.11.0
  • + Moved EntityRidingComponent from beta to 1.11.0
    diff --git a/i18n/en/docusaurus-plugin-content-docs/current/changelog_source/preview/1.21/0/24/piston/sapi/_getTopmostBlock.mdx b/i18n/en/docusaurus-plugin-content-docs/current/changelog_source/preview/1.21/0/24/piston/sapi/_getTopmostBlock.mdx index 1009542ffe..b1512a4513 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/changelog_source/preview/1.21/0/24/piston/sapi/_getTopmostBlock.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/changelog_source/preview/1.21/0/24/piston/sapi/_getTopmostBlock.mdx @@ -1,6 +1,6 @@ ## getTopmostBlock -:::warn Warning +:::warning Warning The content on this page has not undergone rigorous testing and is presently intended solely for trialing the website's new feature: Piston Box. Please exercise caution when referencing this information. ::: diff --git a/src/components/controls/Hidden.tsx b/src/components/controls/Hidden.tsx index 3bbd77ef4e..c294bca943 100644 --- a/src/components/controls/Hidden.tsx +++ b/src/components/controls/Hidden.tsx @@ -4,6 +4,7 @@ import {usePageEventListener} from '@site/src/hooks/usePageEventListener' interface HiddenProps { children: React.ReactNode; + className?: string; } export function Hidden(props: HiddenProps) { @@ -24,7 +25,7 @@ export function Hidden(props: HiddenProps) { }, []); return ( -
    +
    {props.children}
    ) diff --git a/src/components/controls/list/SingleItem.tsx b/src/components/controls/list/SingleItem.tsx new file mode 100644 index 0000000000..da51911ba5 --- /dev/null +++ b/src/components/controls/list/SingleItem.tsx @@ -0,0 +1,17 @@ +import React from 'react' + +export interface SingleItemProps { + children: React.ReactNode; + // default: false + keepMargin?: boolean; +} + +export function SingleItem(props: SingleItemProps) { + const keepMargin = props.keepMargin ?? false; + + return ( +
      +
    • {props.children}
    • +
    + ); +} \ No newline at end of file diff --git a/src/css/article.css b/src/css/article.css index 5ff5f69af2..76d7f65178 100644 --- a/src/css/article.css +++ b/src/css/article.css @@ -4,6 +4,8 @@ --ifm-code-border-radius: 0.5rem; --ifm-button-border-width: 2px; --ifm-container-width-xl: 72vw; + /*--ifm-heading-margin-top: 0.83rem;*/ + /*--ifm-heading-margin-bottom: 0;*/ --bedoc-section-bg: var(--ifm-background-color); --bedoc-exp-title-background-color: var(--bedoc-title-background-color); --bedoc-exp-title-color: var(--bedoc-title-color); @@ -164,8 +166,10 @@ li > p { margin-block-end: unset; } -ul { - margin-bottom: var(--ifm-list-margin) !important; +.hidden-source-text { + /*padding-inline-start: 1rem;*/ + margin-top: calc(-1 * var(--ifm-list-margin)); + /*margin-bottom: var(--ifm-list-margin);*/ } /**更新日志总标题**/ @@ -295,6 +299,7 @@ img[loading='lazy'] { /*margin-left: 4px;*/ /*margin-right: 4px;*/ } + .piston-toggle-rect-outline { border: 2px solid var(--bedoc-piston-toggle-outline-color); transform: rotate(45deg); diff --git a/src/theme/MDXComponents.js b/src/theme/MDXComponents.js index 9345a8ace7..de8508f98c 100644 --- a/src/theme/MDXComponents.js +++ b/src/theme/MDXComponents.js @@ -6,6 +6,7 @@ import {NavHiddenSwitcher} from '@site/src/components/controls/navigation/NavHid import {HoverOverlayPanel} from '@site/src/components/controls/overlay/HoverOverlayPanel' import {ClickOverplayPanel} from '@site/src/components/controls/overlay/ClickOverplayPanel' import {PistonToggle} from '@site/src/components/controls/piston/PistonToggle' +import {SingleItem} from '@site/src/components/controls/list/SingleItem' export default { // Re-use the default mapping @@ -15,5 +16,6 @@ export default { NavHiddenSwitcher, HoverOverlayPanel, ClickOverplayPanel, - PistonToggle + PistonToggle, + SingleItem }; \ No newline at end of file