mirror of
https://gitee.com/SuperManito/LinuxMirrors
synced 2025-11-02 07:20:28 +08:00
更新文档
This commit is contained in:
2
docs/assets/css/tdesign.min.css
vendored
2
docs/assets/css/tdesign.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,33 +1,78 @@
|
||||
const OramaI18nData = {
|
||||
'zh-Hans': {
|
||||
searchPlaceholder: '请输入要搜索的内容...',
|
||||
chatPlaceholder: '有什么可以帮你的吗?',
|
||||
suggestions: ['如何使用', '支持哪些系统'],
|
||||
askAiText: '询问 AI',
|
||||
searchText: '搜索',
|
||||
toSelectText: '选择',
|
||||
toNavigateText: '导航',
|
||||
toCloseText: '关闭',
|
||||
dictionary: {
|
||||
searchPlaceholder: '请输入要搜索的内容...',
|
||||
chatPlaceholder: '有什么可以帮你的吗?',
|
||||
noResultsFound: '未找到结果',
|
||||
noResultsFoundFor: '未找到与该内容相关的结果',
|
||||
suggestionsTitle: '建议',
|
||||
seeAll: '查看全部',
|
||||
addMore: '添加更多',
|
||||
clearChat: '清空聊天',
|
||||
errorMessage: '尝试搜索时发生错误。请重试。',
|
||||
disclaimer: 'AI 可能会出错,请核实信息。',
|
||||
startYourSearch: '开始搜索',
|
||||
initErrorSearch: '无法初始化搜索服务',
|
||||
initErrorChat: '无法初始化聊天服务',
|
||||
chatButtonLabel: '询问 AI',
|
||||
searchButtonLabel: '搜索',
|
||||
},
|
||||
},
|
||||
'zh-Hant': {
|
||||
searchPlaceholder: '請輸入要搜尋的內容...',
|
||||
chatPlaceholder: '有什麼可以幫你的嗎?',
|
||||
suggestions: ['如何使用', '支援哪些系統'],
|
||||
askAiText: '詢問 AI',
|
||||
searchText: '搜尋',
|
||||
toSelectText: '選擇',
|
||||
toNavigateText: '導航',
|
||||
toCloseText: '關閉',
|
||||
dictionary: {
|
||||
searchPlaceholder: '請輸入要搜尋的內容...',
|
||||
chatPlaceholder: '有什麼可以幫你的嗎?',
|
||||
noResultsFound: '未找到結果',
|
||||
noResultsFoundFor: '未找到與該內容相關的結果',
|
||||
suggestionsTitle: '建議',
|
||||
seeAll: '看全部',
|
||||
addMore: '添加更多',
|
||||
clearChat: '清空聊天',
|
||||
errorMessage: '嘗試搜尋時發生錯誤。請重試。',
|
||||
disclaimer: 'AI 可能會出錯,請核實資訊。',
|
||||
startYourSearch: '開始搜尋',
|
||||
initErrorSearch: '無法初始化搜尋服務',
|
||||
initErrorChat: '無法初始化聊天服務',
|
||||
chatButtonLabel: '詢問 AI',
|
||||
searchButtonLabel: '搜尋',
|
||||
},
|
||||
},
|
||||
en: {
|
||||
searchPlaceholder: 'Please enter the content to search...',
|
||||
chatPlaceholder: 'How can I help you?',
|
||||
suggestions: ['How to use', 'What systems are supported'],
|
||||
askAiText: 'Ask AI',
|
||||
searchText: 'Search',
|
||||
toSelectText: 'Select',
|
||||
toNavigateText: 'Navigate',
|
||||
toCloseText: 'Close',
|
||||
dictionary: {
|
||||
searchPlaceholder: 'Please enter the content to search...',
|
||||
chatPlaceholder: 'How can I help you?',
|
||||
noResultsFound: 'No results found',
|
||||
noResultsFoundFor: 'No results found for',
|
||||
suggestionsTitle: 'Suggestions',
|
||||
seeAll: 'See all',
|
||||
addMore: 'Add more',
|
||||
clearChat: 'Clear chat',
|
||||
errorMessage: 'An error occurred while trying to search. Please try again.',
|
||||
disclaimer: 'AI can make mistakes. Please verify the information.',
|
||||
startYourSearch: 'Start your search',
|
||||
initErrorSearch: 'Unable to initialize search service',
|
||||
initErrorChat: 'Unable to initialize chat service',
|
||||
chatButtonLabel: 'Ask AI',
|
||||
searchButtonLabel: 'Search',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -86,9 +131,8 @@ function getOramaSearchBoxConfig() {
|
||||
description: 'content',
|
||||
section: 'category',
|
||||
},
|
||||
searchPlaceholder: OramaI18nData[currentLang].searchPlaceholder,
|
||||
chatPlaceholder: OramaI18nData[currentLang].chatPlaceholder,
|
||||
suggestions: OramaI18nData[currentLang].suggestions,
|
||||
dictionary: OramaI18nData[currentLang].dictionary,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,13 +146,13 @@ function localizationOramaSearchBox(searchBox) {
|
||||
const shadowRoot = searchBox.shadowRoot
|
||||
if (shadowRoot) {
|
||||
// Get a summary (Only PC)
|
||||
const chatButton = shadowRoot.querySelector('.chat-button')
|
||||
if (chatButton) {
|
||||
const element = chatButton.querySelector('.button-label')
|
||||
if (element && element.textContent !== askAiText) {
|
||||
element.textContent = askAiText
|
||||
}
|
||||
}
|
||||
// const chatButton = shadowRoot.querySelector('.chat-button')
|
||||
// if (chatButton) {
|
||||
// const element = chatButton.querySelector('.button-label')
|
||||
// if (element && element.textContent !== askAiText) {
|
||||
// element.textContent = askAiText
|
||||
// }
|
||||
// }
|
||||
|
||||
const footer = shadowRoot.querySelector('orama-footer')
|
||||
if (footer) {
|
||||
@@ -141,13 +185,13 @@ function localizationOramaSearchBox(searchBox) {
|
||||
}
|
||||
|
||||
// Hide "Orama can make mistakes. Please verify the information."
|
||||
const chatFormWrapper = shadowRoot.querySelector('.chat-form-wrapper')
|
||||
if (chatFormWrapper) {
|
||||
const element = chatFormWrapper.querySelector('p.small.text-center')
|
||||
if (element) {
|
||||
element.style = 'display: none;'
|
||||
}
|
||||
}
|
||||
// const chatFormWrapper = shadowRoot.querySelector('.chat-form-wrapper')
|
||||
// if (chatFormWrapper) {
|
||||
// const element = chatFormWrapper.querySelector('p.small.text-center')
|
||||
// if (element) {
|
||||
// element.style = 'display: none;'
|
||||
// }
|
||||
// }
|
||||
|
||||
// Navigation bar (Only Mobile)
|
||||
const navigationBar = shadowRoot.querySelector('orama-navigation-bar')
|
||||
|
||||
15
docs/assets/js/modules/tdesign.min.js
vendored
15
docs/assets/js/modules/tdesign.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,13 +1,14 @@
|
||||
:root {
|
||||
--md-text-font: system-ui, -apple-system, 'Roboto', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Segoe UI', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
||||
--md-code-font: 'SF Mono';
|
||||
--md-code-font: 'SF Mono', Meslo, 'Monaspace Neon', 'JetBrains Mono', Consolas, monospace;
|
||||
--md-primary-fg-color--light: hsl(0, 0%, 100%, 0.33);
|
||||
--md-default-bg-color--light: #fff;
|
||||
--view-transition-z-index-foreground: 999;
|
||||
--view-transition-z-index-background: 1;
|
||||
--hero-background-image: linear-gradient(90deg, rgb(104 104 104) 50%, rgb(104 104 104) 50%);
|
||||
--navbar-background: hsla(240, 9%, 75%, 0.33);
|
||||
--compoent-border-radius: 8px;
|
||||
--component-border-radius: 8px;
|
||||
--component-hover-color: rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
[data-md-color-scheme='slate'] {
|
||||
@@ -16,14 +17,17 @@
|
||||
--md-footer-bg-color--dark: hsla(var(--md-hue), 5%, 12%, 1);
|
||||
--navbar-background: hsla(var(--md-hue), 5%, 19%, 0.33);
|
||||
--hero-background-image: linear-gradient(90deg, rgb(88 88 88) 50%, rgb(88 88 88) 50%);
|
||||
--component-hover-color: rgba(240, 241, 244, 0.1);
|
||||
}
|
||||
|
||||
[data-md-color-primary=white] {
|
||||
--md-typeset-a-color: #2080f0;
|
||||
--md-accent-fg-color: #2080f0;
|
||||
}
|
||||
|
||||
[data-md-color-scheme='slate'][data-md-color-primary=black] {
|
||||
--md-typeset-a-color: #2080f0;
|
||||
--md-typeset-a-color: #33add3;
|
||||
--md-accent-fg-color: #33add3;
|
||||
}
|
||||
|
||||
/* logo */
|
||||
@@ -44,7 +48,7 @@
|
||||
/* 告诫 */
|
||||
.md-typeset .admonition,
|
||||
.md-typeset details {
|
||||
border-radius: var(--compoent-border-radius) !important;
|
||||
border-radius: var(--component-border-radius) !important;
|
||||
border-width: 0;
|
||||
border-left-width: 4px;
|
||||
}
|
||||
@@ -85,6 +89,15 @@
|
||||
background-color: #0094001a;
|
||||
}
|
||||
|
||||
.md-typeset .admonition .admonition-title,
|
||||
.md-typeset details:not([open])>summary {
|
||||
border-radius: 0 var(--component-border-radius) var(--component-border-radius) 0 !important;
|
||||
}
|
||||
|
||||
.md-typeset details>summary {
|
||||
border-radius: 0 var(--component-border-radius) 0 0 !important;
|
||||
}
|
||||
|
||||
.md-typeset .admonition.tip:focus-within,
|
||||
.md-typeset details.tip:focus-within {
|
||||
box-shadow: 0 0 0 .2rem #0094000a;
|
||||
@@ -167,15 +180,19 @@
|
||||
|
||||
.admonition .tabbed-set {
|
||||
overflow: hidden !important;
|
||||
margin: 0 0 1em 0 !important;
|
||||
margin: 0 0 0.4em 0 !important;
|
||||
}
|
||||
|
||||
.admonition details {
|
||||
margin-top: 0.4em !important;
|
||||
}
|
||||
|
||||
.md-typeset details .tabbed-set {
|
||||
margin: 0 0 1em 0 !important;
|
||||
margin: 0 0 0.4em 0 !important;
|
||||
}
|
||||
|
||||
.highlight code {
|
||||
border-radius: var(--compoent-border-radius) !important;
|
||||
border-radius: var(--component-border-radius) !important;
|
||||
}
|
||||
|
||||
.highlight span.filename+pre>code {
|
||||
@@ -184,7 +201,7 @@
|
||||
}
|
||||
|
||||
.highlight span.filename {
|
||||
border-radius: var(--compoent-border-radius) var(--compoent-border-radius) 0 0 !important;
|
||||
border-radius: var(--component-border-radius) var(--component-border-radius) 0 0 !important;
|
||||
background-color: var(--md-default-bg-color) !important;
|
||||
border-top: var(--md-default-fg-color--lightest) 1px solid !important;
|
||||
border-left: var(--md-default-fg-color--lightest) 1px solid !important;
|
||||
@@ -217,22 +234,22 @@
|
||||
}
|
||||
|
||||
.md-select__inner {
|
||||
border-radius: var(--compoent-border-radius);
|
||||
border-radius: var(--component-border-radius);
|
||||
}
|
||||
|
||||
.md-select__inner .md-select__list {
|
||||
padding: var(--compoent-border-radius) !important;
|
||||
padding: var(--component-border-radius) !important;
|
||||
font-size: .75rem !important;
|
||||
}
|
||||
|
||||
.md-select__inner .md-select__list .md-select__item {
|
||||
margin: 1px;
|
||||
border-radius: var(--compoent-border-radius);
|
||||
border-radius: var(--component-border-radius);
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
[dir=ltr] .md-select__inner .md-select__list .md-select__item .md-select__link {
|
||||
border-radius: var(--compoent-border-radius);
|
||||
border-radius: var(--component-border-radius);
|
||||
padding-left: 12px !important;
|
||||
padding-right: 12px !important;
|
||||
}
|
||||
@@ -260,6 +277,48 @@
|
||||
.md-typeset__table .twemoji svg {
|
||||
fill: var(--md-default-fg-color--light) !important;
|
||||
}
|
||||
.md-tooltip,
|
||||
.md-tooltip2__inner {
|
||||
border-radius: 5px !important;
|
||||
}
|
||||
|
||||
.md-typeset a {
|
||||
transition: color 0ms;
|
||||
}
|
||||
|
||||
.tabbed-labels a {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tabbed-labels a::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
background-color: var(--component-hover-color);
|
||||
border-radius: 5px;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 998;
|
||||
}
|
||||
|
||||
.tabbed-button {
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.tabbed-labels a:hover::before {
|
||||
width: 100%;
|
||||
height: calc(100% - 8px);
|
||||
}
|
||||
|
||||
.tabbed-content {
|
||||
padding-top: 0.4em !important;
|
||||
}
|
||||
|
||||
.tabbed-content .admonition {
|
||||
margin: 1em 0 !important;
|
||||
}
|
||||
|
||||
/* HERO */
|
||||
.hero {
|
||||
@@ -377,11 +436,7 @@
|
||||
}
|
||||
|
||||
.sponsor-item-toc:hover {
|
||||
background-color: rgba(0, 0, 0, 0.08) !important;
|
||||
}
|
||||
|
||||
[data-md-color-scheme="slate"] .sponsor-item-toc:hover {
|
||||
background-color: rgba(240, 241, 244, 0.1) !important;
|
||||
background-color: var(--component-hover-color) !important;
|
||||
}
|
||||
|
||||
.sponsor-item-toc-full-row {
|
||||
@@ -653,4 +708,4 @@ button[data-terminal-control] {
|
||||
|
||||
::view-transition-new(root) {
|
||||
z-index: var(--view-transition-z-index-foreground);
|
||||
}
|
||||
}
|
||||
|
||||
27
docs/theme/partials/search.html
vendored
27
docs/theme/partials/search.html
vendored
@@ -8,8 +8,8 @@
|
||||
|
||||
<div class="md-search__inner" role="search">
|
||||
<form class="md-search__form" name="search" onsubmit="return false;">
|
||||
<input type="text" class="md-search__input" style="cursor: pointer !important;" name="query" aria-label="{{'AI Search' if i18n_page_locale == 'en' else 'AI 搜尋' if i18n_page_locale == 'zh-Hant' else 'AI 搜索'}}" placeholder="{{'AI Search' if i18n_page_locale == 'en' else 'AI 搜尋' if i18n_page_locale == 'zh-Hant' else 'AI 搜索'}}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" readonly required onclick="window.openOramaSearch()" />
|
||||
<label class="md-search__icon md-icon" for="__search" onclick="window.openOramaSearch()"> {% set icon = config.theme.icon.search or "material/magnify" %} {% include ".icons/" ~ icon ~ ".svg" %} {% set icon = config.theme.icon.previous or "material/arrow-left" %} {% include ".icons/" ~ icon ~ ".svg" %} </label>
|
||||
<input type="text" class="md-search__input" style="cursor: pointer !important;" name="query" aria-label="{{'AI Search' if i18n_page_locale == 'en' else 'AI 搜尋' if i18n_page_locale == 'zh-Hant' else 'AI 搜索'}}" placeholder="{{'AI Search' if i18n_page_locale == 'en' else 'AI 搜尋' if i18n_page_locale == 'zh-Hant' else 'AI 搜索'}}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" readonly required onclick="OpenOramaSearchComponent()" />
|
||||
<label class="md-search__icon md-icon" for="__search" onclick="OpenOramaSearchComponent()"> {% set icon = config.theme.icon.search or "material/magnify" %} {% include ".icons/" ~ icon ~ ".svg" %} {% set icon = config.theme.icon.previous or "material/arrow-left" %} {% include ".icons/" ~ icon ~ ".svg" %} </label>
|
||||
</form>
|
||||
<div class="md-search__output">
|
||||
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
|
||||
@@ -22,13 +22,34 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const __lang = "{{ i18n_page_locale }}";
|
||||
let __notReadyMsg = '';
|
||||
switch (__lang) {
|
||||
case 'en':
|
||||
__notReadyMsg = "The search component has not yet been loaded. Please try again later.";
|
||||
break;
|
||||
case 'zh-Hant':
|
||||
__notReadyMsg = "搜尋元件尚未載入完畢,請稍後再試。";
|
||||
break;
|
||||
default:
|
||||
__notReadyMsg = "搜索组件尚未加载完毕,请稍后再试。";
|
||||
}
|
||||
|
||||
function OpenOramaSearchComponent() {
|
||||
if (window.openOramaSearch) {
|
||||
window.openOramaSearch();
|
||||
} else {
|
||||
alert$.next(__notReadyMsg);
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const searchToggle = document.getElementById('__search');
|
||||
if (searchToggle) {
|
||||
searchToggle.addEventListener('change', function() {
|
||||
if (this.checked) {
|
||||
this.checked = false;
|
||||
window.openOramaSearch();
|
||||
OpenOramaSearchComponent();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -567,7 +567,7 @@ Below are some advanced usage examples
|
||||
|
||||
---
|
||||
|
||||
Use as normal; most Chinese mirrors sync [`CentOS Vault`](https://vault.centos.org).
|
||||
Use the script as usual, no additional steps are required. As most mirror sites in mainland China have already synchronized the [`CentOS Vault`](https://vault.centos.org) repository.
|
||||
|
||||
- __International__
|
||||
|
||||
|
||||
@@ -599,7 +599,7 @@ $ bash <(curl -sSL https://linuxmirrors.cn/main.sh) --help
|
||||
|
||||
---
|
||||
|
||||
直接正常使用即可,因为国内大部分镜像站都同步了 [`CentOS Vault`](https://vault.centos.org) 仓库
|
||||
正常使用脚本,没有额外操作,因为国内大部分镜像站都已同步 [`CentOS Vault`](https://vault.centos.org) 仓库
|
||||
|
||||
- __境外以及海外环境__
|
||||
|
||||
|
||||
@@ -569,7 +569,7 @@ hide:
|
||||
|
||||
---
|
||||
|
||||
直接正常使用即可,因為大部分中國大陸鏡像站都同步了 [`CentOS Vault`](https://vault.centos.org) 倉庫
|
||||
正常使用腳本,沒有額外操作,因為大部分中國大陸鏡像站都已同步 [`CentOS Vault`](https://vault.centos.org) 倉庫
|
||||
|
||||
- __國際地區__
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ nav:
|
||||
- "赞助": sponsor/index.md
|
||||
|
||||
extra_javascript:
|
||||
- assets/js/modules/vue.global.prod.js
|
||||
- assets/js/modules/tdesign.min.js
|
||||
- https://unpkg.com/vue/dist/vue.global.prod.js
|
||||
- https://unpkg.com/tdesign-vue-next/dist/tdesign.min.js
|
||||
- assets/js/modules/tdesign-theme.js
|
||||
- assets/js/components/orama-ui/config.js
|
||||
- assets/js/components/orama-ui/index.js
|
||||
@@ -25,7 +25,7 @@ extra_javascript:
|
||||
- assets/js/components/mirrors-table/data.js
|
||||
- assets/js/components/mirrors-table/index.js
|
||||
extra_css:
|
||||
- assets/css/tdesign.min.css
|
||||
- https://unpkg.com/tdesign-vue-next/dist/tdesign.min.css
|
||||
- assets/css/orama-ui.css
|
||||
- stylesheets/extra.css
|
||||
|
||||
|
||||
Reference in New Issue
Block a user