From dee302a63cde55a0e8542c8efc3bee5a88565500 Mon Sep 17 00:00:00 2001 From: lvuch Date: Mon, 25 Jun 2018 16:02:39 -0700 Subject: [PATCH 1/4] layout and style changes --- layouts/_default/list.html | 46 +++++++++++++----------- layouts/_default/single.html | 36 ++++++++----------- layouts/partials/docs-side-nav.html | 54 +++++++++++++++++++++++++++-- 3 files changed, 91 insertions(+), 45 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b4cf988cb2f..d379e12456b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -4,7 +4,22 @@ {{ define "hero" }}
-

Rancher Docs

+
+ {{ range $product := $.Site.Sections }} + {{ range $version := .Sections }} + {{ range $language := .Sections }} + {{if $.CurrentSection}} + {{ if .IsAncestor $.CurrentSection }} + {{ .Params.shortTitle }} + {{end}} + {{end}} + {{end}} + {{end}} + {{end}} +
+ {{ with .Params.Title }} +

{{ . }}

+ {{end}} {{ with .Params.Author }} @@ -13,29 +28,18 @@ {{ end }} {{ define "main" }} -
- {{ partial "docs-nav.html" . }} - {{ $secondLevel := ($.Scratch.Get "secondLevel") }} - {{ $.Scratch.Set "showSidebar" false }} - {{ with $secondLevel }} - {{ if (gt (len .Sections) 0) }} - {{ $.Scratch.Set "showSidebar" true }} - {{end}} - {{end}} +
- {{ if ($.Scratch.Get "showSidebar") }} - - {{end}} -
+ + +
- {{ with .Params.Title }} -

{{ . }}

