Merge remote-tracking branch 'upstream/master' into hmsy

This commit is contained in:
2022-02-14 08:23:14 +08:00
34 changed files with 649 additions and 60 deletions

View File

@@ -7,7 +7,7 @@
{{ if or (not (eq .Description "")) (not (eq .Title "")) -}}
<header class="home-header">
<div class="home-blob-text-container">
{{ with .Title }}<h1 class="home-blob-title">{{ . }}</h1>{{ end }}
{{ with .Title }}<h1 class="home-blob-title">{{ . | markdownify }}</h1>{{ end }}
{{ with .Description }}<p class="home-blob-text">{{ . }}</p>{{ end }}
</div>
{{ with resources.GetMatch .Site.Params.headshotimg -}}
@@ -17,7 +17,7 @@
{{ $faceshot_x2 := .Resize "544x Lanczos" }}
{{ $faceshot_x3 := .Resize "816x Lanczos" }}
<source srcset="{{ $faceshot.Permalink }} 1x, {{ $faceshot_x2.Permalink }} 2x, {{ $faceshot_x3.Permalink }} 3x">
<img class="home-faceshot" src="{{ $faceshot.Permalink }}" {{ with .Params.description -}} alt="{{ . }}" {{- end }}>
<img class="home-faceshot" src="{{ $faceshot.Permalink }}" {{ with $.Site.Params.headshotalt -}} alt="{{ . }}" {{- end }}>
</picture>
</div>
{{ end -}}

View File

@@ -1,5 +1,4 @@
<a ontouchstart="cardPressed.call(this)" ontouchend="cardReleased.call(this)" ontouchmove="cardReleased.call(this)"
href="{{ .Permalink }}" class="card blog-card bc-next" rel="bookmark" >
<a href="{{ .Permalink }}" class="card blog-card bc-next" rel="bookmark" >
{{ with .Resources.GetMatch "featuredImage" }}
<div class="card-img-container">
<p class="card-img-overlay">下一篇文章</p>
@@ -13,10 +12,10 @@
</div>
{{ end }}
<article class="card-body">
<h2 class="card-title">{{ .Title }}</h2>
<h2 class="card-title">{{ .Title | markdownify }}</h2>
<p class="card-text">{{ if (isset .Params "description") }}{{ index .Params "description" | htmlUnescape }}{{ else }}{{ .Summary | plainify | htmlUnescape }}{{ end }}</p>
<div class="card-subtext muted-text">
<p>发布于<time datetime="{{ .PublishDate.Format "2006-01-02 12:00" }}">{{ .PublishDate.Format "2006年1月2日" }}</time></p>
<p>发布于<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006年1月2日" }}</time></p>
{{ if (isset .Params "categories") }}<p>{{ range .Params.categories }}#{{ . }} {{ end }}</p>{{ end }}
</div>
</article>

View File

@@ -1,5 +1,4 @@
<a ontouchstart="cardPressed.call(this)" ontouchend="cardReleased.call(this)" ontouchmove="cardReleased.call(this)"
href="{{ .Permalink }}" class="card blog-card" rel="bookmark" >
<a href="{{ .Permalink }}" class="card blog-card" rel="bookmark" >
{{ with .Resources.GetMatch "featuredImage" }}
<div class="card-img-container">
<picture>
@@ -12,7 +11,7 @@
</div>
{{- end }}
<article class="card-body">
<h2 class="card-title">{{ .Title }}</h2>
<h2 class="card-title">{{ .Title | markdownify }}</h2>
<p class="card-text">{{ if (isset .Params "description") }}{{ index .Params "description" | htmlUnescape }}{{ else }}{{ .Summary | plainify | htmlUnescape }}{{ end }}</p>
<div class="card-subtext muted-text">
<p>发布于<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006年1月2日" }}</time></p>

View File

@@ -6,7 +6,7 @@
<main class="card-container side-gutter">
{{ if or (not (eq .Description "")) (not (eq .Title "")) -}}
<header class="list-header">
{{ with .Title }}<h1 class="list-header-title">{{ . }}</h1>{{ end }}
{{ with .Title | markdownify }}<h1 class="list-header-title">{{ . }}</h1>{{ end }}
{{ with .Description }}<p class="list-header-subtext">{{ . }}</p>{{ end }}
</header>
{{- end }}

