From 1cbe025b2c36a30efc8f4a1e8b304bedf0416b04 Mon Sep 17 00:00:00 2001 From: ETBox Date: Fri, 3 Jul 2020 13:29:59 +0800 Subject: [PATCH] feat: add both simplified & traditional Chinese (#30) Chinese words using default font seems a little bit weird, so I rewrite the 'font-family' rule and add 3 fonts for OS compatibility. By the way, I also update languages.html for your convenience. --- lang/zh-hans.css | 5 +++++ lang/zh-hant.css | 5 +++++ languages.html | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 lang/zh-hans.css create mode 100644 lang/zh-hant.css diff --git a/lang/zh-hans.css b/lang/zh-hans.css new file mode 100644 index 0000000..b5ccbd3 --- /dev/null +++ b/lang/zh-hans.css @@ -0,0 +1,5 @@ +:lang(zh-hans) .theorem::before { content: '定理 ' counter(theorem) '. ' !important; } +:lang(zh-hans) .lemma::before { content: '引理 ' counter(theorem) '. ' !important; } +:lang(zh-hans) .proof::before { content: '证明:' attr(title) !important; font-style: normal; } +:lang(zh-hans) .definition::before { content: '定义 ' counter(definition) '. ' !important; } +:lang(zh-hans) ::before { font-family: 'Microsoft Yahei', 'STHeiti', 'Source Han Sans CN'; } \ No newline at end of file diff --git a/lang/zh-hant.css b/lang/zh-hant.css new file mode 100644 index 0000000..4616f2c --- /dev/null +++ b/lang/zh-hant.css @@ -0,0 +1,5 @@ +:lang(zh-hant) .theorem::before { content: '定理 ' counter(theorem) '. ' !important; } +:lang(zh-hant) .lemma::before { content: '引理 ' counter(theorem) '. ' !important; } +:lang(zh-hant) .proof::before { content: '證明:' attr(title) !important; font-style: normal; } +:lang(zh-hant) .definition::before { content: '定義 ' counter(definition) '. ' !important; } +:lang(zh-hant) ::before { font-family: 'Microsoft Yahei', 'STHeiti', 'Source Han Sans CN'; } \ No newline at end of file diff --git a/languages.html b/languages.html index 85f0e51..2152832 100644 --- a/languages.html +++ b/languages.html @@ -49,6 +49,8 @@ + +