- {{end}} + {{ .Content }} {{ range (.Paginator 5).Pages }} @@ -92,13 +96,13 @@
{{ partial "page-edit.html" . }}
- {{ with .TableOfContents }} +
{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 049c70bc34b..f5231f970ab 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,7 +4,10 @@ {{ define "hero" }}
-

Rancher Docs

+
Rancher 2.0 Docs
+ {{ with .Params.Title }} +

{{ . }}

+ {{end}} {{ with .Params.Author }} @@ -13,40 +16,29 @@ {{ end }} {{ define "main" }} -
- {{ partial "docs-nav.html" . }} - {{ $secondLevel := ($.Scratch.Get "secondLevel") }} - {{ $.Scratch.Set "showSidebar" false }} - {{ with $secondLevel }} - {{ if (gt (len .Sections) 0) }} - {{ $.Scratch.Set "showSidebar" true }} - {{end}} - {{end}} +
- {{ if ($.Scratch.Get "showSidebar") }} - - {{end}} -
+ + +
- {{ with .Params.Title }} -

{{ . }}

- {{end}} + {{ .Content }}
{{ partial "page-edit.html" . }}
- -
diff --git a/layouts/partials/docs-side-nav.html b/layouts/partials/docs-side-nav.html index b87ef0c1100..f506673c6d2 100644 --- a/layouts/partials/docs-side-nav.html +++ b/layouts/partials/docs-side-nav.html @@ -1,13 +1,63 @@ +{{ $.Scratch.Set "topLevel" . }} +{{ range $product := $.Site.Sections }} + {{ range $version := .Sections }} + {{ range $language := .Sections }} + {{if $.CurrentSection}} + {{ if .IsAncestor $.CurrentSection }} + {{ $.Scratch.Set "topLevel" . }} + {{end}} + {{end}} + {{end}} + {{end}} +{{end}} + + + + {{ define "section-tree-nav" }} {{ range .Sections}}
  • {{ .Title }} {{if gt (len .Sections) 0}} - add_box + add_box
      {{ range .Pages }}
    • {{ .Title }}
    • From 01e88021aab6e333071cd752b8ebc0e8e7deaf60 Mon Sep 17 00:00:00 2001 From: lvuch Date: Mon, 25 Jun 2018 16:02:39 -0700 Subject: [PATCH 2/4] layout and style changes --- layouts/_default/list.html | 46 +++++++++++++----------- layouts/_default/single.html | 36 ++++++++----------- layouts/partials/docs-side-nav.html | 54 +++++++++++++++++++++++++++-- 3 files changed, 91 insertions(+), 45 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b4cf988cb2f..d379e12456b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -4,7 +4,22 @@ {{ define "hero" }}
      -

      Rancher Docs

      +
      + {{ range $product := $.Site.Sections }} + {{ range $version := .Sections }} + {{ range $language := .Sections }} + {{if $.CurrentSection}} + {{ if .IsAncestor $.CurrentSection }} + {{ .Params.shortTitle }} + {{end}} + {{end}} + {{end}} + {{end}} + {{end}} +
      + {{ with .Params.Title }} +

      {{ . }}

      + {{end}} {{ with .Params.Author }} @@ -13,29 +28,18 @@ {{ end }} {{ define "main" }} -
      - {{ partial "docs-nav.html" . }} - {{ $secondLevel := ($.Scratch.Get "secondLevel") }} - {{ $.Scratch.Set "showSidebar" false }} - {{ with $secondLevel }} - {{ if (gt (len .Sections) 0) }} - {{ $.Scratch.Set "showSidebar" true }} - {{end}} - {{end}} +
      - {{ if ($.Scratch.Get "showSidebar") }} - - {{end}} -
      + + +
      - {{ with .Params.Title }} -

      {{ . }}

      - {{end}} + {{ .Content }} {{ range (.Paginator 5).Pages }} @@ -92,13 +96,13 @@
      {{ partial "page-edit.html" . }}
      - {{ with .TableOfContents }} +
      {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 049c70bc34b..f5231f970ab 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,7 +4,10 @@ {{ define "hero" }}
      -

      Rancher Docs

      +
      Rancher 2.0 Docs
      + {{ with .Params.Title }} +

      {{ . }}

      + {{end}} {{ with .Params.Author }} @@ -13,40 +16,29 @@ {{ end }} {{ define "main" }} -
      - {{ partial "docs-nav.html" . }} - {{ $secondLevel := ($.Scratch.Get "secondLevel") }} - {{ $.Scratch.Set "showSidebar" false }} - {{ with $secondLevel }} - {{ if (gt (len .Sections) 0) }} - {{ $.Scratch.Set "showSidebar" true }} - {{end}} - {{end}} +
      - {{ if ($.Scratch.Get "showSidebar") }} - - {{end}} -
      + + +
      - {{ with .Params.Title }} -

      {{ . }}

      - {{end}} + {{ .Content }}
      {{ partial "page-edit.html" . }}
      - -
      diff --git a/layouts/partials/docs-side-nav.html b/layouts/partials/docs-side-nav.html index b87ef0c1100..f506673c6d2 100644 --- a/layouts/partials/docs-side-nav.html +++ b/layouts/partials/docs-side-nav.html @@ -1,13 +1,63 @@ +{{ $.Scratch.Set "topLevel" . }} +{{ range $product := $.Site.Sections }} + {{ range $version := .Sections }} + {{ range $language := .Sections }} + {{if $.CurrentSection}} + {{ if .IsAncestor $.CurrentSection }} + {{ $.Scratch.Set "topLevel" . }} + {{end}} + {{end}} + {{end}} + {{end}} +{{end}} + + + + {{ define "section-tree-nav" }} {{ range .Sections}}
    • {{ .Title }} {{if gt (len .Sections) 0}} - add_box + add_box
        {{ range .Pages }}
      • {{ .Title }}
      • From 64ffc10683c164df2ddf6992ab22537ba75c7356 Mon Sep 17 00:00:00 2001 From: lvuch Date: Wed, 27 Jun 2018 11:15:08 -0700 Subject: [PATCH 3/4] layout change --- layouts/_default/list.html | 31 ++++++-------------------- layouts/shortcodes/persistentdata.html | 2 +- layouts/shortcodes/ssl_faq_ha.html | 2 +- layouts/shortcodes/ssl_faq_single.html | 2 +- 4 files changed, 10 insertions(+), 27 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d379e12456b..2995a0e45c4 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,28 +3,6 @@ {{ end }} {{ define "hero" }} -
        -
        - {{ range $product := $.Site.Sections }} - {{ range $version := .Sections }} - {{ range $language := .Sections }} - {{if $.CurrentSection}} - {{ if .IsAncestor $.CurrentSection }} - {{ .Params.shortTitle }} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} -
        - {{ with .Params.Title }} -

        {{ . }}

        - {{end}} - - {{ with .Params.Author }} - - {{end}} -
        {{ end }} {{ define "main" }} @@ -36,9 +14,14 @@ {{ partial "docs-side-nav.html" . }} -
        +
        -
        + {{ with .Params.Title }} +

        {{ . }}

        +
        + {{end}} + +
        {{ .Content }} diff --git a/layouts/shortcodes/persistentdata.html b/layouts/shortcodes/persistentdata.html index 38fa799cea4..26110d682b4 100644 --- a/layouts/shortcodes/persistentdata.html +++ b/layouts/shortcodes/persistentdata.html @@ -1,7 +1,7 @@

        Rancher uses etcd as datastore. When using the Single Node Install, the embedded etcd is being used. The persistent data is at the following path in the container: /var/lib/rancher. You can bind mount a host volume to this location to preserve data on the host it is running on.

        -

        Command

        +
        Command:
         docker run -d --restart=unless-stopped \
        diff --git a/layouts/shortcodes/ssl_faq_ha.html b/layouts/shortcodes/ssl_faq_ha.html
        index a8142f34d4a..84c0c8f7738 100644
        --- a/layouts/shortcodes/ssl_faq_ha.html
        +++ b/layouts/shortcodes/ssl_faq_ha.html
        @@ -52,7 +52,7 @@ certutil -encode FILENAME FILENAME.base64
         
         

        You can validate the certificate chain by using the openssl binary. If the output of the command (see the command example below) ends with Verify return code: 0 (ok), your certificate chain is valid. The ca.pem file must be the same as you added to the rancher/rancher container. When using a certificate signed by a recognized Certificate Authority, you can omit the -CAfile parameter.

        -

        Command

        +
        Command:
         openssl s_client -CAfile ca.pem -connect rancher.yourdomain.com:443
         ...
        diff --git a/layouts/shortcodes/ssl_faq_single.html b/layouts/shortcodes/ssl_faq_single.html
        index 999810a4dd4..aa3d2acefae 100644
        --- a/layouts/shortcodes/ssl_faq_single.html
        +++ b/layouts/shortcodes/ssl_faq_single.html
        @@ -34,7 +34,7 @@ VWQqljhfacYPgp8KJUJENQ9h5hZ2nSCrI+W00Jcw4QcEdCI8HL5wmg==
         
         

        You can validate the certificate chain by using the openssl binary. If the output of the command (see the command example below) ends with Verify return code: 0 (ok), your certificate chain is valid. The ca.pem file must be the same as you added to the rancher/rancher container. When using a certificate signed by a recognized Certificate Authority, you can omit the -CAfile parameter.

        -

        Command

        +
        Command:
         openssl s_client -CAfile ca.pem -connect rancher.yourdomain.com:443
         ...
        
        From 2e4b4e98749e512cf4fc768bd28c0e6ff77cf149 Mon Sep 17 00:00:00 2001
        From: lvuch 
        Date: Wed, 27 Jun 2018 11:15:08 -0700
        Subject: [PATCH 4/4] layout change
        
        ---
         layouts/_default/list.html             | 31 ++++++--------------------
         layouts/shortcodes/persistentdata.html |  2 +-
         layouts/shortcodes/ssl_faq_ha.html     |  2 +-
         layouts/shortcodes/ssl_faq_single.html |  2 +-
         4 files changed, 10 insertions(+), 27 deletions(-)
        
        diff --git a/layouts/_default/list.html b/layouts/_default/list.html
        index d379e12456b..2995a0e45c4 100644
        --- a/layouts/_default/list.html
        +++ b/layouts/_default/list.html
        @@ -3,28 +3,6 @@
         {{ end }}
         
         {{ define "hero" }}
        -
        -
        - {{ range $product := $.Site.Sections }} - {{ range $version := .Sections }} - {{ range $language := .Sections }} - {{if $.CurrentSection}} - {{ if .IsAncestor $.CurrentSection }} - {{ .Params.shortTitle }} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} -
        - {{ with .Params.Title }} -

        {{ . }}

        - {{end}} - - {{ with .Params.Author }} - - {{end}} -
        {{ end }} {{ define "main" }} @@ -36,9 +14,14 @@ {{ partial "docs-side-nav.html" . }} -
        +
        -
        + {{ with .Params.Title }} +

        {{ . }}

        +
        + {{end}} + +
        {{ .Content }} diff --git a/layouts/shortcodes/persistentdata.html b/layouts/shortcodes/persistentdata.html index 38fa799cea4..26110d682b4 100644 --- a/layouts/shortcodes/persistentdata.html +++ b/layouts/shortcodes/persistentdata.html @@ -1,7 +1,7 @@

        Rancher uses etcd as datastore. When using the Single Node Install, the embedded etcd is being used. The persistent data is at the following path in the container: /var/lib/rancher. You can bind mount a host volume to this location to preserve data on the host it is running on.

        -

        Command

        +
        Command:
         docker run -d --restart=unless-stopped \
        diff --git a/layouts/shortcodes/ssl_faq_ha.html b/layouts/shortcodes/ssl_faq_ha.html
        index a8142f34d4a..84c0c8f7738 100644
        --- a/layouts/shortcodes/ssl_faq_ha.html
        +++ b/layouts/shortcodes/ssl_faq_ha.html
        @@ -52,7 +52,7 @@ certutil -encode FILENAME FILENAME.base64
         
         

        You can validate the certificate chain by using the openssl binary. If the output of the command (see the command example below) ends with Verify return code: 0 (ok), your certificate chain is valid. The ca.pem file must be the same as you added to the rancher/rancher container. When using a certificate signed by a recognized Certificate Authority, you can omit the -CAfile parameter.

        -

        Command

        +
        Command:
         openssl s_client -CAfile ca.pem -connect rancher.yourdomain.com:443
         ...
        diff --git a/layouts/shortcodes/ssl_faq_single.html b/layouts/shortcodes/ssl_faq_single.html
        index 999810a4dd4..aa3d2acefae 100644
        --- a/layouts/shortcodes/ssl_faq_single.html
        +++ b/layouts/shortcodes/ssl_faq_single.html
        @@ -34,7 +34,7 @@ VWQqljhfacYPgp8KJUJENQ9h5hZ2nSCrI+W00Jcw4QcEdCI8HL5wmg==
         
         

        You can validate the certificate chain by using the openssl binary. If the output of the command (see the command example below) ends with Verify return code: 0 (ok), your certificate chain is valid. The ca.pem file must be the same as you added to the rancher/rancher container. When using a certificate signed by a recognized Certificate Authority, you can omit the -CAfile parameter.

        -

        Command

        +
        Command:
         openssl s_client -CAfile ca.pem -connect rancher.yourdomain.com:443
         ...