Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd97cfd
commit 44b404a
Showing
8 changed files
with
167 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
/* | ||
Add styles or override variables from the theme here. | ||
*/ | ||
|
||
// copy from github.com/kubernetes/website | ||
$primary: #3371e3; | ||
$light-grey: #f7f7f7; | ||
$dark-grey: #303030; | ||
$medium-grey: #4c4c4c; | ||
$white: #ffffff; | ||
/* | ||
Add styles or override variables from the theme here. | ||
*/ | ||
|
||
// copy from github.com/kubernetes/website | ||
$primary: #3371e3; | ||
$light-grey: #f7f7f7; | ||
$dark-grey: #303030; | ||
$medium-grey: #4c4c4c; | ||
$white: #ffffff; | ||
|
||
// 禁止使用google字体,使用系统字体 | ||
$td-enable-google-fonts: false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// 为空,不加载多语言RTL的渲染CSS | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
{{ hugo.Generator }} | ||
{{ range .AlternativeOutputFormats -}} | ||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}"> | ||
{{ end -}} | ||
|
||
{{ $outputFormat := partial "outputformat.html" . -}} | ||
{{ if and hugo.IsProduction (ne $outputFormat "print") -}} | ||
<meta name="robots" content="index, follow"> | ||
{{ else -}} | ||
<meta name="robots" content="noindex, nofollow"> | ||
{{ end -}} | ||
|
||
{{ partialCached "favicons.html" . }} | ||
<title> | ||
{{- if .IsHome -}} | ||
{{ .Site.Title -}} | ||
{{ else -}} | ||
{{ with .Title }}{{ . }} | {{ end -}} | ||
{{ .Site.Title -}} | ||
{{ end -}} | ||
</title> | ||
{{ $desc := .Page.Description | default (.Page.Content | safeHTML | truncate 150) -}} | ||
<meta name="description" content="{{ $desc }}"> | ||
{{ template "_internal/opengraph.html" . -}} | ||
{{ template "_internal/schema.html" . -}} | ||
{{ template "_internal/twitter_cards.html" . -}} | ||
{{ partialCached "head-css.html" . "asdf" -}} | ||
<script | ||
src='{{ "/js/jquery-3.5.1.min.js" | relURL }}' | ||
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" | ||
crossorigin="anonymous"></script> | ||
{{ if .Site.Params.offlineSearch -}} | ||
<script | ||
src='{{ "/js/lunr.min.js" | relURL }}' | ||
integrity="sha384-vRQ9bDyE0Wnu+lMfm57BlYLO0/XauFuKpVsZPs7KEDwYKktWi5+Kz3MP8++DFlRY" | ||
crossorigin="anonymous"></script> | ||
{{ end -}} | ||
|
||
{{ if .Site.Params.prism_syntax_highlighting -}} | ||
<link rel="stylesheet" href="{{ "/css/prism.css" | relURL }}"/> | ||
{{ end -}} | ||
|
||
{{ partial "hooks/head-end.html" . -}} | ||
|
||
{{/* To comply with GDPR, cookie consent scripts places in head-end must execute before Google Analytics is enabled */ -}} | ||
{{ if hugo.IsProduction -}} | ||
{{ if hasPrefix .Site.GoogleAnalytics "G-" -}} | ||
{{ template "_internal/google_analytics.html" . -}} | ||
{{ else -}} | ||
{{ template "_internal/google_analytics_async.html" . -}} | ||
{{ end -}} | ||
{{ end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<script src='{{ "/js/popper.min.js" | relURL }}' | ||
integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" | ||
crossorigin="anonymous"></script> | ||
<script src='{{ "/js/bootstrap.min.js" | relURL }}' | ||
integrity="sha512-UR25UO94eTnCVwjbXozyeVd6ZqpaAE9naiEUBK/A+QDbfSTQFhPGj5lOR6d8tsgbBk84Ggb5A3EkjsOgPRPcKA==" | ||
crossorigin="anonymous"></script> | ||
|
||
{{ if .Site.Params.mermaid.enable }} | ||
<script src="https://cdn.jsdelivr.net/npm/mermaid@8.13.4/dist/mermaid.min.js" integrity="sha512-JERecFUBbsm75UpkVheAuDOE8NdHjQBrPACfEQYPwvPG+fjgCpHAz1Jw2ci9EXmd3DdfiWth3O3CQvcfEg8gsA==" crossorigin="anonymous"></script> | ||
{{ end }} | ||
|
||
{{ if .Site.Params.markmap.enable }} | ||
<style> | ||
.markmap > svg { | ||
width: 100%; | ||
height: 300px; | ||
} | ||
</style> | ||
<script> | ||
window.markmap = { | ||
autoLoader: { manual: true }, | ||
}; | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/npm/markmap-autoloader"></script> | ||
{{ end }} | ||
|
||
<script src='{{ "/js/tabpane-persist.js" | relURL }}'></script> | ||
|
||
<!-- load the deflate.js for plantuml support --> | ||
{{ if .Site.Params.plantuml.enable }} | ||
<script src='{{ "/js/deflate.js" | relURL }}'></script> | ||
{{ end }} | ||
|
||
<!-- load stylesheet and scripts for KaTeX support --> | ||
{{ if .Site.Params.katex.enable }} | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css" | ||
integrity="sha512-vJqxkZ+Sugf/6WRlpcxN01qVfX/29hF6qc33eHF1va3NgoV+U+wCi+uTAsQ10sDoGyBxHLdaHvGwDlV3yVYboA==" crossorigin="anonymous"> | ||
<!-- The loading of KaTeX is deferred to speed up page rendering --> | ||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js" | ||
integrity="sha512-5ufNcHqOYgilGEHPfuRIQ5B/vDS1M8+UC+DESZ5CwVgGTg+b2Ol/15rYL/GiCWJ/Sx8oVo0FPFok1dPk8U9INQ==" | ||
crossorigin="anonymous"></script> | ||
<!-- check whether support of mhchem is enabled in config.toml --> | ||
{{ if .Site.Params.katex.mhchem.enable }} | ||
<!-- To add support for displaying chemical equations and physical units, load the mhchem extension: --> | ||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/mhchem.min.js" | ||
integrity="sha512-HWb6LyQhO6UkmYLjdSblpgiOvvbdkoMRjln0POPhOVbZu3l4QdqwZnMJ/cuwKScU5pWARejB495TAAAz0WNsXQ==" | ||
crossorigin="anonymous"></script> | ||
{{ end }} | ||
<!-- To automatically render math in text elements, include the auto-render extension: --> | ||
<script defer src='https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js' | ||
integrity='sha512-ZA/RPrAo88DlwRnnoNVqKINnQNcWERzRK03PDaA4GIJiVZvGFIWQbdWCsUebMZfkWohnfngsDjXzU6PokO4jGw==' crossorigin='anonymous' | ||
{{ printf "onload='renderMathInElement(%s, %s);'" (( .Site.Params.katex.html_dom_element | default "document.body" ) | safeJS ) ( printf "%s" ( $.Site.Params.katex.options | jsonify )) | safeHTMLAttr }}></script> | ||
{{ end }} | ||
|
||
{{ $jsBase := resources.Get "js/base.js" }} | ||
{{ $jsAnchor := resources.Get "js/anchor.js" }} | ||
{{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home }} | ||
{{ $jsMermaid := resources.Get "js/mermaid.js" | resources.ExecuteAsTemplate "js/mermaid.js" . }} | ||
{{ $jsMarkmap := resources.Get "js/markmap.js" | resources.ExecuteAsTemplate "js/markmap.js" . }} | ||
{{ $jsPlantuml := resources.Get "js/plantuml.js" | resources.ExecuteAsTemplate "js/plantuml.js" . }} | ||
{{ $jsDrawio := resources.Get "js/drawio.js" | resources.ExecuteAsTemplate "js/plantuml.js" .}} | ||
{{ if .Site.Params.offlineSearch }} | ||
{{ $jsSearch = resources.Get "js/offline-search.js" }} | ||
{{ end }} | ||
{{ $js := (slice $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio) | resources.Concat "js/main.js" }} | ||
{{ if not hugo.IsProduction }} | ||
<script src="{{ $js.RelPermalink }}"></script> | ||
{{ else }} | ||
{{ $js := $js | minify | fingerprint }} | ||
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous"></script> | ||
{{ end }} | ||
{{ if .Site.Params.prism_syntax_highlighting }} | ||
<!-- scripts for prism --> | ||
<script src='{{ "/js/prism.js" | relURL }}'></script> | ||
{{ end }} | ||
{{ partial "hooks/body-end.html" . }} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.