blob: 0844fc5e8ebf95fcb998d3357655923f67817f3b [file] [log] [blame]
<!doctype html>
<html lang="{{ .Site.Language.Lang }}" class="no-js">
<head>
{{ partial "head.html" . }}
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
</head>
<body class="td-{{ .Kind }} project-doc">
<header>
{{ partial "navbar.html" . }}
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 d-print-none scroll-bar td-sidebar">
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5 pr-md-4" role="main">
<i class="iconfont icon-menu-doc doc-menu-button"></i>
{{ block "main" . }}{{ end }}
</main>
<div id="toc" class="d-none d-xl-block col-xl-2 td-toc d-print-none">
{{ partial "toc.html" . }}
</div>
</div>
</div>
{{ partial "footer.html" . }}
</div>
{{ partial "event-popup.html" . }}
{{ partial "lightbox.html" . }}
{{ partial "sidebar-skywalking.html" . }}
{{ partial "scripts.html" . }}
</body>
<script>
$(function (){
$('.doc-menu-button').on('click',function (){
$('.td-sidebar').toggleClass('active')
})
$('.version-select').on('change', function (){
var selectVersion = $(this).val().toLowerCase();
var prefix = '';
var url = location.href.replace(/(\/docs\/[a-zA-Z\-]+\/)([\w|\.]+)(\/.*)/, function (match, p1, p2, p3){
prefix = p1 + selectVersion;
return p1 + selectVersion + p3
})
go2SelectVersion(url, prefix)
})
function go2SelectVersion(url, prefix){
$.ajax({
url: url,
type: "get",
success:function(){
location.href = url;
},
statusCode: {
404:function(){
location.href = prefix + '/readme/';
}
}
});
}
})
</script>
</html>