为文档添加i18n插件并新增繁体中文语言

This commit is contained in:
Super Manito
2025-06-22 12:32:19 +08:00
parent 5996b250a5
commit b169186c73
73 changed files with 2091 additions and 122 deletions

34
docs/theme/partials/palette.html vendored Normal file
View File

@@ -0,0 +1,34 @@
<form class="md-header__option" data-md-component="palette">
{% for option in config.theme.palette %}
{% set scheme = option.scheme | d("default", true) %}
{% set primary = option.primary | d("indigo", true) %}
{% set accent = option.accent | d("indigo", true) %}
<input
class="md-option"
data-md-color-media="{{ option.media }}"
data-md-color-scheme="{{ scheme | replace(' ', '-') }}"
data-md-color-primary="{{ primary | replace(' ', '-') }}"
data-md-color-accent="{{ accent | replace(' ', '-') }}"
{% if option.toggle %}
aria-label="{{ option.toggle.name }}"
{% else %}
aria-hidden="true"
{% endif %}
type="radio"
name="__palette"
id="__palette_{{ loop.index0 }}"
/>
{% if option.toggle %}
<label
class="md-header__button md-icon"
title="{{ option.toggle.name }}"
for="__palette_{{ loop.index % loop.length }}"
hidden
>
<div class="palette-icon">
{% include ".icons/" ~ option.toggle.icon ~ ".svg" %}
</div>
</label>
{% endif %}
{% endfor %}
</form>