Compare commits
No commits in common. "4ab9bdab6e1dac248a8c7a0255f887d4720a57ef" and "e9271c3ef1f21b2b4f4a03717f8f62beccd067bf" have entirely different histories.
4ab9bdab6e
...
e9271c3ef1
5 changed files with 22 additions and 86 deletions
|
@ -241,75 +241,6 @@ a {
|
|||
|
||||
/* Sections */
|
||||
|
||||
.table-of-contents {
|
||||
position: fixed;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.extend {
|
||||
margin: auto;
|
||||
padding-block: 1rem;
|
||||
padding-inline: 0.4rem;
|
||||
border-radius: 0rem 0.5rem 0.5rem 0rem;
|
||||
background-color: black;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
#TableOfContents {
|
||||
display: none;
|
||||
margin: auto;
|
||||
padding-inline: 20px;
|
||||
border-radius: 0rem 0.5rem 0.5rem 0rem;
|
||||
background-color: black;
|
||||
font-size: larger;
|
||||
|
||||
ul {
|
||||
counter-reset:toc1;
|
||||
list-style-type:none;
|
||||
padding-inline-start: 0rem;
|
||||
padding-block: 0.5rem;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type:none;
|
||||
|
||||
ul {
|
||||
counter-reset:toc2;
|
||||
|
||||
li {
|
||||
list-style-type:none;
|
||||
|
||||
ul {
|
||||
counter-reset:toc3;
|
||||
|
||||
li:before {
|
||||
counter-increment:toc3;
|
||||
content:counter(toc1) "." counter(toc2) "." counter(toc3) " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
li:before {
|
||||
counter-increment:toc2;
|
||||
content:counter(toc1) "." counter(toc2) " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
li:before {
|
||||
counter-increment:toc1;
|
||||
content:counter(toc1) ". ";
|
||||
}
|
||||
}
|
||||
|
||||
#TableOfContents.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#content {
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
|
@ -317,8 +248,7 @@ a {
|
|||
}
|
||||
|
||||
.title h1 {
|
||||
font-size: xxx-large;
|
||||
padding-block-end: 3rem;
|
||||
font-size: xx-large;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
</div>
|
||||
{{ end }}
|
||||
<!-- <h6>{{ .Date.Format "Mon, Jan 2, 2006" }}</h6> -->
|
||||
{{ if gt (.TableOfContents | findRE `<li>` | len) 4}}
|
||||
<div class="table-of-contents">
|
||||
{{ .TableOfContents }}
|
||||
<div class="extend" onclick="toggleTableOfContent(event)"><i class="icon-angle-right"></i></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
|
@ -5,8 +5,28 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="color-scheme" content="dark light">
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
<title>{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}</title>
|
||||
{{ block "opengraph" . }}
|
||||
<meta property="og:type" content="website" />
|
||||
{{ with .Site.LanguageCode }}
|
||||
<meta property="og:locale" content='{{ replace . "-" "_" }}' />
|
||||
{{ end }}
|
||||
<meta property="og:title" content="{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
||||
{{ if .Params.image }}
|
||||
<meta property="og:image" content="{{ .Params.image | absURL }}" />
|
||||
{{ else }}
|
||||
<meta property="og:image" content="{{ .Site.Params.logo | absURL }}" />
|
||||
{{ end }}
|
||||
{{ if .Params.summary }}
|
||||
<meta property="og:description" content="{{ .Params.summary }}" />
|
||||
{{ else if .Content }}
|
||||
<meta property="og:description" content="{{ .Content | safeHTML | truncate 100 }}" />
|
||||
{{ else }}
|
||||
<meta property="og:description" content="{{ .Site.Params.Description }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Site.Params.favIcon }}
|
||||
{{ if .ico }}
|
||||
<link rel="icon" type="image/x-icon" href="{{ .ico }}">
|
||||
|
@ -27,7 +47,6 @@
|
|||
<link rel="stylesheet" type="text/css" href="{{ $index.RelPermalink }}">
|
||||
{{ end }}
|
||||
<link rel="stylesheet" type="text/css" href="/icons/fontawesome.css">
|
||||
<script src="/js/index.js"></script>
|
||||
<script src="/js/theme.js"></script>
|
||||
<script src="/js/scroll.js"></script>
|
||||
</head>
|
|
@ -1,7 +0,0 @@
|
|||
function toggleTableOfContent(e) {
|
||||
const toc = document.getElementById('TableOfContents');
|
||||
toc.classList.toggle("show");
|
||||
const extend = toc.parentElement.getElementsByClassName("extend")[0];
|
||||
extend.children[0].classList.toggle("icon-angle-right");
|
||||
extend.children[0].classList.toggle("icon-angle-left");
|
||||
}
|
Loading…
Reference in a new issue