diff --git a/.gitignore b/.gitignore index 05b5e1d96992069b06b08de19c6679488b2e5151..bc3a56a2cb5ee8a2c7f8ebd1355b037f1ebfe5d6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ public layouts/partials/docs/test-list.html layouts/partials/docs/test-list2.html node_modules -app/** \ No newline at end of file +app/** +.cache \ No newline at end of file diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 34d01d9d7adb133d6e54befa8ff5b9034736e185..62d5b2c0d6f27d0cd5ade908749adfc93c6e0998 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -30,8 +30,8 @@
- {{ i18n "current_lang" }} - + +
{{ .Site.Params.languageZh }} {{ .Site.Params.languageEn }} diff --git a/static/css/common.css b/static/css/common.css index 55d5bc9f2645d9fff5798668eab832739466a730..e880ad7cba2a3740a7b139d9c6c834a339befc30 100644 --- a/static/css/common.css +++ b/static/css/common.css @@ -281,6 +281,32 @@ i { background-image: url("../img/common/icon-down-dark.svg"); } +.icon-locale { + display: block; + width: 26px; + height: 26px; + background-image: url("../img/common/icon-locale-light.svg"); +} +.light .icon-locale { + background-image: url("../img/common/icon-locale-light.svg"); +} +.dark .icon-locale { + background-image: url("../img/common/icon-locale-dark.svg"); +} + +.locale-tag { + position: absolute; + font-size: 10px; + height: 12px; + width: 12px; + display: flex; + justify-content: center; + align-items: center; + left: 12px; + top: 28px; + background: var(--e-color-bg1); +} + .web-lang { margin-left: 20px; } diff --git a/static/css/revision_new.css b/static/css/revision_new.css index 4a7e523da834466c9f8b9b89f903cc8591d1704f..bb67c01bb1d62c4fd1349445f7a4f70eb8df1f6b 100644 --- a/static/css/revision_new.css +++ b/static/css/revision_new.css @@ -219,7 +219,7 @@ width: 84px; position: absolute; top: 46px; - left: -40px; + left: -50px; background: var(--e-color-bg2); padding: 0 var(--o-spacing-h5); cursor: pointer; diff --git a/static/img/common/icon-locale-dark.svg b/static/img/common/icon-locale-dark.svg new file mode 100644 index 0000000000000000000000000000000000000000..edebc679d3743f1f83a013fed6f3a4f8ee485f74 --- /dev/null +++ b/static/img/common/icon-locale-dark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/static/img/common/icon-locale-light.svg b/static/img/common/icon-locale-light.svg new file mode 100644 index 0000000000000000000000000000000000000000..77ff3099316a0e2d0d35e85c993ff1fc34211832 --- /dev/null +++ b/static/img/common/icon-locale-light.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/static/js/common.js b/static/js/common.js index 81213ef45092713ca838cd9f07eccf79fb834878..fb583ff08c4ac9140d81b45e56657fab5204b94c 100644 --- a/static/js/common.js +++ b/static/js/common.js @@ -238,5 +238,7 @@ $(function ($) { $(".nav-box .docs-a .home-bread,.h5-docs-a .home-bread").click(() => { window.open(`/${lang}/`, "_self"); }); + // 设置语言图标 + $(".locale-tag").text(window.location.href.indexOf('/zh/') > -1 ? "中" : "EN"); }); }); diff --git a/static/js/float.js b/static/js/float.js index 1700cc110b81d6fd7b170ab1b47be25036c3a262..d8cbd3b5e9f760d7d20e7fd012fe031952ed25be 100644 --- a/static/js/float.js +++ b/static/js/float.js @@ -459,7 +459,7 @@ $(document).ready(() => { ); } else { openUrl( - `https://gitee.com/-/ide/project/openeuler/docs/edit/stable2-${version}/-/docs/${lang}/docs/${path}?search=${first}&title=文档捉虫-openEuler ${version}-${title}&description=${feedback}&message=${feedback}&label_names=文档捉虫` + `https://gitee.com/-/ide/project/openeuler/docs-centralized/edit/stable2-${version}/-/docs/${lang}/docs/${path}?search=${first}&title=文档捉虫-openEuler ${version}-${title}&description=${feedback}&message=${feedback}&label_names=文档捉虫` ); } } else { diff --git a/static/js/version_data.js b/static/js/version_data.js index 5022650cf3299cca71d44214a9033a65e8167236..cf9a9433a87dfe7ed8bb1dfe15e7faaea6853c47 100644 --- a/static/js/version_data.js +++ b/static/js/version_data.js @@ -4,12 +4,14 @@ * 按照发布时间排序 */ const versionObjZh = { + '24.03 LTS SP2': { + homePath: 'https://docs.openeuler.org/zh/docs/24.03_LTS_SP2/server/releasenotes/releasenotes/introduction.html', + }, '25.03': { - homePath: 'https://docs.openeuler.org/zh/', + homePath: 'https://docs.openeuler.org/zh/docs/25.03/server/releasenotes/releasenotes/introduction.html', }, '24.03 LTS SP1': { - homePath: - '/24.03_LTS_SP1/docs/Releasenotes/%E6%B3%95%E5%BE%8B%E5%A3%B0%E6%98%8E.html', + homePath: 'https://docs.openeuler.org/zh/docs/24.03_LTS_SP1/server/releasenotes/releasenotes/introduction.html', }, 24.09: { homePath: @@ -99,11 +101,14 @@ const versionObjZh = { }; const versionObjEn = { + '24.03 LTS SP2': { + homePath: 'https://docs.openeuler.org/en/docs/24.03_LTS_SP2/server/releasenotes/releasenotes/introduction.html', + }, '25.03': { - homePath: 'https://docs.openeuler.org/en/', + homePath: 'https://docs.openeuler.org/en/docs/25.03/server/releasenotes/releasenotes/introduction.html', }, '24.03 LTS SP1': { - homePath: '/24.03_LTS_SP1/docs/Releasenotes/terms-of-use.html', + homePath: 'https://docs.openeuler.org/en/docs/24.03_LTS_SP1/server/releasenotes/releasenotes/introduction.html', }, 24.09: { homePath: '/24.09/docs/Releasenotes/terms-of-use.html',