Hermit-V2 Theme Update
This commit is contained in:
12
assets/js/mathjax-assistant.js
Normal file
12
assets/js/mathjax-assistant.js
Normal file
@ -0,0 +1,12 @@
|
||||
MathJax = {
|
||||
tex: {
|
||||
displayMath: [['\\[', '\\]'], ['$$', '$$']], // block
|
||||
inlineMath: [['\\(', '\\)']] // inline
|
||||
// processEscapes: true,
|
||||
// processEnvironments: true,
|
||||
}
|
||||
// options: {
|
||||
// skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
|
||||
// enableMenu: false
|
||||
// }
|
||||
};
|
@ -1,6 +1,6 @@
|
||||
// Colors
|
||||
$theme: #018574;
|
||||
$text: #e8eef2;
|
||||
$theme: hsl(172, 99%, 26%);
|
||||
$text: hsl(204, 28%, 93%);
|
||||
$light-grey: #494f5c;
|
||||
$dark-grey: #3B3E48;
|
||||
$highlight-grey: #7d828a;
|
||||
|
@ -4,12 +4,20 @@
|
||||
@import "animate.scss";
|
||||
@import "_scroll.scss";
|
||||
@import "_admonition.scss";
|
||||
@import "_mathjax.scss";
|
||||
@import "_socialshare.scss";
|
||||
{{ if (fileExists "assets/scss/userstyles.scss") }}
|
||||
@import "userstyles.scss";
|
||||
{{ end }}
|
||||
|
||||
/* text selection */
|
||||
::-moz-selection {
|
||||
background: $highlight-grey;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: $highlight-grey;
|
||||
}
|
||||
|
||||
/* Webkit Scrollbar Customize */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
@ -60,13 +68,14 @@ pre {
|
||||
code {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: $midnightblue;
|
||||
color: #eee;
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
color: #eee;
|
||||
background: $highlight-grey;
|
||||
color: hsl(0, 1%, 67%);
|
||||
background: $dark-grey;
|
||||
border-radius: 3px;
|
||||
padding: 0 3px;
|
||||
margin: 0 4px;
|
||||
@ -463,7 +472,6 @@ p.img-404 {
|
||||
@include dimmed;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
@ -491,6 +499,36 @@ p.img-404 {
|
||||
margin-left: 1em;
|
||||
@include dimmed;
|
||||
}
|
||||
.post-description {
|
||||
font-size:x-small;
|
||||
flex-shrink: 0;
|
||||
@include dimmed;
|
||||
}
|
||||
}
|
||||
|
||||
.pinned-posts-group {
|
||||
display: flex;
|
||||
margin-bottom: 1.9em;
|
||||
line-height: normal;
|
||||
border-bottom: 2px $highlight-grey solid;
|
||||
|
||||
.pinned-posts-list {
|
||||
flex-grow: 1;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.pinned-post-item {
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
align-items: baseline;
|
||||
padding: 12px 0;
|
||||
|
||||
a {
|
||||
padding-left: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// single.html
|
||||
|
@ -43,6 +43,13 @@ enableEmoji = true
|
||||
# googleAnalytics = "UA-123-45"
|
||||
# disqusShortname = "CHANGE ME"
|
||||
|
||||
[frontmatter]
|
||||
date = ["date", "publishDate", "lastmod"]
|
||||
lastmod = ["lastmod", ":git", "date", "publishDate"]
|
||||
publishDate = ["publishDate", "date"]
|
||||
expiryDate = ["expiryDate"]
|
||||
|
||||
|
||||
[params.author]
|
||||
name = "CHANGE SITE AUTHOR"
|
||||
about = "CHANGE SITE AUTHOR ABOUT"
|
||||
@ -57,6 +64,17 @@ enableEmoji = true
|
||||
# Categories are disabled by default.
|
||||
# category = "categories"
|
||||
|
||||
# Enable to get proper Mathjax support
|
||||
#[markup]
|
||||
# [markup.goldmark]
|
||||
# [markup.goldmark.extensions]
|
||||
# [markup.goldmark.extensions.passthrough]
|
||||
# enable = true
|
||||
# [markup.goldmark.extensions.passthrough.delimiters]
|
||||
# block = [['\[', '\]'], ['$$', '$$']]
|
||||
# inline = [['\(', '\)']]
|
||||
|
||||
|
||||
[params]
|
||||
dateform = "Jan 2, 2006"
|
||||
dateformShort = "Jan 2"
|
||||
@ -87,6 +105,10 @@ enableEmoji = true
|
||||
# googleTagManager = "GTM-XXXXXXXX"
|
||||
# tagSymbol = "#"
|
||||
# categorySymbol = "⊲"
|
||||
# pinned = "Pinned Posts"
|
||||
# pinnedSVGname = "pin"
|
||||
# descriptionInPosts= true
|
||||
# initialPublish = "Initally Posted on: "
|
||||
|
||||
[[params.socialLinks]]
|
||||
name = "mastodon"
|
||||
|
@ -10,20 +10,42 @@
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{- if and (ge (len (where .Site.Pages ".Params.pin" true)) 1) (.Site.Params.pinned) -}}
|
||||
<h2>{{- .Site.Params.pinned -}}</h2>
|
||||
{{$pin_name := .Site.Params.pinnedSVGname | default "pin" }}
|
||||
<div class="pinned-posts-group">
|
||||
<ul class="pinned-posts-list">
|
||||
{{- range where .Site.Pages ".Params.pin" true }}
|
||||
<li class="pinned-post-item">
|
||||
{{- partial "svg.html" (dict "context" . "name" $pin_name) }}
|
||||
<a href="{{.Permalink}}"><span class="post-title">{{.Title}}</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- range .Data.Pages.GroupByDate "2006" }}
|
||||
{{ $pages := len (.Pages) }}
|
||||
{{ $pages_pin := len ( where .Pages ".Params.pin" "eq" true) }}
|
||||
{{- if gt $pages $pages_pin -}}
|
||||
<div class="posts-group">
|
||||
<div class="post-year" id="{{ .Key }}">{{ .Key }}</div>
|
||||
<ul class="posts-list">
|
||||
{{- range .Pages }}
|
||||
{{- range where .Pages ".Params.pin" "ne" true }}
|
||||
<li class="post-item">
|
||||
<a href="{{.Permalink}}">
|
||||
<span class="post-title">{{.Title}}</span>
|
||||
<span class="post-day">{{ .Date.Format .Site.Params.dateformShort }}</span>
|
||||
</a>
|
||||
{{- if and .Page.Params.description .Site.Params.descriptionInPosts -}}
|
||||
<span class="post-description">{{ .Page.Params.description }}</span>
|
||||
{{- end -}}
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</main>
|
||||
{{ end }}
|
||||
|
@ -1,7 +1,6 @@
|
||||
{{ if or (.Site.Params.global_mathjax) (.Params.mathjax) }}
|
||||
<script type="text/javascript" async src="https://polyfill.io/v3/polyfill.min.js?features=es6" crossorigin="anonymous"></script>
|
||||
{{ $mathjaxf := resources.Get "js/mathjax/mathjax-full@3_es5_tex-mml-svg.min.js"}}
|
||||
{{ $mathjaxa := resources.Get "js/mathjax/mathjax-assistant.js"}}
|
||||
{{ $mathjaxscript := slice $mathjaxa $mathjaxf | resources.Concat "js/mathjaxs.js" | minify | fingerprint -}}
|
||||
<script type="text/javascript" id="MathJax-script" async src="{{ $mathjaxscript.Permalink }}" {{ printf "integrity=%q" $mathjaxscript.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
|
||||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
|
||||
{{ $mathjaxa := resources.Get "js/mathjax-assistant.js"}}
|
||||
{{ $mathjaxscript := slice $mathjaxa | resources.Concat "js/mathjaxs.js" | minify | fingerprint -}}
|
||||
<script type="text/javascript" id="MathJax-script" async src="{{ $mathjaxscript.Permalink }}" {{ printf "integrity=%q" $mathjaxscript.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
|
||||
{{ end }}
|
@ -15,7 +15,7 @@
|
||||
{{- if and .GitInfo .Site.Params.gitUrl -}}
|
||||
[{{- partial "svg.html" (dict "context" . "name" "posts_single_git_commit") -}}<a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash -}}</a> @ {{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local -}}]
|
||||
{{- else if not (eq .Lastmod .Date ) -}}
|
||||
[Modified : {{ dateFormat .Site.Params.dateformNumTime .Lastmod.Local -}}]
|
||||
[{{.Site.Params.initialPublish | default "Initial Published on : "}} {{ dateFormat .Site.Params.dateformNumTime .Lastmod.Local -}}]
|
||||
{{- else -}}
|
||||
{{ errorf "Lastmod is not found in Page Frontmatter or Lastmod is same as Date" }}
|
||||
{{- end -}}
|
||||
|
@ -108,6 +108,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>
|
||||
{{- else if (eq .name "previous") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
|
||||
{{- else if (eq .name "pin") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 15 15" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-pin">><path d="m10.25 10.25 4 4m-12.5-7.5 5-5s1 2 2 3 4.5 2 4.5 2l-6.5 6.5s-1-3.5-2-4.5-3-2-3-2"/></svg>
|
||||
{{- else if (eq .name "tool") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-tool"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path></svg>
|
||||
{{- else if (eq .name "404-lighthouse") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 167.8 163.4" fill="currentColor"><title>404-lighthouse</title><path d="M83,27.5c.5-8.4,12.5-8.4,13,0,.2,3.2,5.2,3.2,5,0C100.7,21.3,96,16,89.5,16S78.3,21.3,78,27.5c-.2,3.2,4.8,3.2,5,0Z" transform="translate(-6.6 -6.6)"/><path d="M92,18V9c0-3.2-5-3.2-5,0v9c0,3.2,5,3.2,5,0Z" transform="translate(-6.6 -6.6)"/><path d="M78,44.5l-7.9,86.7L69,143.5c-.3,3.2,4.7,3.2,5,0l7.9-86.7L83,44.5c.3-3.2-4.7-3.2-5,0Z" transform="translate(-6.6 -6.6)"/><path d="M96,44.5l7.9,86.7,1.1,12.3c.3,3.2,5.3,3.2,5,0l-7.9-86.7L101,44.5c-.3-3.2-5.3-3.2-5,0Z" transform="translate(-6.6 -6.6)"/><path d="M88.5,26.5v18a1,1,0,0,0,2,0v-18a1,1,0,0,0-2,0Z" transform="translate(-6.6 -6.6)"/><path d="M79.1,69.6l21.2-12.2a1.5,1.5,0,0,0-1.5-2.6L77.6,67a1.5,1.5,0,0,0,1.5,2.6Z" transform="translate(-6.6 -6.6)"/><path d="M76.4,99.2,102.7,84a1.5,1.5,0,0,0-1.5-2.6L74.9,96.6a1.5,1.5,0,0,0,1.5,2.6Z" transform="translate(-6.6 -6.6)"/><path d="M73.7,128.7l31.4-18.1a1.5,1.5,0,0,0-1.5-2.6L72.2,126.1a1.5,1.5,0,0,0,1.5,2.6Z" transform="translate(-6.6 -6.6)"/><path d="M98.5,42h-18L83,44.5v-18L80.5,29h18L96,26.5v18c0,3.2,5,3.2,5,0v-18A2.5,2.5,0,0,0,98.5,24h-18A2.5,2.5,0,0,0,78,26.5v18A2.5,2.5,0,0,0,80.5,47h18C101.7,47,101.7,42,98.5,42Z" transform="translate(-6.6 -6.6)"/><path d="M172,165c-5.8-.3-9.5-4.7-15.8-3.8-2.6.4-4.4,1.6-6.7,2.7s-6.9,1.3-10.2-.5-9.5-3.2-14.3-1c-3.3,1.5-5.6,3.3-9.5,2.4-2.4-.5-4.3-2.3-6.7-3.1a15.5,15.5,0,0,0-8.3-.3c-2.5.6-4.3,2.2-6.7,3.1-6.2,2.2-10.8-3.5-16.9-3.5s-10.7,5.6-17,3.5c-2.3-.8-4.2-2.5-6.7-3.1a15.4,15.4,0,0,0-8.3.3c-3.1,1-5.4,3.3-8.9,3.3s-5.8-2.2-8.9-3.3a15.4,15.4,0,0,0-8.8-.2c-3.4,1-5.7,3.3-9.5,3.5s-3.2,5.2,0,5c6-.3,10.9-5.5,17-3.5,2.4.8,4.2,2.5,6.7,3.1a15.4,15.4,0,0,0,8.3-.3c2.3-.8,4.2-2.5,6.7-3.1s6.3.9,9.5,2.4c4.8,2.3,9.8,1.5,14.3-1s6.7-2.2,10.2-.5,4.1,2.3,6.7,2.7a14.9,14.9,0,0,0,7.9-1c2.7-1.2,4.8-2.9,7.9-2.9s5.2,1.7,7.9,2.9a14.9,14.9,0,0,0,7.9,1c2.6-.4,4.4-1.6,6.7-2.7s6.9-1.3,10.2.5a15.9,15.9,0,0,0,16.1,0c7.3-3.9,11.9,2,19.1,2.3,3.2.2,3.2-4.8,0-5Z" transform="translate(-6.6 -6.6)"/><path d="M46.3,165.8l9.6-9.3c4.9-4.6,9.7-11.1,17.2-9.2,4.9,1.2,9.2,5.5,13,8.5s8,6.5,12.1,9.7c2.6,2,5-2.4,2.5-4.3-5-3.8-9.7-7.9-14.7-11.7s-8.7-7-14.6-7.6-11.2,3.6-15.9,8S47,158,42.7,162.2c-2.3,2.3,1.2,5.8,3.5,3.5Z" transform="translate(-6.6 -6.6)"/><path d="M84.8,152.8c8.3-3.7,16.7-8.3,26.1-5.6s15.5,9,19.4,16.6c1.5,2.9,5.8.3,4.3-2.5-4.5-8.7-12.9-16.2-22.4-18.9s-20.3,1.7-29.9,6.1c-2.9,1.3-.4,5.6,2.5,4.3Z" transform="translate(-6.6 -6.6)"/><g class="animated flash infinite slower" ><path d="M62.5,34h-23a1.5,1.5,0,0,0,0,3h23a1.5,1.5,0,0,0,0-3Z" transform="translate(-6.6 -6.6)"/><path d="M63.3,25.2l-18-9c-1.7-.9-3.2,1.7-1.5,2.6l18,9c1.7.9,3.2-1.7,1.5-2.6Z" transform="translate(-6.6 -6.6)"/><path d="M61.7,43.2l-18,9c-1.7.9-.2,3.5,1.5,2.6l18-9c1.7-.9.2-3.5-1.5-2.6Z" transform="translate(-6.6 -6.6)"/><path d="M116.5,37h23a1.5,1.5,0,0,0,0-3h-23a1.5,1.5,0,0,0,0,3Z" transform="translate(-6.6 -6.6)"/><path d="M117.3,27.8l18-9c1.7-.9.2-3.5-1.5-2.6l-18,9c-1.7.9-.2,3.5,1.5,2.6Z" transform="translate(-6.6 -6.6)"/><path d="M115.7,45.8l18,9c1.7.9,3.2-1.7,1.5-2.6l-18-9c-1.7-.9-3.2,1.7-1.5,2.6Z" transform="translate(-6.6 -6.6)"/></g></svg>
|
||||
{{- else if (eq .name "404-home") -}}
|
||||
|
Reference in New Issue
Block a user