View File

@@ -4,20 +4,102 @@
<img class="footer-home-icon" src="{{ .Permalink }}" alt="Home">
{{ end }}
</a>
<div style="display: flex; flex-direction: row; justify-content: space-evenly; width: 100%;">
{{ if isset $.Site.Params "facebook"}}
<a href="{{ $.Site.Params.facebook }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/facebook.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Facebook" target="_blank" rel=" noreferrer"/>
{{ end }}
</a>
{{ end }}
{{ if isset $.Site.Params "flicker"}}
<a href="{{ $.Site.Params.flicker }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/flicker.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Flicker"/>
{{ end }}
</a>
{{ end }}
{{ if isset $.Site.Params "github"}}
<a href="{{ $.Site.Params.github }}" class="footer-link">
{{ with resources.Get "icons/github.png" }}
<a href="{{ $.Site.Params.github }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/github.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="GitHub"/>
{{ end }}
</a>
{{ end }}
{{ if isset $.Site.Params "instagram"}}
<a href="{{ $.Site.Params.instagram }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/instagram.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Instagram"/>
{{ end }}
</a>
{{ end }}
{{ if isset $.Site.Params "linkedin"}}
<a href="{{ $.Site.Params.linkedin }}" class="footer-link">
{{ with resources.Get "icons/linkedin.png" }}
<a href="{{ $.Site.Params.linkedin }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/linkedin.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="LinkedIn"/>
{{ end }}
</a>
{{ end }}
</div>
{{ if isset $.Site.Params "patreon"}}
<a href="{{ $.Site.Params.patreon }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/patreon.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Patreon"/>
{{ end }}
</a>
{{ end }}
{{ if eq .Site.Params.rssinmenu true -}}
<a href="{{ "/index.xml" | absURL }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/rss.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="RSS"/>
{{ end }}
</a>
{{ end }}
{{ if isset $.Site.Params "soundcloud"}}
<a href="{{ $.Site.Params.soundcloud }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/soundcloud.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Soundcloud"/>
{{ end }}
</a>
{{ end }}
{{ if isset $.Site.Params "spotify"}}
<a href="{{ $.Site.Params.spotify }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/spotify.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Spotify"/>
{{ end }}
</a>
{{ end }}
{{ if isset $.Site.Params "tumblr"}}
<a href="{{ $.Site.Params.tumblr }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/tumblr.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Tumblr"/>
{{ end }}
</a>
{{ end }}
{{ if isset $.Site.Params "twitch"}}
<a href="{{ $.Site.Params.twitch }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/twitch.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Twitch"/>
{{ end }}
</a>
{{ end }}
{{ if isset $.Site.Params "twitter"}}
<a href="{{ $.Site.Params.twitter }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/twitter.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Twitter"/>
{{ end }}
</a>
{{ end }}
{{ if isset $.Site.Params "vimeo"}}
<a href="{{ $.Site.Params.vimeo }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/vimeo.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Vimeo"/>
{{ end }}
</a>
{{ end }}
{{ if isset $.Site.Params "youtube"}}
<a href="{{ $.Site.Params.youtube }}" class="footer-link" target="_blank" rel="noopener noreferrer">
{{ with resources.Get "icons/youtube.svg" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Youtube"/>
{{ end }}
</a>
{{ end }}
</footer>

View File

@@ -1,4 +1,4 @@
<a ontouchstart="cardPressed.call(this)" ontouchend="cardReleased.call(this)" ontouchmove="cardReleased.call(this)"
<a
href="{{ .Site.BaseURL }}" class="card home-card" style="background-image: url({{if isset .Site.Params "homeimg"}} {{ (resources.Get .Site.Params.homeimg).Permalink | safeCSS }} {{ else }} {{ (resources.Get "img/grey-cloud.jpg").Permalink | safeCSS }} {{ end }})" rel="bookmark" >
Home
</a>