mirror of
https://github.com/kubesphere/website.git
synced 2025-12-26 00:12:48 +00:00
90 lines
2.5 KiB
HTML
90 lines
2.5 KiB
HTML
{{ define "main" }}
|
|
|
|
{{ $disabledVersions := slice "v3.3" "v3.4" "v4.1" }}
|
|
{{ $currentVersion := index (strings.FindRE `v[0-9]+\.[0-9]+` .RelPermalink) 0 }}
|
|
|
|
{{ if in $disabledVersions $currentVersion }}
|
|
<script>window.location.replace('/404.html');</script>
|
|
<noscript>
|
|
<meta http-equiv="refresh" content="0; url=/404.html">
|
|
</noscript>
|
|
{{ return }}
|
|
{{ end }}
|
|
|
|
{{ with .Params.section1 }}
|
|
<section class='section-1 bg-cover' style='background-image: url("{{ .image }}");'>
|
|
<div class="title-div common-layout">
|
|
<h1 class="title-h1">{{ .title }}</h1>
|
|
<p class="common-p">{{ .content }}</p>
|
|
<div class="search-div">
|
|
{{ partial "searchInput" . }}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{{ end }}
|
|
{{ $Site := .Site }}
|
|
{{ with .Params.sectionLink }}
|
|
<section class="section-link">
|
|
<div class="common-layout">
|
|
{{ with .docs}}
|
|
<div class="left">
|
|
<h2>{{ .title }}</h2>
|
|
<p>{{ .description }}</p>
|
|
<ul>
|
|
{{ range .list }}
|
|
<li>
|
|
{{ with $Site.GetPage . }}
|
|
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
|
{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ end }}
|
|
{{ with .videos}}
|
|
<div class="right">
|
|
<h2>{{ .title }}</h2>
|
|
<p>{{ .description }}</p>
|
|
<ul>
|
|
{{ range .list }}
|
|
<li>
|
|
<span>{{ .text }}</span>
|
|
<a href="{{ .link }}" target="_blank" aria-label="link"></a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
</section>
|
|
{{ end }}
|
|
|
|
<section class="section-2">
|
|
<div class="common-layout">
|
|
{{ partial "section" (dict "context" .) }}
|
|
</div>
|
|
</section>
|
|
|
|
{{ with .Params.section3 }}
|
|
<section class="section-3">
|
|
<div class="common-layout">
|
|
<div class="left-part-div">
|
|
<h2>{{ .title }}</h2>
|
|
<p>{{ .description }}</p>
|
|
<div class="common-flex-layout">
|
|
{{ range .list }}
|
|
<div>
|
|
<img src="{{ .image }}" alt="">
|
|
<p><a href="{{ .link }}">{{ .content }}</a></p>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
<div class="right-part-div">
|
|
<h3>{{ .titleRight }}</h3>
|
|
<a href="{{ .btnLink }}"><button>{{ .btnContent }}</button></a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{{ end }}
|
|
{{ end }} |