From 52153eea6f2e4fad32b9be9c55c985d712139dfc Mon Sep 17 00:00:00 2001 From: pxq <1456889284@qq.com> Date: Fri, 26 Aug 2022 14:10:23 +0800 Subject: [PATCH 01/29] =?UTF-8?q?fix:ui=E6=9B=B4=E6=96=B0=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- .hugo_build.lock | 0 .pnpm-debug.log | 14 + Dockerfile | 4 +- deploy/docs-builder-ru.sh | 2 +- deploy/docs-builder.sh | 10 +- i18n/en/en.toml | 17 +- i18n/ru/ru.toml | 15 +- i18n/zh/zh.toml | 27 +- layouts/docs/baseof.html | 91 +- layouts/index.html | 48 +- layouts/partials/docs/menu.html | 1 + layouts/partials/docs/test-list.html | 828 ++++++++++++++++++ layouts/partials/head.html | 2 + layouts/partials/insideNav.html | 19 +- layouts/partials/link.html | 45 +- layouts/partials/nav.html | 108 ++- layouts/partials/pcfooter.html | 22 +- layouts/partials/scripts.html | 3 +- layouts/partials/turn.html | 13 + layouts/partials/version.html | 39 + static/css/_color.css | 245 ++++++ static/css/common.css | 112 ++- static/css/docdetail.css | 519 +++++++---- static/css/doclist.css | 23 +- static/css/docsearch.css | 8 +- static/css/h5_footer.css | 12 +- static/css/index.css | 809 +++++++++-------- static/css/markdown.css | 22 +- static/css/pcfooter.css | 69 +- static/css/revision_new.css | 423 +++++++++ static/img/common/banner-bg.png | Bin 0 -> 39305 bytes static/img/common/banner-iii.png | Bin 0 -> 19059 bytes static/img/common/down.svg | 7 + static/img/common/footer-logo-dark.png | Bin 0 -> 2107 bytes static/img/common/footer-logo.png | Bin 2685 -> 2039 bytes static/img/common/help-dark.png | Bin 0 -> 361 bytes static/img/common/icon-arrow-left1.svg | 4 + static/img/common/icon-arrow-right-open.svg | 4 + static/img/common/icon-arrow-right.svg | 4 + static/img/common/icon-arrow-right1.svg | 4 + static/img/common/icon-chevron-right-dark.svg | 4 + static/img/common/icon-chevron-right.svg | 4 + static/img/common/icon-close-dark.svg | 11 + static/img/common/icon-close-light.svg | 11 + .../{icon-down.svg => icon-down-dark.svg} | 2 +- static/img/common/icon-down-light.svg | 1 + static/img/common/logo-h5.png | Bin 4594 -> 1216 bytes static/img/common/moon.svg | 4 + static/img/common/more-dark.svg | 11 + static/img/common/more-light.svg | 11 + static/img/common/search.svg | 15 +- static/img/common/sun.svg | 5 + .../common/\347\274\226\347\273\204 14.svg" | 16 + static/img/detail/feedback-dark.svg | 13 + static/img/detail/feedback-light.svg | 13 + static/img/detail/source-code-dark.svg | 13 + static/img/detail/source-code-light.svg | 13 + static/js/docdetail.js | 45 +- static/js/doclist.js | 2 +- static/js/revision_new.js | 136 +++ 61 files changed, 3075 insertions(+), 831 deletions(-) create mode 100644 .hugo_build.lock create mode 100644 .pnpm-debug.log create mode 100644 layouts/partials/docs/test-list.html create mode 100644 layouts/partials/turn.html create mode 100644 layouts/partials/version.html create mode 100644 static/css/_color.css create mode 100644 static/css/revision_new.css create mode 100644 static/img/common/banner-bg.png create mode 100644 static/img/common/banner-iii.png create mode 100644 static/img/common/down.svg create mode 100644 static/img/common/footer-logo-dark.png create mode 100644 static/img/common/help-dark.png create mode 100644 static/img/common/icon-arrow-left1.svg create mode 100644 static/img/common/icon-arrow-right-open.svg create mode 100644 static/img/common/icon-arrow-right.svg create mode 100644 static/img/common/icon-arrow-right1.svg create mode 100644 static/img/common/icon-chevron-right-dark.svg create mode 100644 static/img/common/icon-chevron-right.svg create mode 100644 static/img/common/icon-close-dark.svg create mode 100644 static/img/common/icon-close-light.svg rename static/img/common/{icon-down.svg => icon-down-dark.svg} (92%) create mode 100644 static/img/common/icon-down-light.svg create mode 100644 static/img/common/moon.svg create mode 100644 static/img/common/more-dark.svg create mode 100644 static/img/common/more-light.svg create mode 100644 static/img/common/sun.svg create mode 100644 "static/img/common/\347\274\226\347\273\204 14.svg" create mode 100644 static/img/detail/feedback-dark.svg create mode 100644 static/img/detail/feedback-light.svg create mode 100644 static/img/detail/source-code-dark.svg create mode 100644 static/img/detail/source-code-light.svg create mode 100644 static/js/revision_new.js diff --git a/.gitignore b/.gitignore index 8fdf790c7..78f7cf2be 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ *.vscode /content /web-ui/node_modules -/web-ui/package-lock.json \ No newline at end of file +/web-ui/package-lock.json +public \ No newline at end of file diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 000000000..e69de29bb diff --git a/.pnpm-debug.log b/.pnpm-debug.log new file mode 100644 index 000000000..95d567634 --- /dev/null +++ b/.pnpm-debug.log @@ -0,0 +1,14 @@ +{ + "0 debug pnpm:scope": { + "selected": 1 + }, + "1 error pnpm": { + "code": "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND", + "err": { + "name": "pnpm", + "message": "No package.json (or package.yaml, or package.json5) was found in \"C:\\Users\\panxiangqu\\Desktop\\提交\\docs\".", + "code": "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND", + "stack": "pnpm: No package.json (or package.yaml, or package.json5) was found in \"C:\\Users\\panxiangqu\\Desktop\\提交\\docs\".\n at readProjectManifest (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:20808:13)\n at async Object.readProjectManifestOnly (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:20812:28)\n at async readProjectManifestOnly (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:43834:24)\n at async Object.handler (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:178132:24)\n at async C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:182701:21\n at async run (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:182675:34)\n at async runPnpm (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:182893:5)\n at async C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:182885:7" + } + } +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 1bdb00c3c..6845d9bb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,9 +9,11 @@ RUN mkdir -p /usr/local/src && \ cd /usr/local/src && \ curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz | tar -xz && \ mv hugo /usr/local/bin/ - +RUN cd / +RUN ls RUN mkdir -p /src/ COPY . /src/website +RUN ls /src/website/content/zh/docs/ RUN cd /src/ && \ cd /src/website && /usr/local/bin/hugo -b / && /usr/local/bin/hugo --gc --minify && \ diff --git a/deploy/docs-builder-ru.sh b/deploy/docs-builder-ru.sh index 0d0265013..afdb45f20 100644 --- a/deploy/docs-builder-ru.sh +++ b/deploy/docs-builder-ru.sh @@ -8,7 +8,7 @@ if [ -d "./website" ]; then fi mkdir website -git clone https://gitee.com/openeuler/docs +git clone https://gitee.com/panxiangqu/docs cd ./docs git checkout -b website origin/website cp -r * ../website diff --git a/deploy/docs-builder.sh b/deploy/docs-builder.sh index 707e42d5f..87f80fea7 100644 --- a/deploy/docs-builder.sh +++ b/deploy/docs-builder.sh @@ -8,7 +8,7 @@ if [ -d "./website" ]; then fi mkdir website -git clone https://gitee.com/openeuler/docs +git clone https://gitee.com/panxiangqu/docs cd ./docs git checkout -b website origin/website cp -r * ../website @@ -19,17 +19,19 @@ do git checkout -b $b $r mkdir -p ../website/content/zh/docs/$b - cp -r ./docs/zh/* ../website/content/zh/docs/$b/ + cp -r ./docs/zh/* ../website/content/zh/docs/$b/ mkdir -p ../website/content/en/docs/$b - cp -r ./docs/en/* ../website/content/en/docs/$b/ + cp -r ./docs/en/* ../website/content/en/docs/$b/ if [ -d "./docs/ru" ]; then mkdir -p ../website/content/ru/docs/$b - cp -r ./docs/ru/* ../website/content/ru/docs/$b/ + cp -r ./docs/ru/* ../website/content/ru/docs/$b/ fi cd .. cd ./docs done cd .. +pwd + diff --git a/i18n/en/en.toml b/i18n/en/en.toml index 44c7a9b3b..ff0ccc717 100644 --- a/i18n/en/en.toml +++ b/i18n/en/en.toml @@ -90,7 +90,22 @@ other = "/en/docs/20.03_LTS_SP1/docs/Releasenotes/terms-of-use.html" other = "/en/docs/20.09/docs/Releasenotes/terms-of-use.html" [know_98_1] other = "/en/docs/20.03_LTS/docs/Releasenotes/terms-of-use.html" - +[version_91] +other = "22.03 LTS" +[version_92] +other = "20.03 LTS SP3" +[version_93] +other = "21.09" +[version_94] +other= "20.03 LTS SP2" +[version_95] +other = "21.03" +[version_96] +other = "20.03 LTS SP1" +[version_97] +other= "20.09" +[version_98] +other = "20.03 LTS" [atom] other = "openEuler is an open source project incubated and operated by the OpenAtom Foundation." diff --git a/i18n/ru/ru.toml b/i18n/ru/ru.toml index 82d1b3822..c9cafddd2 100644 --- a/i18n/ru/ru.toml +++ b/i18n/ru/ru.toml @@ -50,7 +50,20 @@ other = "/ru/docs/20.03_LTS/docs/Releasenotes/terms-of-use.html" [know_97_1] other = "/ru/docs/20.09/docs/Releasenotes/terms-of-use.html" - +[version_91] +other = "22.03 LTS" +[version_93] +other = "21.09" +[version_94] +other= "20.03 LTS SP2" +[version_95] +other = "21.03" +[version_96] +other = "20.03 LTS SP1" +[version_97] +other= "20.09" +[version_98] +other = "20.03 LTS" [atom] other = "openEuler - это проект с открытым исходным кодом, созданный и управляемый фондом OpenAtom." diff --git a/i18n/zh/zh.toml b/i18n/zh/zh.toml index 9c65965ce..bffc615e1 100644 --- a/i18n/zh/zh.toml +++ b/i18n/zh/zh.toml @@ -41,6 +41,22 @@ other = "/zh/docs/20.03_LTS_SP1/docs/Releasenotes/法律声明.html" other = "/zh/docs/20.09/docs/Releasenotes/法律声明.html" [know_98_1] other = "/zh/docs/20.03_LTS/docs/Releasenotes/法律声明.html" +[version_91] +other = "22.03 LTS" +[version_92] +other = "20.03 LTS SP3" +[version_93] +other = "21.09" +[version_94] +other= "20.03 LTS SP2" +[version_95] +other = "21.03" +[version_96] +other = "20.03 LTS SP1" +[version_97] +other= "20.09" +[version_98] +other = "20.03 LTS" [hot_document] @@ -140,7 +156,7 @@ other = "有奖捉虫" other = "“有虫”文档片段" [issue_reason] -other = "存在的问题" +other = "问题描述" [satisfaction] other = "您对文档的总体满意度" @@ -200,3 +216,12 @@ other = "的结果" [hot_docs_version] other = "20.03 LTS" + +[relative] +other = "关于openEuler" + +[website] +other = "openEuler官网" + +[other_link] +other = "友情链接" diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html index 2a5cf1d3c..ad1b37090 100644 --- a/layouts/docs/baseof.html +++ b/layouts/docs/baseof.html @@ -26,8 +26,7 @@
  • {{ i18n "previous" }}
  • -
  • - {{ i18n "catalog_text" }} +
  • {{ i18n "next" }} @@ -35,52 +34,52 @@ +
    {{ partial "link.html" }}
    - +
    +
    {{ template "main" . }}
    + {{ partial "turn.html"}} {{ partial "insideNav.html"}} @@ -100,15 +99,21 @@ {{ partial "h5_footer.html"}} -
  • -
    + -
    + -->
    diff --git a/layouts/partials/docs/menu.html b/layouts/partials/docs/menu.html index ab20acf0c..360cd658d 100644 --- a/layouts/partials/docs/menu.html +++ b/layouts/partials/docs/menu.html @@ -5,8 +5,8 @@ {{ if .Site.Params.BookMenuBundle }}
    - - {{ partial "docs/test-list" . }} + {{ partial "docs/menu-bundle" . }} +
    {{ else }} {{ partial "docs/menu-filetree" . }} diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 19e077fcf..05959f68d 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -19,7 +19,6 @@ var href = wholeData[j].a_attr.href; var text = wholeData[j].text; //debugger; - if ((encodeURIComponent(href).toLowerCase() == encodeURIComponent(relativeURL).toLowerCase()) || (text.indexOf(relativeURL) >= 0)) { return wholeData[j].id; } else { @@ -63,7 +62,7 @@ $("#docstreeview").on("ready.jstree", function (e, data) { $("#docsMenu").show(); var relativeURL = getRelativePath(); - var wholeData = $("#menu-box #docstreeview").jstree().get_json(); + var wholeData = $("#docstreeview").jstree().get_json(); var currentID = getCurrentID(wholeData, relativeURL); $("#docstreeview").jstree()._open_to(currentID); $('#docstreeview').jstree().select_node(currentID); @@ -110,6 +109,7 @@ }; getAllData(wholeData); nextAndPevious(nodeList, currentID); + console.log(result); result[0] == null ? $('#prev').addClass('disabled') : $('#prev a').attr('href', result[0]); result[1] == null ? $('#next').addClass('disabled') : $('#next a').attr('href', result[1]); result[0] == null ? $('#h5-menu .h5-prev').addClass('disabled') : $('#h5-menu .h5-prev a').attr('href', result[0]); @@ -151,7 +151,7 @@ const iterName = [],iterUrl = [] if(Array.isArray(data)) { data.map(function (item) { - iterName.unshift($('#'+item+'_anchor').text()) + iterName.unshift($('#'+item+'_anchor').text()) iterUrl.unshift($('#'+item+'_anchor').attr('href')) }) } diff --git a/static/css/docdetail.css b/static/css/docdetail.css index 51445e4b5..28878a1ba 100644 --- a/static/css/docdetail.css +++ b/static/css/docdetail.css @@ -12,8 +12,18 @@ } @media screen and (max-width: 1100px){ #all .left{ - display: none; + width: 60%; + position: fixed; + left: 0; + top:0; + z-index: 9999; + background-color: var(--e-color-bg2); + transform: translateX(-100%); + transition: all 0.5s; } + #all .show-left{ + transform: translateX(0) ; + } } #menu-box { padding-top: 53px; @@ -33,6 +43,10 @@ #menu-box{ top:0; z-index: 9999; + padding-top: 0; + } + #menu-box .pc-logo{ + display: none; } } #h5-menu-top .select-box { @@ -138,12 +152,15 @@ } @media screen and (max-width: 1100px) { #docstreeview { - /* height: calc(100vh - 164px); */ + height: calc(100vh - 164px); color: var(--e-color-text1); } #docstreeview a{ color: var(--e-color-text1); } + #docstreeview>ul{ + margin-top: 16px; + } } /* #menu-box .jstree-container-ul { @@ -1202,7 +1219,7 @@ } #menu-box{ transition: all 0.2s; - transform: translateX(-100%); + /* transform: translateX(-100%); */ } #h5-menu-top { display: block; @@ -1246,7 +1263,7 @@ #h5-menu a i { width: 14px; height: 14px; - margin-bottom: -2px; + /* margin-bottom: -2px; */ } #h5-menu a span{ color: var(--e-color-text1); font-size: 12px; @@ -1273,7 +1290,7 @@ #menu-box { background: var(--e-color-bg2); - width: 60%; + width: 100%; height: 100vh; } @@ -1341,7 +1358,7 @@ #menu-box .jstree-node>.jstree-anchor, #menu-box .jstree-node>.jstree-anchor p a { color: var(--e-color-text1); height: 36px; - line-height: 36px; + /* line-height: 36px; */ } #docstreeview{ margin-top: 0; @@ -1358,7 +1375,8 @@ } #h5-menu-top .menu-select-box{ height: auto; - margin-top: 30px; + margin-top: 0; + padding-top: 30px; } } diff --git a/static/css/revision_new.css b/static/css/revision_new.css index 20c9a077f..8fe5634f2 100644 --- a/static/css/revision_new.css +++ b/static/css/revision_new.css @@ -85,7 +85,7 @@ #docstreeview > ul >li>i{ position: absolute; right: 16px; - top:14px; + top:7px; } #docstreeview > ul >li>ul>li>i{ position: absolute; @@ -114,7 +114,7 @@ } @media screen and (max-width: 1100px){ #docstreeview > ul > li > a{ - padding-top: 16px; + padding: 8px 0; line-height: normal; height: auto; } @@ -142,6 +142,11 @@ padding-top: 8px; padding-bottom: 24px; } +@media screen and (max-width: 1100px) { + #docstreeview > ul > li ul { + padding-bottom: 8px; + } +} #docstreeview > ul > li ul li { padding-top: 16px; } @@ -340,7 +345,7 @@ display: flex; justify-content: space-between; align-items: center; - padding: 0px 0 16px 0; + padding: 0px 0 8px 0; } #h5-menu-top .select-box span { margin-left: 16px; @@ -486,7 +491,7 @@ .h5-theme-lang { position: absolute; left: 0; - bottom: 0; + bottom: 2px; width: 100%; padding: 16px; background-color: var(--e-color-bg2); @@ -673,7 +678,7 @@ } } .footer-content .app-content { - max-width: 1620px; + /* max-width: 1620px; */ padding: 0 64px; } @media (max-width: 1100px) { @@ -905,6 +910,10 @@ padding: 0 8px; border: 1px solid var(--e-color-kleinblue7); } +@media screen and (max-width: 1100px){ + #menu-box #version-select { + display: none;} +} #menu-box #version-select::after { display: block; content: ""; @@ -984,14 +993,8 @@ display: none; transform: translateX(-100%); } -.show-menu-box{ - transform: translateX(0) !important; -} -@media screen and (max-width: 1100px) { - #h5-menu-box { - display: block; - } -} + + .h5-docs-a{ display: none; } diff --git a/static/js/docdetail.js b/static/js/docdetail.js index 257881472..ecf262797 100644 --- a/static/js/docdetail.js +++ b/static/js/docdetail.js @@ -45,7 +45,7 @@ $(function ($) { }); $(".h5_nav_left").click(function (e) { // $("#menu-box").show() - $("#h5-menu-box").addClass("show-menu-box"); + $("#all>.left").addClass("show-left"); $(".h5-mask").show(); $("#content .docscontainer").css("height", "0"); $("#page").hide(); @@ -57,7 +57,7 @@ $(function ($) { // $("#page").hide(); // }); $("#h5-menu-top .icon-close,.h5-mask").click(function (e) { - $("#h5-menu-box").removeClass("show-menu-box"); + $("#all>.left").removeClass("show-left"); $(".h5-mask").hide(); $("#content .docscontainer").css("height", "auto"); $("#page").show(); diff --git a/static/js/revision_new.js b/static/js/revision_new.js index 996603b32..2a0913ac4 100644 --- a/static/js/revision_new.js +++ b/static/js/revision_new.js @@ -48,7 +48,6 @@ $( targetUrlArr.push($($(this).attr("href"))); }); targetUrl = targetUrlArr.filter(function (item) { - console.log($(window).scrollTop(),item.offset().top); return $(window).scrollTop() + 260 > item.offset().top; }); if (targetUrl.length) { -- Gitee From e3b20f699574d8abe84c1fab772bdd1cbb32e1f5 Mon Sep 17 00:00:00 2001 From: pxq <1456889284@qq.com> Date: Mon, 5 Sep 2022 17:07:17 +0800 Subject: [PATCH 27/29] =?UTF-8?q?style:=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=A0=8F=E6=8E=A7=E5=88=B6=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/css/revision_new.css | 3 ++- static/js/docdetail.js | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/static/css/revision_new.css b/static/css/revision_new.css index 8fe5634f2..791e1783d 100644 --- a/static/css/revision_new.css +++ b/static/css/revision_new.css @@ -493,7 +493,8 @@ left: 0; bottom: 2px; width: 100%; - padding: 16px; + padding: 16px 24px 16px 16px; + background-color: var(--e-color-bg2); justify-content: space-between; } diff --git a/static/js/docdetail.js b/static/js/docdetail.js index ecf262797..a47cfcf8a 100644 --- a/static/js/docdetail.js +++ b/static/js/docdetail.js @@ -44,11 +44,10 @@ $(function ($) { e.stopPropagation(); }); $(".h5_nav_left").click(function (e) { - // $("#menu-box").show() $("#all>.left").addClass("show-left"); $(".h5-mask").show(); - $("#content .docscontainer").css("height", "0"); - $("#page").hide(); + // $("#content .docscontainer").css("height", "0"); + // $("#page").hide(); }); // $("#h5-menu .h5-menu").click(function (e) { @@ -59,8 +58,8 @@ $(function ($) { $("#h5-menu-top .icon-close,.h5-mask").click(function (e) { $("#all>.left").removeClass("show-left"); $(".h5-mask").hide(); - $("#content .docscontainer").css("height", "auto"); - $("#page").show(); + // $("#content .docscontainer").css("height", "auto"); + // $("#page").show(); }); $("#h5-menu-top .h5-search").find(".search-btn").click(function (e) { keyword = $("#h5-menu-top .h5-search").find("input").val(); -- Gitee From 95a2dd8ecbd1ecd29b9e5cff1bbe7b897ce04a86 Mon Sep 17 00:00:00 2001 From: pxq <1456889284@qq.com> Date: Tue, 6 Sep 2022 21:50:27 +0800 Subject: [PATCH 28/29] =?UTF-8?q?fix:=E9=9D=A2=E5=8C=85=E5=B1=91=E7=BA=A7?= =?UTF-8?q?=E6=95=B0=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pnpm-debug.log | 15 +++++- layouts/partials/docs/test-list.html | 49 +++++-------------- static/css/docdetail.css | 45 ++++++++++++++--- static/css/index.css | 7 ++- static/css/revision_new.css | 18 +++---- static/css/theme.css | 3 +- static/img/common/icon-chevron-dark-gray.svg | 4 ++ static/img/common/icon-chevron-right-gray.svg | 4 ++ static/js/docdetail.js | 29 ++++++++--- static/js/sensors.js | 2 +- 10 files changed, 113 insertions(+), 63 deletions(-) create mode 100644 static/img/common/icon-chevron-dark-gray.svg create mode 100644 static/img/common/icon-chevron-right-gray.svg diff --git a/.pnpm-debug.log b/.pnpm-debug.log index 9e26dfeeb..88aa4a44d 100644 --- a/.pnpm-debug.log +++ b/.pnpm-debug.log @@ -1 +1,14 @@ -{} \ No newline at end of file +{ + "0 debug pnpm:scope": { + "selected": 1 + }, + "1 error pnpm": { + "code": "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND", + "err": { + "name": "pnpm", + "message": "No package.json (or package.yaml, or package.json5) was found in \"C:\\Users\\panxiangqu\\Desktop\\测试\\docs\".", + "code": "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND", + "stack": "pnpm: No package.json (or package.yaml, or package.json5) was found in \"C:\\Users\\panxiangqu\\Desktop\\测试\\docs\".\n at readProjectManifest (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:20808:13)\n at async Object.readProjectManifestOnly (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:20812:28)\n at async readProjectManifestOnly (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:43834:24)\n at async Object.handler (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:178132:24)\n at async C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:182701:21\n at async run (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:182675:34)\n at async runPnpm (C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:182893:5)\n at async C:\\Users\\panxiangqu\\AppData\\Roaming\\npm\\node_modules\\pnpm\\dist\\pnpm.cjs:182885:7" + } + } +} \ No newline at end of file diff --git a/layouts/partials/docs/test-list.html b/layouts/partials/docs/test-list.html index 1cd4844ac..8e29d08b3 100644 --- a/layouts/partials/docs/test-list.html +++ b/layouts/partials/docs/test-list.html @@ -27,7 +27,7 @@ aria-labelledby="j1_2_anchor" aria-expanded="false" id="j1_2" - class="jstree-node jstree-open" + class="jstree-node jstree-closed" > 安装指南 -
      -
    • - 安装在服务器 +
    • + 安装在服务器 -
    • diff --git a/static/css/docdetail.css b/static/css/docdetail.css index 28878a1ba..0b6a2457c 100644 --- a/static/css/docdetail.css +++ b/static/css/docdetail.css @@ -73,7 +73,7 @@ } #version-select .option { - width: 100%; + width: 220px; position: absolute; left: -1px; top:39px; @@ -84,13 +84,32 @@ transition: all 0.2s; } #version-select .option-active{ - height: 264px; + height: 168px; + overflow-y: scroll; +} +#version-select .option-active::-webkit-scrollbar{ + width: 4px; + height: 8px; + position: relative; + right: 4px; +background-color: var(--e-color-kleinblue7); +} +#version-select .option-active::-webkit-scrollbar-button{ + width: 0; + height: 0; } +#version-select .option-active::-webkit-scrollbar-thumb{ + width: 4px; + height: 4px; + border-radius: 2px; + background-color: #406FE7; +} + #version-select .option-ru-active{ height: 72px; } #version-select .option a { - font-size: 14px; + font-size: 16px; padding-left: 8px; padding-top: 8px; display: block; @@ -101,6 +120,9 @@ position: relative; z-index: 3; } +#version-select .option .active{ + color:#feb32a; +} #version-select .option a:nth-last-of-type(1){ padding-bottom: 8px; } @@ -181,6 +203,9 @@ cursor: pointer; transition: all 0.2s; } +.jstree-ocl{ + transform: rotateZ(90deg); +} #menu-box .jstree-node>.jstree-anchor { display: inline-block; @@ -216,7 +241,9 @@ white-space: nowrap; text-overflow: ellipsis; } - +#docstreeview>ul>li>ul>li a{ + font-size: var( --o-font-size-text) !important; +} #menu-box .jstree-node>.jstree-anchor:focus,#menu-box .jstree-node>.jstree-anchor p { outline: 0; } @@ -301,12 +328,18 @@ display: inline-block; width: 16px; height: 16px; - background-image: url('../img/common/icon-chevron-right.svg'); + background-image: url('../img/common/icon-chevron-right-gray.svg'); background-repeat: no-repeat; background-size: cover; background-position: center center; } +.docs-a>i:nth-last-of-type(1){ + background-image: url('../img/common/icon-chevron-right.svg'); +} .dark .docs-a>i{ + background-image: url('../img/common/icon-chevron-dark-gray.svg'); +} +.dark .docs-a>i:nth-last-of-type(1){ background-image: url('../img/common/icon-chevron-right-dark.svg'); } #prev a,#next a,#toc-list a{ @@ -1357,7 +1390,7 @@ #menu-box .jstree-node>.jstree-anchor, #menu-box .jstree-node>.jstree-anchor p a { color: var(--e-color-text1); - height: 36px; + /* height: 36px; */ /* line-height: 36px; */ } #docstreeview{ diff --git a/static/css/index.css b/static/css/index.css index d9caa9efc..65d162c69 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -140,13 +140,18 @@ #search-input input { width: 78%; - font-size: 20px; + font-size:var(--o-font-size-text); height: 48px; background: var(--e-color-bg-secondary); border: 1px solid transparent; padding-left: 40px; color: var(--e-color-text1); } +#search-input input::-webkit-input-placeholder{ +font-size: var(--o-font-size-text); +line-height: 48px; +font-weight: 300; +} #search-input input:focus{ outline: 1px solid var(--e-color-brand1); } diff --git a/static/css/revision_new.css b/static/css/revision_new.css index 791e1783d..c81452037 100644 --- a/static/css/revision_new.css +++ b/static/css/revision_new.css @@ -407,7 +407,6 @@ background-image: url(../img/common/icon-close-dark.svg); } .icon-servision { - transform: rotateZ(-90deg); margin-right: 17px; width: 24px; height: 24px; @@ -426,12 +425,12 @@ color: var(--e-color-text1); font-size: 14px; } + #h5-menu-top .option .active{ + color: #feb32a; + } .jstree-closed > .jstree-icon { background-image: url(../img/common/down.svg); } - .jstree-open > .jstree-icon { - transform: rotateZ(0deg); - } .jstree-open > .jstree-icon { background-image: url(../img/common/down.svg); } @@ -463,11 +462,12 @@ .jstree-closed > .jstree-icon { background-image: url(../img/common/down.svg); background-size: 16px 16px; - transform: rotateZ(-90deg); + transform: rotateZ(0deg); } .jstree-open > .jstree-icon { background-image: url(../img/common/down.svg); background-size: 16px 16px; + transform: rotateZ(0deg); } .jstree-node a { display: flex; @@ -923,21 +923,21 @@ background-image: url(../img/common/icon-arrow-right.svg); background-size: 100% 100%; transition: all 0.2s; + transform: rotateZ(-90deg); } #menu-box #version-select > span { color: #feb32a; } -#menu-box .open-option::after { - transform: rotateZ(-90deg); +/* #menu-box .open-option::after { + transform: rotateZ(-90deg) !important; background-image: url(../img/common/icon-arrow-right-open.svg) !important; -} +} */ .book-toc { position: fixed; right: 10vw; top: 100px; width: 128px; height: calc(100vh - 426px); - /* border-left: 1px solid var(--e-color-division1); */ } .book-toc::before { display: block; diff --git a/static/css/theme.css b/static/css/theme.css index 3c73d9921..ed81a27e9 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -150,6 +150,8 @@ /* // 边框颜色 */ --e-color-border1: var(--e-color-neutral6); + --e-color-border2: var(--e-color-neutral11); + --e-color-border3: var(--e-color-kleinblue5); /* // 分割线颜色 */ --e-color-division1: var(--e-color-neutral11); @@ -256,7 +258,6 @@ /* // 边框颜色 */ --e-color-border1: var(--e-color-neutral9); - --e-color-border2: var(--e-color-neutral9); /* // 分割线颜色 */ --e-color-division1: var(--e-color-neutral3); diff --git a/static/img/common/icon-chevron-dark-gray.svg b/static/img/common/icon-chevron-dark-gray.svg new file mode 100644 index 000000000..f6b45d49a --- /dev/null +++ b/static/img/common/icon-chevron-dark-gray.svg @@ -0,0 +1,4 @@ + +chevron-right + + diff --git a/static/img/common/icon-chevron-right-gray.svg b/static/img/common/icon-chevron-right-gray.svg new file mode 100644 index 000000000..c4f09b3a7 --- /dev/null +++ b/static/img/common/icon-chevron-right-gray.svg @@ -0,0 +1,4 @@ + +chevron-right + + diff --git a/static/js/docdetail.js b/static/js/docdetail.js index a47cfcf8a..54554ee54 100644 --- a/static/js/docdetail.js +++ b/static/js/docdetail.js @@ -22,6 +22,11 @@ $(function ($) { var sourceLast = urlArr[6].replace("html", "md"); var sourceHref = "https://gitee.com/openeuler/docs/tree/stable2-" + urlArr[3] + "/docs/" + lang + "/docs/" + urlArr[5] + "/" + sourceLast; $("#source").attr("href", sourceHref); + $("#version-select .option a,#h5-menu-top .option a").each(function(){ + if($(this).html()===versionStr){ + $(this).addClass("active") + } + }) if (evaluateParams.lang === "en") { $("#version-select>span,#h5-menu .h5-sersion").text("Version: " + versionStr); } @@ -334,20 +339,28 @@ $(function ($) { function getTreeLink() { setTimeout(function () { - let openEle = $("#menu-box #docstreeview .jstree-container-ul").find(".jstree-open"); + let openEle = $(" #docstreeview .jstree-container-ul").find(".jstree-open"); + let lastBread=''; + let title=$(".markdown h1").html().trim() if(openEle.length){ for (let i = 0; i < openEle.length; i++) { - if (i < openEle.length - 1) { + if (i < openEle.length) { let span = "" - $(".docs-a").append($("#menu-box #docstreeview .jstree-container-ul").find(".jstree-open").eq(i).find("a").first().clone()).append(span); - } else { - let text = $("#menu-box #docstreeview .jstree-container-ul").find(".jstree-open").eq(i).find("a").first().text(); - let span = "" + text + "" - $(".docs-a").append(span); + $(".docs-a").append($(" #docstreeview .jstree-container-ul").find(".jstree-open").eq(i).find("a").first().clone()).append(span); + lastBread= $(" #docstreeview .jstree-container-ul").find(".jstree-open").eq(i).find("a").first().text() } + // else { + // let text = $(" #docstreeview .jstree-container-ul").find(".jstree-open").eq(i).find("a").first().text(); + // let span = "" + text + "" + // lastBread=text + // $(".docs-a").append(span); + // } } + } + if(title!==lastBread){ + $(".docs-a").append( `${title}`); }else{ - $(".docs-a").html($(".markdown h1").html().trim()); + $(".docs-a i:nth-last-of-type(1)").remove() } }, 500); } diff --git a/static/js/sensors.js b/static/js/sensors.js index 06b4e51d0..c02085193 100644 --- a/static/js/sensors.js +++ b/static/js/sensors.js @@ -498,7 +498,7 @@ function startSensor(num) { // 重试最大次数 return; } - if (sensors && window['returnCitySN']) { + if (sensors) { initSensor(); } else { setTimeout(() => { -- Gitee From 0723bae265c7ed1702d3557810c47044810ec884 Mon Sep 17 00:00:00 2001 From: pxq <1456889284@qq.com> Date: Wed, 7 Sep 2022 16:38:04 +0800 Subject: [PATCH 29/29] =?UTF-8?q?style:=E8=A1=A8=E6=A0=BC=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/docs-builder-ru.sh | 2 +- deploy/docs-builder.sh | 2 +- layouts/partials/docs/menu.html | 1 + layouts/partials/docs/test-list2.html | 76 +++++++++++++++++++++++++++ static/css/docdetail.css | 7 +++ static/css/markdown.css | 5 ++ static/css/revision_new.css | 1 + static/js/docdetail.js | 5 +- 8 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 layouts/partials/docs/test-list2.html diff --git a/deploy/docs-builder-ru.sh b/deploy/docs-builder-ru.sh index afdb45f20..0d0265013 100644 --- a/deploy/docs-builder-ru.sh +++ b/deploy/docs-builder-ru.sh @@ -8,7 +8,7 @@ if [ -d "./website" ]; then fi mkdir website -git clone https://gitee.com/panxiangqu/docs +git clone https://gitee.com/openeuler/docs cd ./docs git checkout -b website origin/website cp -r * ../website diff --git a/deploy/docs-builder.sh b/deploy/docs-builder.sh index 87f80fea7..641670e1e 100644 --- a/deploy/docs-builder.sh +++ b/deploy/docs-builder.sh @@ -8,7 +8,7 @@ if [ -d "./website" ]; then fi mkdir website -git clone https://gitee.com/panxiangqu/docs +git clone https://gitee.com/openeuler/docs cd ./docs git checkout -b website origin/website cp -r * ../website diff --git a/layouts/partials/docs/menu.html b/layouts/partials/docs/menu.html index 360cd658d..71364cbd0 100644 --- a/layouts/partials/docs/menu.html +++ b/layouts/partials/docs/menu.html @@ -7,6 +7,7 @@
      {{ partial "docs/menu-bundle" . }} +
      {{ else }} {{ partial "docs/menu-filetree" . }} diff --git a/layouts/partials/docs/test-list2.html b/layouts/partials/docs/test-list2.html new file mode 100644 index 000000000..f9f1abed2 --- /dev/null +++ b/layouts/partials/docs/test-list2.html @@ -0,0 +1,76 @@ + diff --git a/static/css/docdetail.css b/static/css/docdetail.css index 0b6a2457c..c5742087b 100644 --- a/static/css/docdetail.css +++ b/static/css/docdetail.css @@ -31,6 +31,8 @@ height: calc(100vh - 60px); } #menu-box .pc-logo{ + width: 260px; + height: 52px; padding-left: 40px; } #menu-box .pc-logo a{ @@ -315,6 +317,9 @@ background-color: var(--e-color-kleinblue7); .docs-a a{ color: var(--e-color-text4) } +.docs-a a:nth-last-of-type(1){ + color: var(--e-color-text1); +} @media screen and (max-width: 1100px) { .docs-a a,.docs-a span{ font-size: 12px; @@ -407,10 +412,12 @@ background-color: var(--e-color-kleinblue7); color: var(--e-color-brand1); } .icon-prev{ + width: 16px; transform: rotateZ(180deg); margin-right: 8px; } .icon-next{ + width: 16px; margin-left: 8px; } diff --git a/static/css/markdown.css b/static/css/markdown.css index 0d13df8a6..b2b54d78f 100644 --- a/static/css/markdown.css +++ b/static/css/markdown.css @@ -188,6 +188,11 @@ padding-left: var(--o-spacing-h3); line-height: var(--o-line-height-text); } +.markdown table tr td p,.markdown table tr th p{ + padding: 16px 0; + min-height: 54px; + line-height: 22px; +} @media screen and (max-width: 768px) { .markdown table tr td { padding-left: var(--o-spacing-h6); diff --git a/static/css/revision_new.css b/static/css/revision_new.css index c81452037..cd4311e52 100644 --- a/static/css/revision_new.css +++ b/static/css/revision_new.css @@ -907,6 +907,7 @@ color: #fff; font-size: var(--o-font-size-h8); margin-top: 53px; + margin-bottom: 24px; margin-left: 40px; padding: 0 8px; border: 1px solid var(--e-color-kleinblue7); diff --git a/static/js/docdetail.js b/static/js/docdetail.js index 54554ee54..ee924ab7d 100644 --- a/static/js/docdetail.js +++ b/static/js/docdetail.js @@ -215,7 +215,7 @@ $(function ($) { if(submitType==="issue"){ window.open(`https://gitee.com/openeuler/docs/issues/new?issue%5Bassignee_id%5D=0&issue%5Bmilestone_id%5D=0&title=有奖捉虫&description=${body}`) }else{ - window.open(`https://gitee.com/-/ide/project/openeuler/docs/edit/master/-/docs/zh/docs/${path}?search=${questionValue}&title=文档捉虫-openEuler ${version}-${title}&description=${feedback}&message=${feedback}&label_names=有奖捉虫`) + window.open(`https://gitee.com/-/ide/project/openeuler/docs/edit/master/-/docs/zh/docs/${path}?search=${questionValue}&title=文档捉虫-openEuler ${version}-${title}&description=${feedback}&message=${feedback}&label_names=文档捉虫`) } } else { console.error(JSON.parse(data)); @@ -290,7 +290,6 @@ $(function ($) { count = $(".issue-reason").val().length; $("#text-count-tow").text(count); }) - // TODO:传参更新 $('.submit-type .type-issue,.submit-type .type-PR').on('click', function (){ if ($(this).hasClass("active-submit")) { $(this).removeClass("active-submit"); @@ -358,7 +357,7 @@ function getTreeLink() { } } if(title!==lastBread){ - $(".docs-a").append( `${title}`); + $(".docs-a").append( `${title}`); }else{ $(".docs-a i:nth-last-of-type(1)").remove() } -- Gitee