feat: fontawesome, admonition and faster
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
{{ partial "head.html" . }}
|
||||
{{ $style := resources.Get "css/style.scss" | resources.ToCSS | resources.Minify}}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">
|
||||
</head>
|
||||
<body class="">
|
||||
<div class="wrapper">
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
{{ define "content" }}
|
||||
<div class="post-warp">
|
||||
<h2 class="post-title" style="text-align:right;padding-bottom:2em">{{ .Title }}</h2>
|
||||
<header class="post-header">
|
||||
<div class="align-right"><h1 class="post-title">{{ .Title }}</h1></div>
|
||||
</header>
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
@@ -1,33 +1,37 @@
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
{{ if .IsHome }}
|
||||
<title>{{ .Title }}</title>
|
||||
{{ else }}
|
||||
<title>{{ .Title }} - {{ .Site.Title }}</title>
|
||||
{{ end }}
|
||||
<link href="{{ .Permalink }}index.xml" rel="self"/>
|
||||
<link href="{{ .Permalink }}"/>{{ if not .Date.IsZero }}
|
||||
<updated>{{ .Date.Format "02-01-2006T15:04:05-07:00" | safeHTML }}</updated>{{ end }}
|
||||
<id>{{ .Permalink }}</id>
|
||||
<author>
|
||||
{{ with .Site.Author.name }}
|
||||
<name>{{ . }}</name>
|
||||
{{ if .IsHome }}
|
||||
<title>{{ .Title }}</title>
|
||||
{{ else }}
|
||||
<title>{{ .Title }} - {{ .Site.Title }}</title>
|
||||
{{ end }}
|
||||
{{ with $.Site.Author.email }}
|
||||
<email>{{ . }}</email>
|
||||
{{ end }}
|
||||
</author>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ range first 15 (where .Data.Pages "Type" "in" .Site.Params.mainSections) }}
|
||||
<entry>
|
||||
{{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
|
||||
<link href="{{ .Permalink }}index.xml" rel="self"/>
|
||||
<link href="{{ .Permalink }}"/>
|
||||
<id>{{ .Permalink }}</id>
|
||||
{{ with .Site.Author.Name }}
|
||||
<author>
|
||||
<name>{{ . }}</name>
|
||||
</author>
|
||||
{{ if not .Date.IsZero }}
|
||||
<updated>{{ .Date.Format "02-01-2006T15:04:05-07:00" | safeHTML }}</updated>
|
||||
{{ end }}
|
||||
<id>{{ .Permalink }}</id>
|
||||
<author>
|
||||
{{ with .Site.Author.name }}
|
||||
<name>{{ . }}</name>
|
||||
{{ end }}
|
||||
{{ with $.Site.Author.email }}
|
||||
<email>{{ . }}</email>
|
||||
{{ end }}
|
||||
</author>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
{{ range first 15 (where .Data.Pages "Type" "in" .Site.Params.mainSections) }}
|
||||
<entry>
|
||||
{{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
|
||||
<link href="{{ .Permalink }}"/>
|
||||
<id>{{ .Permalink }}</id>
|
||||
{{ with .Site.Author.name }}
|
||||
<author>
|
||||
<name>{{ . }}</name>
|
||||
</author>
|
||||
{{ end }}
|
||||
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
|
||||
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
|
||||
{{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
|
||||
</entry>
|
||||
{{ end }}
|
||||
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
|
||||
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
|
||||
{{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
|
||||
</entry>{{ end }}
|
||||
</feed>
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
// discussions from 'localhost:1313' on your Disqus account...
|
||||
// discussions from "localhost:1313" on your Disqus account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
var disqus_shortname = '{{ .Site.DisqusShortname }}';
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
|
||||
var disqus_shortname = "{{ .Site.DisqusShortname }}";
|
||||
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
|
||||
(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
@@ -26,40 +26,36 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript">
|
||||
var gitalk = new Gitalk({
|
||||
id: '{{ .Date }}',
|
||||
title: '{{ .Title }}',
|
||||
clientID: '{{ .Site.Params.gitalk.clientId }}',
|
||||
clientSecret: '{{ .Site.Params.gitalk.clientSecret }}',
|
||||
repo: '{{ .Site.Params.gitalk.repo }}',
|
||||
owner: '{{ .Site.Params.gitalk.owner }}',
|
||||
admin: ['{{ .Site.Params.gitalk.owner }}'],
|
||||
id: "{{ .Date }}",
|
||||
title: "{{ .Title }}",
|
||||
clientID: "{{ .Site.Params.gitalk.clientId }}",
|
||||
clientSecret: "{{ .Site.Params.gitalk.clientSecret }}",
|
||||
repo: "{{ .Site.Params.gitalk.repo }}",
|
||||
owner: "{{ .Site.Params.gitalk.owner }}",
|
||||
admin: ["{{ .Site.Params.gitalk.owner }}"],
|
||||
body: decodeURI(location.href)
|
||||
});
|
||||
gitalk.render('gitalk-container');
|
||||
gitalk.render("gitalk-container");
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://github.com/gitalk/gitalk">comments powered by gitalk.</a></noscript>
|
||||
{{- end -}}
|
||||
|
||||
<!-- valine -->
|
||||
{{- if .Site.Params.valine.enable -}}
|
||||
<span id="{{ .RelPermalink | relURL }}" class="leancloud_visitors" data-flag-title="{{ .Title }}">
|
||||
<span class="post-meta-item-text"> pm </span>
|
||||
<span class="leancloud-visitors-count">1000000</span>
|
||||
<p></p>
|
||||
</span>
|
||||
<div id="vcomments"></div>
|
||||
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
||||
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/leancloud-storage@3.15.0/dist/av-min.js" integrity="sha256-xqGr0QtLwtP4tJtUSfG2p6aJLuh5xL0m6MLLzFL7978=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/valine@1.3.9/dist/Valine.min.js" integrity="sha256-CE75dgk/gvtViCxLFAPDiz2mQC6jvytsjETgypmFdDU=" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript">
|
||||
new Valine({
|
||||
el: '#vcomments',
|
||||
appId: '{{ .Site.Params.valine.appId }}',
|
||||
appKey: '{{ .Site.Params.valine.appKey }}',
|
||||
notify: '{{ .Site.Params.valine.notify }}',
|
||||
verify: '{{ .Site.Params.valine.verify }}',
|
||||
avatar: '{{ .Site.Params.valine.avatar }}',
|
||||
placeholder: '{{ .Site.Params.valine.placeholder }}',
|
||||
visitor: '{{ .Site.Params.valine.visitor }}',
|
||||
el: "#vcomments",
|
||||
appId: "{{ .Site.Params.valine.appId }}",
|
||||
appKey: "{{ .Site.Params.valine.appKey }}",
|
||||
meta: ["nick", "mail"],
|
||||
notify: "{{ .Site.Params.valine.notify }}",
|
||||
verify: "{{ .Site.Params.valine.verify }}",
|
||||
avatar: "{{ .Site.Params.valine.avatar }}",
|
||||
placeholder: "{{ .Site.Params.valine.placeholder }}",
|
||||
visitor: "{{ .Site.Params.valine.visitor }}",
|
||||
});
|
||||
</script>
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
<footer class="footer">
|
||||
<div class="copyright">
|
||||
©
|
||||
{{ with .Site.Params.since }}
|
||||
<span itemprop="copyrightYear">{{ if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year }}</span>
|
||||
{{ else }}
|
||||
<span itemprop="copyrightYear">{{ now.Year }}</span>
|
||||
{{ end }}
|
||||
{{ with .Site.Author.Name }}
|
||||
<span class="author" itemprop="copyrightHolder"><a href="{{ .Site.BaseURL }}">{{ . }}</a> | </span>
|
||||
{{ end }}
|
||||
<span>{{ (printf (T "powered") `<a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreffer">Hugo</a>`) | safeHTML }} | {{ T "theme" }}<a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="external nofollow noopener noreffer">LoveIt</a></span>
|
||||
</div>
|
||||
<br />
|
||||
©
|
||||
{{- with .Site.Params.since -}}
|
||||
<span itemprop="copyrightYear">{{ if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year }}</span>
|
||||
{{- else -}}
|
||||
<span itemprop="copyrightYear">{{ now.Year }}</span>
|
||||
{{- end -}}
|
||||
{{- with .Site.Author.name -}}
|
||||
<span class="author" itemprop="copyrightHolder"> <a href="{{ $.Site.BaseURL }}">{{ . }}</a></span>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.icp -}}
|
||||
<span class="icp"> | {{ . | safeHTML }}</span>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.license -}}
|
||||
<span class="license"> | {{ . | safeHTML }}</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
<a href="javascript:void(0);" class="theme-switch"><i class="iconfont icon-sun"></i></a>
|
||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -17,7 +17,7 @@
|
||||
<nav class="navbar-mobile" id="nav-mobile" style="display: none">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<div> <a href="javascript:void(0);" class="theme-switch"><i class="iconfont icon-sun"></i></a> <a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a></div>
|
||||
<div><a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180"></i></a> <a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a></div>
|
||||
<div class="menu-toggle">
|
||||
<span></span><span></span><span></span>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="intro">
|
||||
{{ $avatar := "" }}
|
||||
{{ if or .Params.gravatar.Email (and .Site.Params.gravatar.Email (ne .Params.gravatar.Email false)) }}
|
||||
{{ if .Site.Params.gravatar.email }}
|
||||
{{ $avatar = (printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" (md5 .Site.Params.gravatar.email)) }}
|
||||
{{ else if .Site.Params.avatar }}
|
||||
{{ $avatar = .Site.Params.avatar }}
|
||||
@@ -18,10 +18,11 @@
|
||||
{{ $id := md5 . | printf "tp-%s" }}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>{{ . | safeHTML }}</div>
|
||||
<div id={{ $id }} class="typeit"></div>
|
||||
<script>
|
||||
var typeitMap = window.typeitMap || {};
|
||||
typeitMap["{{ $id }}"] = true;
|
||||
</script>
|
||||
{{ with $.Scratch.Get "typeitMap" }}
|
||||
{{ $.Scratch.Set "typeitMap" (dict $id (slice $id) | merge .) }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "typeitMap" (dict $id (slice $id)) }}
|
||||
{{ end }}
|
||||
</h2>
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -1,171 +1,165 @@
|
||||
{{ with .Site.Params.Social.Github }}
|
||||
<a href="https://github.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-github"></i></a>
|
||||
<a href="https://github.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-github"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.LinkedIn }}
|
||||
<a href="https://linkedin.com/in/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-linkedin"></i></a>
|
||||
<a href="https://linkedin.com/in/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-linkedin"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Twitter }}
|
||||
<a href="https://twitter.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-twitter"></i></a>
|
||||
<a href="https://twitter.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-twitter"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Instagram }}
|
||||
<a href="https://www.instagram.com/{{.}}/" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-instagram"></i></a>
|
||||
<a href="https://www.instagram.com/{{.}}/" rel="me noopener noreffer" target="_blank"><i class="fab fa-instagram"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Email}}
|
||||
<a href="mailto:{{.}}" rel="me noopener noreffer"><i class="iconfont icon-mail" target="_blank"></i></a>
|
||||
<a href="mailto:{{.}}" rel="me noopener noreffer"><i class="fas fa-envelope" target="_blank"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Facebook}}
|
||||
<a href="https://facebook.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-facebook"></i></a>
|
||||
<a href="https://facebook.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-facebook"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Telegram}}
|
||||
<a href="https://t.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-telegram-plane"></i></a>
|
||||
<a href="https://t.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-telegram-plane"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Medium}}
|
||||
<a href="https://medium.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-medium"></i></a>
|
||||
<a href="https://medium.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-medium"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Gitlab}}
|
||||
<a href="https://gitlab.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-gitlab"></i></a>
|
||||
<a href="https://gitlab.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-gitlab"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Youtubelegacy}}
|
||||
<a href="https://www.youtube.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-youtube"></i></a>
|
||||
<a href="https://www.youtube.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Youtubecustom}}
|
||||
<a href="https://www.youtube.com/c/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-youtube"></i></a>
|
||||
<a href="https://www.youtube.com/c/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Youtubechannel}}
|
||||
<a href="https://www.youtube.com/channel/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-youtube"></i></a>
|
||||
<a href="https://www.youtube.com/channel/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Tumblr}}
|
||||
<a href="https://{{.}}.tumblr.com" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-tumblr"></i></a>
|
||||
<a href="https://{{.}}.tumblr.com" rel="me noopener noreffer" target="_blank"><i class="fab fa-tumblr"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Quora}}
|
||||
<a href="https://www.quora.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-quora"></i></a>
|
||||
<a href="https://www.quora.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-quora"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Keybase}}
|
||||
<a href="https://keybase.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-keybase"></i></a>
|
||||
<a href="https://keybase.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-keybase"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Pinterest}}
|
||||
<a href="https://www.pinterest.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-pinterest"></i></a>
|
||||
<a href="https://www.pinterest.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-pinterest"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Reddit}}
|
||||
<a href="https://www.reddit.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-reddit"></i></a>
|
||||
<a href="https://www.reddit.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-reddit"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Codepen}}
|
||||
<a href="https://codepen.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-codepen"></i></a>
|
||||
<a href="https://codepen.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-codepen"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Bitbucket}}
|
||||
<a href="https://bitbucket.org/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-bitbucket"></i></a>
|
||||
<a href="https://bitbucket.org/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-bitbucket"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Stackoverflow}}
|
||||
<a href="https://stackoverflow.com/users/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-stack-overflow"></i></a>
|
||||
<a href="https://stackoverflow.com/users/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-stack-overflow"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Weibo}}
|
||||
<a href="https://weibo.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-weibo"></i></a>
|
||||
<a href="https://weibo.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-weibo"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Odnoklassniki}}
|
||||
<a href="https://ok.ru/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-odnoklassniki"></i></a>
|
||||
<a href="https://ok.ru/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-odnoklassniki"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.VKontakte}}
|
||||
<a href="https://vk.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-vk"></i></a>
|
||||
<a href="https://vk.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-vk"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Flickr}}
|
||||
<a href="https://www.flickr.com/photos/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-flickr"></i></a>
|
||||
<a href="https://www.flickr.com/photos/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-flickr"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Xing}}
|
||||
<a href="https://www.xing.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-xing"></i></a>
|
||||
<a href="https://www.xing.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-xing"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Snapchat}}
|
||||
<a href="https://www.snapchat.com/add/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-snapchat"></i></a>
|
||||
<a href="https://www.snapchat.com/add/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-snapchat"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Soundcloud}}
|
||||
<a href="https://soundcloud.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-soundcloud"></i></a>
|
||||
<a href="https://soundcloud.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-soundcloud"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Spotify}}
|
||||
<a href="https://open.spotify.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-spotify"></i></a>
|
||||
<a href="https://open.spotify.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-spotify"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Bandcamp}}
|
||||
<a href="https://{{.}}.bandcamp.com/" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-bandcamp"></i></a>
|
||||
<a href="https://{{.}}.bandcamp.com/" rel="me noopener noreffer" target="_blank"><i class="fab fa-bandcamp"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Paypal}}
|
||||
<a href="https://paypal.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-paypal"></i></a>
|
||||
<a href="https://paypal.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-paypal"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Fivehundredpx}}
|
||||
<a href="https://500px.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-500px"></i></a>
|
||||
<a href="https://500px.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-500px"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Mix}}
|
||||
<a href="https://mix.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-mix"></i></a>
|
||||
<a href="https://mix.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-mix"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Goodreads}}
|
||||
<a href="https://www.goodreads.com/user/show/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-goodreads"></i></a>
|
||||
<a href="https://www.goodreads.com/user/show/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-goodreads"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Lastfm}}
|
||||
<a href="https://www.last.fm/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-POP_lastfm"></i></a>
|
||||
<a href="https://www.last.fm/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-POP_lastfm"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Foursquare}}
|
||||
<a href="https://foursquare.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-foursquare"></i></a>
|
||||
<a href="https://foursquare.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-foursquare"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Hackernews}}
|
||||
<a href="https://news.ycombinator.com/user?id={{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-ycombinator"></i></a>
|
||||
<a href="https://news.ycombinator.com/user?id={{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-ycombinator"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Kickstarter}}
|
||||
<a href="https://kickstarter.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-kickstarter"></i></a>
|
||||
<a href="https://kickstarter.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-kickstarter"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Patreon}}
|
||||
<a href="https://patreon.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-patreon"></i></a>
|
||||
<a href="https://patreon.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-patreon"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Steam}}
|
||||
<a href="https://steamcommunity.com/id/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-steam"></i></a>
|
||||
<a href="https://steamcommunity.com/id/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-steam"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Twitch}}
|
||||
<a href="https://www.twitch.tv/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-twitch"></i></a>
|
||||
<a href="https://www.twitch.tv/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-twitch"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Strava}}
|
||||
<a href="https://www.strava.com/athletes/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-strava"></i></a>
|
||||
<a href="https://www.strava.com/athletes/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-strava"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Skype}}
|
||||
<a href="skype:{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-skype"></i></a>
|
||||
<a href="skype:{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-skype"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Whatsapp}}
|
||||
<a href="https://wa.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-whatsapp"></i></a>
|
||||
<a href="https://wa.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-whatsapp"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Zhihu}}
|
||||
<a href="https://www.zhihu.com/people/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-zhihu"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Douban}}
|
||||
<a href="https://www.douban.com/people/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-douban"></i></a>
|
||||
<a href="https://www.zhihu.com/people/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-zhihu"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Angellist}}
|
||||
<a href="https://angel.co/{{.}}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-angellist"></i></a>
|
||||
<a href="https://angel.co/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-angellist"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Slideshare}}
|
||||
<a href="https://slideshare.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-slideshare"></i></a>
|
||||
<a href="https://slideshare.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-slideshare"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Jsfiddle}}
|
||||
<a href="https://jsfiddle.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-jsfiddle"></i></a>
|
||||
<a href="https://jsfiddle.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-jsfiddle"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Deviantart}}
|
||||
<a href="https://{{ . }}.deviantart.com/" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-deviantart"></i></a>
|
||||
<a href="https://{{ . }}.deviantart.com/" rel="me noopener noreffer" target="_blank"><i class="fab fa-deviantart"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Behance}}
|
||||
<a href="https://behance.net/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-behance"></i></a>
|
||||
<a href="https://behance.net/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-behance"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Dribble}}
|
||||
<a href="https://dribbble.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-dribbble"></i></a>
|
||||
<a href="https://dribbble.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-dribbble"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Wordpress}}
|
||||
<a href="https://{{ . }}.wordpress.com" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-wordpress"></i></a>
|
||||
<a href="https://{{ . }}.wordpress.com" rel="me noopener noreffer" target="_blank"><i class="fab fa-wordpress"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Vine}}
|
||||
<a href="https://vine.co/" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-vine"></i></a>
|
||||
<a href="https://vine.co/" rel="me noopener noreffer" target="_blank"><i class="fab fa-vine"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Googlescholar}}
|
||||
<a href="https://scholar.google.com/citations?{{ . }}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-Googlescholar"></i></a>
|
||||
<a href="https://scholar.google.com/citations?{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-Googlescholar"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Researchgate}}
|
||||
<a href="https://www.researchgate.net/profile/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-researchgate"></i></a>
|
||||
<a href="https://www.researchgate.net/profile/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-researchgate"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Mastodon}}
|
||||
<a href="https://mastodon.social/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-mastodon"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Thingiverse}}
|
||||
<a href="https://www.thingiverse.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-t"></i></a>
|
||||
<a href="https://mastodon.social/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-mastodon"></i></a>
|
||||
{{ end }}
|
||||
|
||||
@@ -32,25 +32,35 @@
|
||||
` }}
|
||||
|
||||
{{ $jquery | safeHTML }}
|
||||
{{ $typeit | safeHTML }}
|
||||
|
||||
{{ if .IsPage }}
|
||||
{{ if .Params.Music }}
|
||||
{{ $lazysizes | safeHTML }}
|
||||
{{ if .Scratch.Get "music" }}
|
||||
{{ $metingjs | safeHTML }}
|
||||
{{ end }}
|
||||
{{ $countdown | safeHTML }}
|
||||
{{ if or .Params.Math .Site.Params.Math }}
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ $katex | safeHTML }}
|
||||
{{ end }}
|
||||
|
||||
{{ $lazysizes | safeHTML }}
|
||||
|
||||
{{ $scripts = $scripts | append $dynamicToTop }}
|
||||
{{ $scripts = $scripts | resources.Concat "/js/vendor_post.js" | resources.Minify }}
|
||||
{{ else }}
|
||||
{{ $scripts = $scripts | resources.Concat "/js/vendor_main.js" | resources.Minify}}
|
||||
{{ end }}
|
||||
|
||||
{{ $typeitMap := .Scratch.Get "typeitMap" }}
|
||||
{{ if $typeitMap }}
|
||||
{{ $typeit | safeHTML }}
|
||||
{{ $typeitArr := slice }}
|
||||
{{ range $key, $val := $typeitMap }}
|
||||
{{ $typeitArr = $typeitArr | append (slice $val) }}
|
||||
{{ end }}
|
||||
<script>var typeitArr = {{ $typeitArr | jsonify | safeJS }};</script>
|
||||
{{ end }}
|
||||
{{ with .Scratch.Get "countdownMap" }}
|
||||
{{ $countdown | safeHTML }}
|
||||
<script>var countdownMap = {{ . | jsonify | safeJS }};</script>
|
||||
{{ end }}
|
||||
|
||||
<script src="{{ $scripts.RelPermalink }}" async=""></script>
|
||||
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
|
||||
@@ -1,75 +1,62 @@
|
||||
{{ if or .Params.socialShare (and .Site.Params.socialShare (ne .Params.socialShare false)) }}
|
||||
|
||||
{{ if or .Params.Share.Twitter (and .Site.Params.Share.Twitter (ne .Params.Share.Twitter false)) }}
|
||||
<a href="//twitter.com/share?url={{ .Permalink }}&text={{ .Title }}&via={{ .Site.Params.Social.Twitter }}"
|
||||
target="_blank" title="Share on Twitter">
|
||||
<i class="iconfont icon-twitter"></i>
|
||||
<a href="//twitter.com/share?url={{ .Permalink }}&text={{ .Title }}&via={{ .Site.Params.Social.Twitter }}" target="_blank" title="Share on Twitter">
|
||||
<i class="fab fa-twitter"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if or .Params.Share.Facebook (and .Site.Params.Share.Facebook (ne .Params.Share.Facebook false)) }}
|
||||
<a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="Share on Facebook">
|
||||
<i class="iconfont icon-facebook"></i>
|
||||
<i class="fab fa-facebook-square"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if or .Params.Share.Reddit (and .Site.Params.Share.Reddit (ne .Params.Share.Reddit false)) }}
|
||||
<a href="//reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on Reddit">
|
||||
<i class="iconfont icon-reddit"></i>
|
||||
<i class="fab fa-reddit"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if or .Params.Share.Linkedin (and .Site.Params.Share.Linkedin (ne .Params.Share.Linkedin false)) }}
|
||||
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&title={{ .Title }}" target="_blank"
|
||||
title="Share on LinkedIn">
|
||||
<i class="iconfont icon-linkedin"></i>
|
||||
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on LinkedIn">
|
||||
<i class="fab fa-linkedin"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if or .Params.Share.Pinterest (and .Site.Params.Share.Pinterest (ne .Params.Share.Pinterest false)) }}
|
||||
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&description={{ .Title }}" target="_blank"
|
||||
title="Share on Pinterest">
|
||||
<i class="iconfont icon-pinterest"></i>
|
||||
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Pinterest">
|
||||
<i class="fab fa-pinterest"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if or .Params.Share.HackerNews (and .Site.Params.Share.HackerNews (ne .Params.Share.HackerNews false)) }}
|
||||
<a href="//news.ycombinator.com/submitlink?u={{ .Permalink }}&description={{ .Title }}" target="_blank"
|
||||
title="Share on Hacker News">
|
||||
<i class="iconfont icon-ycombinator"></i>
|
||||
{{ if or .Params.Share.YCombinator (and .Site.Params.Share.YCombinator (ne .Params.Share.YCombinator false)) }}
|
||||
<a href="//news.ycombinator.com/submitlink?u={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Hacker News">
|
||||
<i class="fab fa-y-combinator"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if or .Params.Share.Mix (and .Site.Params.Share.Mix (ne .Params.Share.Mix false)) }}
|
||||
<a href="//mix.com/add?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Mix">
|
||||
<i class="iconfont icon-mix"></i>
|
||||
<i class="fab fa-mix"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if or .Params.Share.Tumblr (and .Site.Params.Share.Tumblr (ne .Params.Share.Tumblr false)) }}
|
||||
<a href="//www.tumblr.com/widgets/share/tool?canonicalUrl={{ .Permalink }}&title={{ .Title }}" target="_blank"
|
||||
title="Share on Tumblr">
|
||||
<i class="iconfont icon-tumblr"></i>
|
||||
<a href="//www.tumblr.com/widgets/share/tool?canonicalUrl={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on Tumblr">
|
||||
<i class="fab fa-tumblr"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if or .Params.Share.VKontakte (and .Site.Params.Share.VKontakte (ne .Params.Share.VKontakte false)) }}
|
||||
{{ if or .Params.Share.VK (and .Site.Params.Share.VK (ne .Params.Share.VK false)) }}
|
||||
<a href="//vk.com/share.php?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on VKontakte ">
|
||||
<i class="iconfont icon-vk"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if or .Params.Share.Douban (and .Site.Params.Share.Douban (ne .Params.Share.Douban false)) }}
|
||||
<a href="//www.douban.com/recommend/?url={{ .Permalink }}&title={{ .Title }}" target="_blank"
|
||||
title="Share on Douban ">
|
||||
<i class="iconfont icon-douban"></i>
|
||||
<i class="fab fa-vk"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if or .Params.Share.Weibo (and .Site.Params.Share.Weibo (ne .Params.Share.Weibo false)) }}
|
||||
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&appkey=&title={{ .Title }}" target="_blank"
|
||||
title="Share on Douban ">
|
||||
<i class="iconfont icon-weibo"></i>
|
||||
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&appkey=&title={{ .Title }}" target="_blank" title="Share on Weibo">
|
||||
<i class="fab fa-weibo"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -3,36 +3,48 @@
|
||||
{{ define "content" }}
|
||||
{{ $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
|
||||
{{ $modify_date := .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
|
||||
{{ $author := .Site.Author.Name }}
|
||||
{{ $author := .Site.Author.name }}
|
||||
{{ if isset .Params "author" }}
|
||||
{{ $author = .Site.Author.Name }}
|
||||
{{ $author = .Site.Author.name }}
|
||||
{{ end }}
|
||||
|
||||
<article class="post-warp">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
<div class="post-meta">
|
||||
</header>
|
||||
|
||||
<div class="post-meta">
|
||||
<div class="post-meta-main">
|
||||
<a href="{{.Site.BaseURL }}" rel="author">{{ $author }}</a>
|
||||
{{ T "wrote" }}
|
||||
<span class="post-time"><time datetime={{ $publish_date }}>{{ $publish_date }}</time></span>
|
||||
✎
|
||||
{{ T "wordCount" .WordCount }}
|
||||
<i class="iconfont icon-timer"></i>
|
||||
{{ T "readingTime" .ReadingTime }}
|
||||
|
||||
{{ T "included" }}
|
||||
{{ with .Params.categories -}}
|
||||
<span class="post-category">
|
||||
{{ range . }}
|
||||
{{- $name := . -}}
|
||||
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
|
||||
<i class="iconfont icon-folder"></i>
|
||||
<i class="far fa-folder"></i>
|
||||
<a href="{{ .Permalink }}">{{ $name }}</a>
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
</span>
|
||||
{{- end }}
|
||||
</div>
|
||||
</header>
|
||||
<div class="post-meta-other">
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<span class="post-time"><time datetime={{ $publish_date }}>{{ $publish_date }}</time></span>
|
||||
<i class="fas fa-pencil-alt"></i>
|
||||
{{ T "wordCount" .WordCount }}
|
||||
<i class="far fa-clock"></i>
|
||||
{{ T "readingTime" .ReadingTime }}
|
||||
{{ if and .Site.Params.valine.enable .Site.Params.valine.visitor }}
|
||||
<span id="{{ .RelPermalink | relURL }}" class="leancloud_visitors" data-flag-title="{{ .Title }}">
|
||||
<i class="far fa-eye"></i>
|
||||
{{ T "pageviews" | safeHTML }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
<!--featured_image-->
|
||||
{{ with .Params.featured_image }}
|
||||
@@ -49,43 +61,30 @@
|
||||
{{ $finalContent }}
|
||||
</div>
|
||||
|
||||
<div class="post-copyright">
|
||||
<p class="copyright-item">
|
||||
<span>{{ T "author" }}:</span>
|
||||
<span><a href="{{.Site.BaseURL }}" rel="author">{{ $author }}</a></span>
|
||||
</p>
|
||||
|
||||
<p class="copyright-item">
|
||||
<div class="post-info">
|
||||
<p class="post-info-item">
|
||||
<span>{{ T "lastMod" }}:</span>
|
||||
<span>{{ $modify_date }}</span>
|
||||
</p>
|
||||
|
||||
<p class="copyright-item">
|
||||
<p class="post-info-item">
|
||||
{{ if and ( $.Param "socialShare" ) (gt (len ($.Param "share")) 0) }}
|
||||
<span>{{ T "share" }}:</span>
|
||||
<span>{{ partial "post/share-links.html" . }}</span>
|
||||
<span>{{ T "share" }}:</span>
|
||||
<span>{{ partial "post/share-links.html" . }}</span>
|
||||
{{ end }}
|
||||
</p>
|
||||
|
||||
{{ with .Site.Params.license }}
|
||||
<p class="copyright-item">
|
||||
<span>{{ T "license" }}:</span>
|
||||
<span>{{ . | safeHTML }}</span>
|
||||
</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="post-tags">
|
||||
{{ with .Params.tags }}
|
||||
<section>
|
||||
<i class="iconfont icon-icon-tag"></i>{{ T "tag" }}:
|
||||
{{ range . }}
|
||||
<span class="tag">
|
||||
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/">#{{.}}</a>
|
||||
</span>
|
||||
{{ with .Params.tags }}
|
||||
{{ range . }}
|
||||
<span class="tag">
|
||||
<i class="fas fa-tag"></i><a href="{{ "tags/" | absURL }}{{ . | urlize }}/"> {{.}} </a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
<section>
|
||||
<span><a href="javascript:window.history.back();">{{ T "back" }}</a></span>
|
||||
|
|
||||
@@ -95,12 +94,10 @@
|
||||
|
||||
<div class="post-nav">
|
||||
{{ if .PrevInSection }}
|
||||
<a href="{{.PrevInSection.Permalink}}" class="prev" rel="prev" title="{{ .PrevInSection.Title}}"><i
|
||||
class="iconfont icon-dajiantou"></i> {{ .PrevInSection.Title}}</a>
|
||||
<a href="{{.PrevInSection.Permalink}}" class="prev" rel="prev" title="{{ .PrevInSection.Title}}"><i class="fas fa-angle-left"></i> {{ .PrevInSection.Title}}</a>
|
||||
{{ end }}
|
||||
{{ if .NextInSection }}
|
||||
<a href="{{.NextInSection.Permalink}}" class="next" rel="next"
|
||||
title="{{.NextInSection.Title}}">{{.NextInSection.Title}} <i class="iconfont icon-xiaojiantou"></i></a>
|
||||
<a href="{{.NextInSection.Permalink}}" class="next" rel="next" title="{{.NextInSection.Title}}">{{.NextInSection.Title}} <i class="fas fa-angle-right"></i></a>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</span>
|
||||
in
|
||||
{{ with .Params.categories }}
|
||||
<i class="iconfont icon-folder"></i>
|
||||
<i class="far fa-folder"></i>
|
||||
<span class="post-category">
|
||||
{{ range . }}
|
||||
{{ $name := . }}
|
||||
|
||||
@@ -7,10 +7,8 @@
|
||||
{{ with .Site.LanguageCode }}
|
||||
<language>{{ . }}</language>
|
||||
{{ end }}
|
||||
{{ with .Site.Author.Email }}
|
||||
{{ with .Site.Author.email }}
|
||||
<managingEditor>{{ . }}{{ with .Site.Author.name }} ({{ . }}){{ end }}</managingEditor>
|
||||
{{ end }}
|
||||
{{ with .Site.Author.Email }}
|
||||
<webMaster>{{ . }}{{ with .Site.Author.name }} ({{ . }}){{ end }}</webMaster>
|
||||
{{ end }}
|
||||
{{ with .Site.Copyright }}
|
||||
@@ -25,8 +23,8 @@
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.Email }}
|
||||
<author>{{ . }}{{ with .Site.Author.Name }} ({{ . }}){{ end }}</author>
|
||||
{{ with .Site.Author.email }}
|
||||
<author>{{ . }}{{ with .Site.Author.name }} ({{ . }}){{ end }}</author>
|
||||
{{ end }}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
|
||||
@@ -1,25 +1,42 @@
|
||||
{{ if .IsNamedParams }}
|
||||
{{ if eq (.Get "details") "true" }}
|
||||
<details class="admonition {{ .Get "type" }}">
|
||||
{{ with .Get "title" }}<summary class="admonition-title">{{ . }}</summary>{{ end }}
|
||||
{{ .Inner }}
|
||||
{{ $_hugo_config := `{ "version": 1 }` -}}
|
||||
{{ $iconMap := dict "note" "fas fa-pencil-alt" -}}
|
||||
{{ $iconMap = dict "abstract" "fas fa-list-ul" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "info" "fas fa-info-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "tip" "fas fa-lightbulb" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "success" "fas fa-check-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "question" "fas fa-question-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "warning" "fas fa-exclamation-triangle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "failure" "fas fa-times-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "danger" "fas fa-skull-crossbones" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "bug" "fas fa-bug" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "example" "fas fa-list-ol" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "quote" "fas fa-quote-right" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "details" "fas fa-angle-down" | merge $iconMap -}}
|
||||
|
||||
{{ if .IsNamedParams -}}
|
||||
{{ $type := .Get "type" }}
|
||||
{{ if eq (.Get "details") "true" -}}
|
||||
<details class="admonition {{ $type }}">
|
||||
{{- with .Get "title" }}<summary class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}<i class="details {{ index $iconMap "details" }}"></i></summary>{{ end }}
|
||||
{{- .Inner -}}
|
||||
</details>
|
||||
{{ else }}
|
||||
<div class="admonition {{ .Get "type" }}">
|
||||
{{- with .Get "title" }}<p class="admonition-title">{{ . }}</p>{{ end }}
|
||||
{{ .Inner }}
|
||||
{{- else -}}
|
||||
<div class="admonition {{ $type }}">
|
||||
{{- with .Get "title" }}<p class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}</p>{{ end }}
|
||||
{{- .Inner -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{- end -}}
|
||||
{{ else -}}
|
||||
{{ $type := .Get 0 }}
|
||||
{{ if eq (.Get 2) "true" }}
|
||||
<details class="admonition {{ .Get 0 }}">
|
||||
{{- with .Get 1 }}<summary class="admonition-title">{{ . }}</summary>{{ end }}
|
||||
{{ .Inner }}
|
||||
<details class="admonition {{ $type }}">
|
||||
{{- with .Get 1 }}<summary class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}<i class="details {{ index $iconMap "details" }}"></i></summary>{{ end }}
|
||||
{{- .Inner -}}
|
||||
</details>
|
||||
{{ else }}
|
||||
<div class="admonition {{ .Get 0 }}">
|
||||
{{- with .Get 1 }}<p class="admonition-title">{{ . }}</p>{{ end }}
|
||||
{{ .Inner }}
|
||||
{{- else -}}
|
||||
<div class="admonition {{ $type }}">
|
||||
{{- with .Get 1 }}<p class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}</p>{{ end }}
|
||||
{{- .Inner -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
@@ -1,3 +1,4 @@
|
||||
<div class='align-center'>
|
||||
{{ .Inner }}
|
||||
</div>
|
||||
{{ $_hugo_config := `{ "version": 1 }` -}}
|
||||
<div class="align-center">
|
||||
{{- .Inner -}}
|
||||
</div>
|
||||
@@ -1,3 +1,4 @@
|
||||
<div class='align-left'>
|
||||
{{ .Inner }}
|
||||
</div>
|
||||
{{ $_hugo_config := `{ "version": 1 }` -}}
|
||||
<div class="align-left">
|
||||
{{- .Inner -}}
|
||||
</div>
|
||||
@@ -1,3 +1,4 @@
|
||||
<div class='align-right'>
|
||||
{{ .Inner }}
|
||||
</div>
|
||||
{{ $_hugo_config := `{ "version": 1 }` -}}
|
||||
<div class="align-right">
|
||||
{{- .Inner -}}
|
||||
</div>
|
||||
@@ -7,9 +7,11 @@
|
||||
{{ end }}
|
||||
{{ $id = printf "#%s" $id }}
|
||||
{{ with .Get "date" }}
|
||||
<script>
|
||||
var countdownMap = window.countdownMap || {};
|
||||
countdownMap["{{ $id }}"] = {{ . }};
|
||||
</script>
|
||||
{{ $date := . }}
|
||||
{{ with $.Page.Scratch.Get "countdownMap" }}
|
||||
{{ $.Page.Scratch.Set "countdownMap" (dict $id $date | merge .) }}
|
||||
{{ else }}
|
||||
{{ $.Page.Scratch.Set "countdownMap" (dict $id $date) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
5
layouts/shortcodes/fa.html
Normal file
5
layouts/shortcodes/fa.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{ if .IsNamedParams -}}
|
||||
<i class="inline-icon {{ .Get "class" }}"></i>
|
||||
{{- else -}}
|
||||
<i class="inline-icon {{ .Get 0 }}"></i>
|
||||
{{- end }}
|
||||
@@ -1,3 +1,4 @@
|
||||
<div class='float-right'>
|
||||
{{ .Inner }}
|
||||
</div>
|
||||
{{ $_hugo_config := `{ "version": 1 }` -}}
|
||||
<div class="float-right">
|
||||
{{- .Inner -}}
|
||||
</div>
|
||||
@@ -1,3 +1,4 @@
|
||||
{{ .Page.Scratch.Set "music" "true" }}
|
||||
{{ if .IsNamedParams }}
|
||||
<meting-js server={{ .Get "server" }} type={{ .Get "type" }} id={{ .Get "id" }}
|
||||
{{ with .Get "autoplay" }}
|
||||
@@ -18,4 +19,4 @@
|
||||
theme="#A9A9B3"></meting-js>
|
||||
{{ else }}
|
||||
<meting-js server={{ .Get 0 }} type={{ .Get 1 }} id={{ .Get 2 }} theme="#A9A9B3"></meting-js>></meting-js>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -28,15 +28,23 @@
|
||||
{{ printf "<%s id=%s></%s>" $tag $id $tag | safeHTML }}
|
||||
{{ end }}
|
||||
|
||||
<script>
|
||||
var typeitMap = window.typeitMap || {};
|
||||
{{ with .Get "group" }}
|
||||
if (!typeitMap[{{ . }}]) {
|
||||
typeitMap[{{ . }}] = [];
|
||||
}
|
||||
typeitMap[{{ . }}].push({{ $id }});
|
||||
{{ $typeitMap := .Page.Scratch.Get "typeitMap" }}
|
||||
{{ $group := slice $id }}
|
||||
{{ with .Get "group" }}
|
||||
{{ if $typeitMap }}
|
||||
{{ if index $typeitMap . }}
|
||||
{{ $group = index $typeitMap . | append $id }}
|
||||
{{ end }}
|
||||
{{ $typeitMap = dict . $group | merge $typeitMap }}
|
||||
{{ else }}
|
||||
typeitMap[{{ $id }}] = true;
|
||||
{{ $typeitMap = dict . $group }}
|
||||
{{ end }}
|
||||
</script>
|
||||
{{ else }}
|
||||
{{ if $typeitMap }}
|
||||
{{ $typeitMap = dict $id $group | merge $typeitMap }}
|
||||
{{ else }}
|
||||
{{ $typeitMap = dict $id $group }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ .Page.Scratch.Set "typeitMap" $typeitMap }}
|
||||
</div>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="card-item">
|
||||
<div class="categories">
|
||||
<a href="{{ .Permalink }}">
|
||||
<h3> <i class="iconfont icon-folder" style="padding-right: 3px"></i> {{ $term | humanize}} </h3>
|
||||
<h3> <i class="far fa-folder"></i> {{ $term | humanize}} </h3>
|
||||
</a>
|
||||
{{ range first 5 $pages }}
|
||||
<article class="archive-item">
|
||||
|
||||
Reference in New Issue
Block a user