docs/layouts/_default/list.html

257 lines
8.5 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{ define "title" }}
{{ .Title }} {{ .Site.Title }}
{{ end }}
{{ define "hero" }}
{{ end }}
{{ define "main" }}
<section class="docs-container">
<div class="grid-container">
<div class="row max-sized set-lines set-ground">
<div class="col-4"></div>
<div class="col-4"></div>
<div class="col-4"></div>
</div>
<div class="head-blank">
</div>
<div class="row max-sized contents-container background-base-gray-side">
{{ $url := urls.Parse .Permalink }}
{{ $path := split $url.Path "/" }}
{{ $product := index $path 1 }}
{{ $version := index $path 2 }}
{{ $productVersion := printf "%s/%s" $product $version}}
{{ if or (in .Dir "/v2.0-v2.4") (in .Dir "/v2.5") (in .Dir "/v2.6") }}
<div class="alert alert-notice">
<strong>Rancher Manager docs are in the process of migrating to a new website as we transition to a new documentation structure, <a href="https://documentation.divio.com/"> Divio</a>. We will update the community with the new site information after it is launched.</strong>
</div>
{{end}}
{{ if or (in .Dir "k3s/latest") }}
<div class="alert alert-notice">
<strong>The K3s docs will be moving from the Rancher docs website to a separate website. We will update the community with the new site information after it is launched.</strong>
</div>
{{end}}
{{ if or (in .Dir "rke/latest") }}
<div class="alert alert-notice">
<strong>The RKE1 docs will be moving from the Rancher docs website to a separate website. We will update the community with the new site information after it is launched.</strong>
</div>
{{end}}
{{ if or (in .Dir "os/v1.x") }}
<div class="alert alert-notice">
<strong>Note that RancherOS 1.x is currently in a maintain-only-as-essential mode, and it is no longer being actively maintained at a code level other than addressing critical or security fixes.</strong>
</div>
{{end}}
<div class="
col-xl-3
col-lg-4
col-md-4
col-sm-12
col-xs-12
col-12
side-menus">
<div class="search-container">
<input class="search input" placeholder="SEARCH" />
</div>
<!-- <div class="side-menus-wrap jquery-accordion-menu"> -->
{{ partial "docs-side-nav.html" . }}
<!-- </div> -->
</div>
<div class="
col-xl-9
col-lg-8
col-md-8
col-sm-12
col-xs-12
col-12
texts-container">
<div class="docs-wrap">
<div class="docs-cta">
<a class="icon">?</a>
<span class="content">
<strong>Need Help? </strong>
&nbsp;<a href="https://rancher.com/training">Get free intro and advanced online training</a>
</span>
<a class="close">&times;</a>
</div>
<script>
function getCookie(name) {
var cookieArr = document.cookie.split(";");
for (var i = 0; i < cookieArr.length; i++) {
var cookiePair = cookieArr[i].split("=");
if (name == cookiePair[0].trim()) {
return decodeURIComponent(cookiePair[1]);
}
}
return null;
}
if (getCookie('ctaClosed') == 'true') {
$('.docs-cta .content, .docs-cta .close').hide();
$('.docs-cta').addClass('closed');
}
$('.docs-cta .icon').click(function (e) {
e.preventDefault;
$('.docs-cta .content, .docs-cta .close').show('fast');
$('.docs-cta').removeClass('closed');
document.cookie = "ctaClosed=false;path=/";
});
$('.docs-cta .close').click(function (e) {
e.preventDefault;
$('.docs-cta .content, .docs-cta .close').hide('fast');
$('.docs-cta').addClass('closed');
document.cookie = "ctaClosed=true;SameSite=Lax;path=/;max-age=" + 10 * 24 * 60 * 60;
});
</script>
{{ with .Params.Title }}
<h1 class="m-t-0">{{ . }}</h1>
<hr />
{{end}}
{{ if .Params.ctaBanner }}
{{ with index .Site.Data.cta .Params.ctaBanner }}
<div class="docs-banner">
<h3 class="">{{ .header }}</h3>
<div class="buttons-container">
<a href="{{ .link }}" target="_blank" class="btn border-btn">
<button class="button has-icon-right">
<span>{{ .button }}</span>
<svg class="icon right" enable-background="new 0 0 34 34" viewBox="0 0 34 34"
xmlns="http://www.w3.org/2000/svg">
<g>
<path class="svg-linear" d="m19.5 12 5 5-5 5"></path>
<path class="svg-linear" d="m24.5 17h-15"></path>
</g>
</svg>
</button>
</a>
</div>
</div>
{{ end }}
{{ end }}
<div class="main-content docs-body">
<!-- this is a test -->
<!-- {{ partial "page-nav.html" . }} -->
<!-- end test -->
{{ .Content }}
{{ $paginator := .Scratch.Get "paginator" }}
{{ range $paginator.Pages }}
<div class="box m-b-md">
<div class="p-a-sm">
<h3><a href="{{.URL}}">{{.Title}}</a></h3>
{{ if .Params.Image }}
<div class="thumbnail"><img src="{{ .Params.Image }}" alt="{{ .Params.Title }}"></div>
{{end}}
<p>{{ .Summary | safeHTML }}</p>
{{ if .Truncated }}
<div>
<a href="{{ .RelPermalink }}">Read More…</a>
</div>
{{ end }}
</div>
<div class="bg-default">
<div class="row">
{{ with .Params.Author }}
<div class="p-h-sm p-v-xs"><i class="material-icons">person_outline</i> By: {{ . }}</div>
{{end}}
{{ if eq .Section "events" }}
{{ with .Params.EventDate }}
<div class="p-h-sm p-v-xs"><i class="material-icons">event</i> {{ . }}</div>
{{end}}
{{ else }}
{{ with .Params.Date }}
<div class="p-h-sm p-v-xs"><i class="material-icons">event</i> {{ .Format "January 2, 2006" }}</div>
{{end}}
{{end}}
{{ if eq .Section "blog" }}
<div class="p-h-sm p-v-xs"><i class="material-icons">timer</i> Read Time: {{.ReadingTime}} minutes
</div>
{{end}}
{{ with .Params.Location }}
<div class="p-h-sm p-v-xs"><i class="material-icons">location_on</i> {{ . }}</div>
{{end}}
</div>
</div>
</div>
{{ end }}
</div>
{{ template "_internal/pagination.html" . }}
<div class="p-v-xs">{{ partial "page-edit.html" . }}</div>
</article>
<!-- {{ with .TableOfContents }}
<div class="offset-watch invisible"></div>
<aside class="col-sm-2 col-xs-12 unstyled toc-container hidden-md">
<h4 class="m-b-0">On this page</h4>
{{ . }}
</aside>
{{ end }} -->
</div>
</div>
</div>
</section>
<script>
$(document).ready(function () {
$('.guide-menus-activator').click(function () {
$('.docs-container .side-menus').toggleClass('show');
});
// anchor click control.
$("a[href*='#']").click(function (e) {
// e.preventDefault();
if ($(this).attr('data-target') === undefined && $(this).attr('href').length > 1) {
var hash = $(this).attr('href').substring(1),
objt = $('#' + hash),
objt_mt = Number(objt.css('margin-top').replace(/[^0-9]/g, "")),
depth = 80,
scrn = $(window).width();
scrn_check = 1025;
if (scrn < scrn_check) {
depth = 120;
}
if (objt_mt > 0) {
depth = depth + objt_mt
}
if ($(this).attr('href').charAt(0) === '#') {
var objectTop = $($(this).attr('href')).offset().top;
setTimeout(function () {
$('html').scrollTop(objectTop - depth);
}, 100);
}
}
});
});
</script>
{{ end }}