You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/12/01 05:06:19 UTC

[shardingsphere-on-cloud] branch main updated: chore(docs): update docs for layout 1. remove `download pdf` button 2. fix 404 page when switch language

This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shardingsphere-on-cloud.git


The following commit(s) were added to refs/heads/main by this push:
     new 492bc4a  chore(docs): update docs for layout 1. remove `download pdf` button 2. fix 404 page when switch language
     new 6deeef0  Merge pull request #126 from xuanyuan300/update-doc-layout
492bc4a is described below

commit 492bc4aa92f3375a3cf57953f7879622360438f9
Author: xuanyuan300 <xu...@gmail.com>
AuthorDate: Thu Dec 1 13:00:32 2022 +0800

    chore(docs): update docs for layout
    1. remove `download pdf` button
    2. fix 404 page when switch language
    
    Signed-off-by: xuanyuan300 <xu...@gmail.com>
---
 .../layouts/partials/language.html                 | 22 ++--------------------
 .../hugo-theme-learn/layouts/partials/menu.html    | 11 +----------
 2 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/docs/themes/hugo-theme-learn/layouts/partials/language.html b/docs/themes/hugo-theme-learn/layouts/partials/language.html
index 8b00f16..7d5b40b 100644
--- a/docs/themes/hugo-theme-learn/layouts/partials/language.html
+++ b/docs/themes/hugo-theme-learn/layouts/partials/language.html
@@ -7,24 +7,6 @@
           <ul>
           {{ if and .Site.IsMultiLingual (not .Site.Params.DisableLanguageSwitchingButton)}}
             <li>
-              <a class="padding">
-                <i class="fa fa-fw fa-tags"></i>
-              <div class="select-style">
-                <select id="select-version" onchange="location = this.value;">
-              {{ $versions := slice "current" "5.2.1" "5.2.0" "5.1.2" "5.1.1" "5.1.0" "5.0.0-RC1" "5.0.0-beta" "5.0.0-alpha" "5.0.0" "4.1.1" "4.1.0" "4.0.1" "4.0.0-RC3" "4.0.0-RC2" "4.0.0-RC1" "4.0.0" "3.1.0.M1" "3.1.0" "3.0.0.M4" "3.0.0.M3" "3.0.0.M2" "3.0.0.M1" "3.0.0" "2.0.3" "2.0.2" "2.0.1" "2.0.0.M3" "2.0.0.M2" "2.0.0.M1" "2.0.0" "1.5.4.1" "1.5.4" "1.5.3" "1.5.2" "1.5.1" "1.5.0.M3" "1.5.0.M2" "1.5.0.M1" "1.5.0" "1.4.2" "1.4.1" "1.4.0" "1.3.3" "1.3.2" "1.3.1" "1.3.0" "1.2.1" "1.2.0"  [...]
-              {{ $permalink }}
-              {{ range $versions }}
-                {{ $version := . }}
-                {{ if strings.HasSuffix $permalink $version }}
-                  <option id="{{ $version }}" value="{{ replaceRE "document/[\\w|-]*" (printf "document/%s" $version) $permalink }}" selected>{{ $version }}</option>
-                {{ else }}
-                  <option id="{{ $version }}" value="{{ replaceRE "document/[\\w|-]*" (printf "document/%s" $version) $permalink }}" >{{ $version }}</option>
-                {{ end }}
-              {{ end }}
-                </select>
-                <svg t="1645437162166" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2449" width="32" height="32"><path d="M483.072 714.496l30.165333 30.208 415.957334-415.829333a42.837333 42.837333 0 0 0 0-60.288 42.538667 42.538667 0 0 0-60.330667-0.042667l-355.541333 355.413333-355.242667-355.413333a42.496 42.496 0 0 0-60.288 0 42.837333 42.837333 0 0 0-0.085333 60.330667l383.701333 383.872 1.706667 1.749333z" fill="#3D3D3D" p-id="2450"></ [...]
-              </div>
-              </a>
               <a class="padding">
                 <i class="fa fa-fw fa-language"></i>
               <div class="select-style">
@@ -37,9 +19,9 @@
                       {{ if eq $translation.Lang .Lang }}
                         {{ $selected := false }}
                         {{ if eq $pageLang .Lang}}
-                          <option id="{{ $translation.Language }}" value="{{ $translation.URL }}" selected>{{ .LanguageName }}</option>
+                          <option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}" selected>{{ .LanguageName }}</option>
                         {{ else }}
-                          <option id="{{ $translation.Language }}" value="{{ $translation.URL }}">{{ .LanguageName }}</option>
+                          <option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}">{{ .LanguageName }}</option>
                         {{ end }}
                       {{ end }}
                   {{ end }}
diff --git a/docs/themes/hugo-theme-learn/layouts/partials/menu.html b/docs/themes/hugo-theme-learn/layouts/partials/menu.html
index 19f68aa..cb0faf2 100644
--- a/docs/themes/hugo-theme-learn/layouts/partials/menu.html
+++ b/docs/themes/hugo-theme-learn/layouts/partials/menu.html
@@ -43,17 +43,8 @@
     </div>
     <!-- {{ partial "language.html" . }} -->
 
-    <!-- download button -->
     <!-- <hr /> -->
-    {{ if eq .Lang "en"}}
-      <a class="padding" href="{{"https://shardingsphere.apache.org/pdf/shardingsphere_docs_en.pdf" | absURL}}">
-        <!--i class="fa fa-fw fa-file-pdf-o" ></i>&nbsp;-->Download PDF<!--&nbsp;&nbsp;&nbsp; is a placeholder-->
-    {{ else }}  
-      <a class="padding" href="{{"https://shardingsphere.apache.org/pdf/shardingsphere_docs_cn.pdf" | absURL}}">
-        <!-- class="fa fa-fw fa-file-pdf-o" ></i>&nbsp;-->下载PDF文档<!--&nbsp;&nbsp; &nbsp; is a placeholder -->
-    {{end}}
-    </a>
-    
+
     <section id="footer">
       {{ partial "menu-footer.html" . }}
     </section>