mirror of
https://github.com/kubesphere/website.git
synced 2025-12-26 00:12:48 +00:00
130 lines
6.5 KiB
HTML
130 lines
6.5 KiB
HTML
|
|
<meta charset="utf-8">
|
|
<title>{{ with .Params.Title }}{{ . }}{{ else }}{{ with .Site.Params.title }}{{ . }}{{ end }}{{ end }}</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<meta name="description" content="{{ with .Params.Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
|
|
<meta name="keywords" content="{{ with .Params.Keywords }}{{ range $i, $e := . }}{{ if $i }} {{ end }}{{ $e }}{{ end }}{{ else }}{{ with .Site.Params.keywords }}{{ . }}{{ end }}{{ end }}">
|
|
|
|
<meta property="og:type" content="article"/>
|
|
<meta property="og:title" content="{{ with .Params.Title }}{{ . }}{{ else }}{{ with .Site.Params.title }}{{ . }}{{ end }}{{ end }}"/>
|
|
<meta property="og:description" content="{{ with .Params.Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}"/>
|
|
<meta property="og:image" content="{{ with .Params.snapshot }}{{ . }}{{ else }}{{ with .Site.Params.snapshot }}{{ . | absURL }}{{ end }}{{ end }}"/>
|
|
<meta property="og:url" content="{{ .Permalink }}"/>
|
|
|
|
<meta name="docsearch:language" content="{{ .Site.LanguageCode }}" />
|
|
|
|
<link rel="canonical" href="https://kubesphere.io{{ .RelPermalink }}" />
|
|
|
|
{{- partial "css.html" . -}}
|
|
|
|
<script src='{{ "js/jquery-3.5.0.min.js" | relURL }}'></script>
|
|
<script src='{{ "js/viewer.min.js" | relURL }}'></script>
|
|
<script src='{{ "js/jquery.modal.min.js" | relURL }}'></script>
|
|
|
|
{{ if .IsDescendant (.GetPage "/docs") }}
|
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
|
|
{{ end }}
|
|
|
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
{{ if .Site.Params.addGoogleAnalytics }}
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-181950513-1"></script>
|
|
<script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
|
|
|
|
gtag('config', 'UA-181950513-1');
|
|
</script>
|
|
{{ end }}
|
|
|
|
{{ if .Site.Params.addGoogleTag }}
|
|
<!-- Google Tag Manager -->
|
|
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
})(window,document,'script','dataLayer','GTM-W9FLX4R');</script>
|
|
<!-- End Google Tag Manager -->
|
|
|
|
<script type="text/javascript" src="//script.crazyegg.com/pages/scripts/0100/4419.js" async="async"></script>
|
|
{{ end }}
|
|
|
|
<!-- GrowingIO Analytics code version 2.1 -->
|
|
<!-- Copyright 2015-2017 GrowingIO, Inc. More info available at http://www.growingio.com -->
|
|
<script type='text/javascript'>
|
|
!function(e,t,n,g,i){e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},n=t.createElement("script"),tag=t.getElementsByTagName("script")[0],n.async=1,n.src=('https:'==document.location.protocol?'https://':'http://')+g,tag.parentNode.insertBefore(n,tag)}(window,document,"script","assets.giocdn.com/2.1/gio.js","gio");
|
|
gio('init', '8a24ae300cbf8b8c', {});
|
|
//custom page code begin here
|
|
//custom page code end here
|
|
gio('send');
|
|
</script>
|
|
<!-- End GrowingIO Analytics code version: 2.1 -->
|
|
|
|
<!-- Hotjar Tracking Code for https://kubesphere.io/docs/ -->
|
|
{{ if (and (.Site.Params.hotjarTracking) (.IsDescendant (.GetPage "/docs")) (eq .Site.Language.Lang "en")) }}
|
|
<script>
|
|
(function(h,o,t,j,a,r){
|
|
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
|
|
h._hjSettings={hjid:1756364,hjsv:6};
|
|
a=o.getElementsByTagName('head')[0];
|
|
r=o.createElement('script');r.async=1;
|
|
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
|
|
a.appendChild(r);
|
|
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
|
|
</script>
|
|
{{ end }}
|
|
|
|
|
|
<script>
|
|
// Get the current url, if there is /zh/ in the path, it will be Chinese, otherwise it will be English.
|
|
// Pop up a mask on the current page to remind the user that the current version is no longer maintained, please visit kubesphere.io for the latest version. If the user doesn't click continue, it will automatically switch to kubesphere.io after 10s, and if they continue, the mask will be closed.
|
|
|
|
window.onload = function() {
|
|
var isZh = window.location.pathname.startsWith("/zh/");
|
|
|
|
var mask = document.createElement('div');
|
|
mask.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);z-index:9999;';
|
|
|
|
var box = document.createElement('div');
|
|
box.style.cssText = 'position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:white;padding:20px;border-radius:5px;text-align:center;';
|
|
|
|
var message = document.createElement('p');
|
|
message.textContent = isZh ? '当前版本已经不再维护,将在 10 秒钟后重定向到 kubesphere.io 获取最新版本。' : 'This version is no longer maintained. You will be redirected to kubesphere.io for the latest version in 10 seconds.';
|
|
message.style.margin = '10px 0';
|
|
|
|
var continueBtn = document.createElement('button');
|
|
continueBtn.textContent = isZh ? '继续浏览' : 'Continue';
|
|
continueBtn.style.cssText = 'margin-right:10px;padding:8px 16px;background-color:#f0f0f0;border:none;border-radius:4px;font-size:14px;cursor:pointer;transition:background-color 0.3s;';
|
|
continueBtn.onmouseover = function() { this.style.backgroundColor = '#e0e0e0'; };
|
|
continueBtn.onmouseout = function() { this.style.backgroundColor = '#f0f0f0'; };
|
|
|
|
var redirectBtn = document.createElement('button');
|
|
redirectBtn.textContent = isZh ? '前往新版' : 'Go to new version';
|
|
redirectBtn.style.cssText = 'padding:8px 16px;background-color:#1890ff;color:white;border:none;border-radius:4px;font-size:14px;cursor:pointer;transition:background-color 0.3s;';
|
|
redirectBtn.onmouseover = function() { this.style.backgroundColor = '#40a9ff'; };
|
|
redirectBtn.onmouseout = function() { this.style.backgroundColor = '#1890ff'; };
|
|
|
|
box.appendChild(message);
|
|
box.appendChild(continueBtn);
|
|
box.appendChild(redirectBtn);
|
|
mask.appendChild(box);
|
|
|
|
document.body.appendChild(mask);
|
|
|
|
var redirectTimer = setTimeout(function() {
|
|
window.location.href = 'https://kubesphere.io' + (isZh ? '/zh/' : '/');
|
|
}, 10000);
|
|
|
|
continueBtn.onclick = function() {
|
|
document.body.removeChild(mask);
|
|
clearTimeout(redirectTimer);
|
|
};
|
|
|
|
redirectBtn.onclick = function() {
|
|
window.location.href = 'https://kubesphere.io' + (isZh ? '/zh/' : '/');
|
|
};
|
|
}
|
|
|
|
</script> |