This repository was archived by the owner on Mar 9, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Showing
12 changed files
with
234 additions
and
215 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
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
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,5 +1,4 @@ | ||
{{ $style := resources.Get "css/main.scss" | resources.ToCSS | resources.Minify}} | ||
{{ $iconfont := resources.Get "font/iconfont.css" }} | ||
{{ $iconfont := resources.Get "font/iconfont.css" | resources.Minify }} | ||
<link rel="stylesheet" href="{{ $iconfont.RelPermalink }}"> | ||
<link rel="stylesheet" href="{{ $style.RelPermalink }}"> | ||
|
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
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
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,71 +1,74 @@ | ||
{{ $cdn_url := .Scratch.Get "cdn_url" }} | ||
|
||
<div class="post-warp"> | ||
<div class="intro"> | ||
{{ $cdn_url := .Scratch.Get "cdn_url" }} | ||
{{ with .Site.Params.avatar}} | ||
{{ $avatar := .}} | ||
<div class="avatar"> | ||
<a href="/posts/"> <img src="{{ (printf "%s%s" $cdn_url $avatar)}}"> </a> | ||
</div> | ||
{{ end }} | ||
{{ if or .Params.gravatar.Email (and .Site.Params.gravatar.Email (ne .Params.gravatar.Email false)) }} | ||
<div class="avatar"> | ||
<a href="/posts/"> <img src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.gravatar.email }}?s=240&d=mp" alt="gravatar"> </a> | ||
</div> | ||
{{ end }} | ||
<div class="intro"> | ||
{{ with .Site.Params.avatar}} | ||
{{ $avatar := .}} | ||
<div class="avatar"> | ||
<a href="/posts/"> <img src="{{ (printf "%s%s" $cdn_url $avatar)}}"> </a> | ||
</div> | ||
{{ end }} | ||
{{ if or .Params.gravatar.Email (and .Site.Params.gravatar.Email (ne .Params.gravatar.Email false)) }} | ||
<div class="avatar"> | ||
<a href="/posts/"> <img | ||
src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.gravatar.email }}?s=240&d=mp" | ||
alt="gravatar"> </a> | ||
</div> | ||
{{ end }} | ||
|
||
{{ with .Site.Params.subtitle}} | ||
<h2 class="description"> | ||
{{ . }} | ||
</h2> | ||
{{ end }} | ||
|
||
</div> | ||
{{ range (.Paginate .Pages).Pages }} | ||
<article class="post" itemscope itemscope="" itemtype="http://schema.org/Article"> | ||
{{ with .Site.Params.subtitle}} | ||
<h2 class="description"> | ||
{{ . }} | ||
</h2> | ||
{{ end }} | ||
|
||
<header class="post-header"> | ||
<h1 class="post-title" itemprop="name headline"><a href="{{ .Permalink }}">{{ .Title }}</a></h1> | ||
</header> | ||
<div class="post-content"> | ||
<!--featured_image--> | ||
{{ with .Params.featured_image }} | ||
{{- $img := . -}} | ||
<p><img src="{{ printf "%s%s" $cdn_url $img }}" class="featured_image"></p> | ||
{{ end }} | ||
<!-- end featured_image--> | ||
</div> | ||
{{ range (.Paginate .Pages).Pages }} | ||
<article class="post" itemscope itemscope="" itemtype="http://schema.org/Article"> | ||
|
||
<header class="post-header"> | ||
<h1 class="post-title" itemprop="name headline"><a href="{{ .Permalink }}">{{ .Title }}</a></h1> | ||
</header> | ||
<div class="post-content"> | ||
<!--featured_image--> | ||
{{ with .Params.featured_image }} | ||
{{- $img := . -}} | ||
<p><img src="{{ printf "%s%s" $cdn_url $img }}" class="featured_image"></p> | ||
{{ end }} | ||
<!-- end featured_image--> | ||
|
||
{{ .Summary }} | ||
</div> | ||
<div class="post-footer"> | ||
<div class="post-meta"> | ||
{{ .Summary }} | ||
</div> | ||
<div class="post-footer"> | ||
<div class="post-meta"> | ||
<span class="post-time"> | ||
<time datetime={{.Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} itemprop="datePublished">{{ .Date.Format (.Site.Params.dateFormatToUse | default "2 January 2006") }}</time> | ||
<time datetime={{.Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} | ||
itemprop="datePublished">{{ .Date.Format (.Site.Params.dateFormatToUse | default "2 January 2006") }}</time> | ||
</span> | ||
in | ||
{{ with .Params.categories -}} | ||
<i class="iconfont icon-folder"></i> | ||
<span class="post-category"> | ||
{{ range . }} | ||
{{- $name := . -}} | ||
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}} | ||
<a href="{{ .Permalink }}"> {{ $name }} </a> | ||
{{ end -}} | ||
{{ end }} | ||
{{ range . }} | ||
{{- $name := . -}} | ||
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}} | ||
<a href="{{ .Permalink }}"> {{ $name }} </a> | ||
{{ end -}} | ||
{{ end }} | ||
</span> | ||
{{- end }} | ||
</div> | ||
{{ with .Params.tags }} | ||
<div class="post-tags"> | ||
{{ range . }} | ||
<span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}/"> | ||
#{{.}}</a></span> | ||
{{ end }} | ||
</div> | ||
{{ end }} | ||
</div> | ||
{{ with .Params.tags }} | ||
<div class="post-tags"> | ||
{{ range . }} | ||
<span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}/"> | ||
#{{.}}</a></span> | ||
{{ end }} | ||
</div> | ||
{{ end }} | ||
</div> | ||
</article> | ||
{{ end }} | ||
</article> | ||
{{ end }} | ||
|
||
{{ partial "paginator.html" . }} | ||
{{ partial "paginator.html" . }} | ||
</div> |
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,22 +1,22 @@ | ||
{{ $cdn_url := .Scratch.Get "cdn_url" }} | ||
|
||
<div class="intro"> | ||
{{ $cdn_url := .Scratch.Get "cdn_url" }} | ||
{{ $avatar := "" }} | ||
{{ with .Site.Params.avatar}} | ||
{{ $avatar := .}} | ||
<div class="avatar"> | ||
<a href="/posts/"> <img src="{{ (printf "%s%s" $cdn_url $avatar)}}"> </a> | ||
</div> | ||
{{ $avatar = (printf "%s%s" $cdn_url .) }} | ||
{{ end }} | ||
{{ if or .Params.gravatar.Email (and .Site.Params.gravatar.Email (ne .Params.gravatar.Email false)) }} | ||
<div class="avatar"> | ||
<a href="/posts/"> <img src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.gravatar.email }}?s=240&d=mp" alt="gravatar"> </a> | ||
</div> | ||
{{ end }} | ||
{{ $avatar = (printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" (md5 .Site.Params.gravatar.email)) }} | ||
{{ end }} | ||
{{ if $avatar }} | ||
<div class="avatar"><a href="/posts/"> <img src={{ $avatar }} alt="avatar"></a></div> | ||
{{ end }} | ||
|
||
{{ with .Site.Params.subtitle}} | ||
<h2 class="description"> | ||
{{ . }} | ||
</h2> | ||
<h2 class="description">{{ . }}</h2> | ||
{{ end }} | ||
|
||
<div class="social-links"> | ||
{{ partial "social.html" . }} | ||
{{ partial "social.html" . }} | ||
</div> | ||
</div> |
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 |
---|---|---|
|
@@ -5,25 +5,25 @@ | |
{{ $prettify := resources.Get "/js/prettify.min.js" }} | ||
{{ $dynamic := resources.Get "/js/dynamic.to.top.min.js" }} | ||
{{ $main := resources.Get "/js/main.js" }} | ||
{{ $lihtGallery := resources.Get "/js/lightGallery-all.min.js" }} | ||
{{ $lihtGallery_init := resources.Get "/js/lightGallery-init.js" }} | ||
{{ if .IsPage }} | ||
{{ $lightGallery := resources.Get "/js/lightGallery-all.min.js" }} | ||
{{ $lightGallery_init := resources.Get "/js/lightGallery-init.js" }} | ||
|
||
{{ if .IsPage }} | ||
{{ if $postHasImages }} | ||
<link crossorigin="anonymous" integrity="sha384-yziQACfvCVwLqVFLqkWBYRO3XeA4EqzfXKGwaWnenYn5XzqfJFlFdKEmvutIQdKb" href="https://lib.baomitu.com/lightgallery/1.6.12/css/lightgallery.min.css" rel="stylesheet"> | ||
{{ $vendorscript := slice $jquery $lazysizes $prettify $dynamic $main $lihtGallery $lihtGallery_init | resources.Concat "/js/vendor_gallery.js" | resources.Minify }} | ||
<script src="{{ printf "%s%s" $cdn_url $vendorscript.RelPermalink }}" async="" ></script> | ||
<link href="https://cdn.bootcss.com/lightgallery/1.6.12/css/lightgallery.min.css" rel="stylesheet"> | ||
{{ $vendorScript := slice $jquery $lazysizes $prettify $dynamic $main $lightGallery $lightGallery_init | resources.Concat "/js/vendor_gallery.js" | resources.Minify }} | ||
<script src="{{ printf "%s%s" $cdn_url $vendorScript.RelPermalink }}" async=""></script> | ||
{{ else }} | ||
{{ $vendorscript := slice $jquery $prettify $dynamic $main | resources.Concat "/js/vendor_no_gallery.js" | resources.Minify }} | ||
<script src="{{ printf "%s%s" $cdn_url $vendorscript.RelPermalink }}" async=""></script> | ||
{{ $vendorScript := slice $jquery $prettify $dynamic $main | resources.Concat "/js/vendor_no_gallery.js" | resources.Minify }} | ||
<script src="{{ printf "%s%s" $cdn_url $vendorScript.RelPermalink }}" async=""></script> | ||
{{ end }} | ||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-yFRtMMDnQtDRO8rLpMIKrtPCD5jdktao2TV19YiZYWMDkUR5GQZR/NOVTdquEx1j" crossorigin="anonymous"> | ||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-9Nhn55MVVN0/4OFx7EE5kpFBPsEMZxKTCnA+4fqDmg12eCTqGi6+BB2LjY8brQxJ" crossorigin="anonymous"></script> | ||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> | ||
{{ else }} | ||
{{ $main := slice $jquery $main | resources.Concat "/js/vendor_main.js" | resources.Minify}} | ||
<script src="{{ printf "%s%s" $cdn_url $main.RelPermalink }}" async=""></script> | ||
{{ end }} | ||
|
||
{{ if eq ( getenv "HUGO_ENV" ) "production" }} | ||
{{ $vendorScript := slice $jquery $main | resources.Concat "/js/vendor_main.js" | resources.Minify}} | ||
<script src="{{ printf "%s%s" $cdn_url $vendorScript.RelPermalink }}" async=""></script> | ||
{{ end }} | ||
|
||
{{ template "_internal/google_analytics_async.html" . }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.