Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4418951d0 | ||
|
|
0289feb221 | ||
|
|
765ff12a09 | ||
|
|
0c5e6af9d3 | ||
|
|
9df7271547 | ||
|
|
fc0e7c847c | ||
|
|
871e8c0bd5 | ||
|
|
4e646fe15e | ||
|
|
1c30df93d4 | ||
|
|
14dacb5448 | ||
|
|
ddebaee028 | ||
|
|
2a3123bfe5 | ||
|
|
b3a4f3b156 | ||
|
|
8d508fb796 | ||
|
|
1d95c4b8ff | ||
|
|
043a1c1972 | ||
|
|
809fa7860d | ||
|
|
c86d4124df | ||
|
|
d461267734 | ||
|
|
630d351094 | ||
|
|
58c2d7bec0 | ||
|
|
1172ea1fd3 | ||
|
|
9fcdedf042 | ||
|
|
fa0f8fa365 | ||
|
|
feff86a9b4 | ||
|
|
1749a9168f | ||
|
|
c2e8d7fc5b | ||
|
|
f92fb41fd7 | ||
|
|
bd8e03ba61 | ||
|
|
12578a5769 | ||
|
|
0e8083e7d0 | ||
|
|
5a7c9b6783 | ||
|
|
96897be941 |
@@ -0,0 +1 @@
|
||||
custom: ['https://www.buymeacoffee.com/jimmycai']
|
||||
@@ -35,7 +35,12 @@ The only JavaScript library being used is [node-vibrant](https://github.com/Vibr
|
||||
|
||||
This theme uses SCSS and TypeScript. For that reason, it's necessary to use **Hugo ≥ 0.74.0**.
|
||||
|
||||
**Note**: You'll need Hugo Extended version to edit SCSS files
|
||||
Use Hugo Extended version if you want to:
|
||||
|
||||
* Use the latest feature/fix from `master` branch
|
||||
* Edit SCSS files
|
||||
|
||||
**Compiled CSS are updated once per release.**
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -51,6 +56,14 @@ Please do not remove the "*Theme Stack designed by Jimmy*" text and link.
|
||||
|
||||
If you want to port this theme to another blogging platform, please let me know🙏.
|
||||
|
||||
## Sponsoring
|
||||
|
||||
If you like this theme, consider supporting its development:
|
||||
|
||||
<a href="https://www.buymeacoffee.com/jimmycai" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-green.png" alt="Buy Me A Coffee" height="60px" width="217px"></a>
|
||||
|
||||
Your support is greatly appreciated :)
|
||||
|
||||
## Thanks to
|
||||
|
||||
- [Vibrant-Colors/node-vibrant](https://github.com/Vibrant-Colors/node-vibrant)
|
||||
@@ -62,4 +75,4 @@ If you want to port this theme to another blogging platform, please let me know
|
||||
- [artchen/hexo-theme-element](https://github.com/artchen/hexo-theme-element)
|
||||
- [MunifTanjim/minimo](https://github.com/MunifTanjim/minimo)
|
||||
- [lepture/yue.css](https://github.com/lepture/yue.css)
|
||||
- Markdown gallery syntax from [Typlog](https://typlog.com/)
|
||||
- Markdown gallery syntax from [Typlog](https://typlog.com/)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
|
||||
@media (min-width: $on-desktop) {
|
||||
max-width: 1200px;
|
||||
max-width: 1050px;
|
||||
|
||||
.left-sidebar {
|
||||
width: 20%;
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
border-radius: var(--card-border-radius);
|
||||
overflow: hidden;
|
||||
|
||||
transition: box-shadow .3s ease;
|
||||
|
||||
transition: box-shadow 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
box-shadow: var(--shadow-l2);
|
||||
}
|
||||
@@ -75,10 +75,14 @@
|
||||
}
|
||||
|
||||
.article-title {
|
||||
font-size: 2.4rem;
|
||||
font-weight: 600;
|
||||
margin: 10px 0;
|
||||
color: var(--card-text-color-main);
|
||||
font-size: 2.2rem;
|
||||
|
||||
@media (min-width: $on-desktop-large) {
|
||||
font-size: 2.4rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--card-text-color-main);
|
||||
@@ -88,14 +92,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: $on-desktop-large) {
|
||||
font-size: 2.4rem;
|
||||
}
|
||||
|
||||
@media (max-width: $on-desktop) {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
& + .article-subtitle {
|
||||
margin-top: 0;
|
||||
}
|
||||
@@ -103,18 +99,14 @@
|
||||
|
||||
.article-subtitle {
|
||||
font-weight: normal;
|
||||
font-size: 1.8rem;
|
||||
color: var(--card-text-color-secondary);
|
||||
margin: 5px 0;
|
||||
line-height: 1.5;
|
||||
|
||||
font-size: 1.75rem;
|
||||
@media (min-width: $on-desktop-large) {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
@media (max-width: $on-desktop) {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
}
|
||||
|
||||
.article-time {
|
||||
@@ -125,9 +117,10 @@
|
||||
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
margin-right: 8px;
|
||||
margin-right: 15px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
stroke-width: 1.33;
|
||||
}
|
||||
|
||||
time {
|
||||
@@ -159,24 +152,32 @@
|
||||
border-radius: var(--card-border-radius);
|
||||
box-shadow: var(--shadow-l1);
|
||||
background-color: var(--card-background);
|
||||
--image-size: 60px;
|
||||
|
||||
@media (max-width: $on-tablet) {
|
||||
--image-size: 50px;
|
||||
}
|
||||
|
||||
& + .pagination {
|
||||
margin-top: var(--section-separation);
|
||||
}
|
||||
|
||||
article {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: var(--small-card-padding);
|
||||
& > a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: var(--small-card-padding);
|
||||
}
|
||||
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 2px solid var(--card-separator-color);
|
||||
border-bottom: 1.5px solid var(--card-separator-color);
|
||||
}
|
||||
|
||||
.article-details {
|
||||
flex-grow: 1;
|
||||
padding: 0;
|
||||
padding-right: 15px;
|
||||
min-height: var(--image-size);
|
||||
}
|
||||
|
||||
.article-title {
|
||||
@@ -190,10 +191,14 @@
|
||||
|
||||
.article-image {
|
||||
img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
width: var(--image-size);
|
||||
height: var(--image-size);
|
||||
}
|
||||
}
|
||||
|
||||
.article-time {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
article {
|
||||
.main-article {
|
||||
background: var(--card-background);
|
||||
border-radius: var(--card-border-radius);
|
||||
box-shadow: var(--shadow-l1);
|
||||
@@ -80,8 +80,8 @@
|
||||
}
|
||||
|
||||
.article-footer {
|
||||
padding: var(--card-padding);
|
||||
padding-top: 0;
|
||||
margin: var(--card-padding);
|
||||
margin-top: 0;
|
||||
|
||||
section:not(:first-child) {
|
||||
margin-top: var(--card-padding);
|
||||
@@ -104,6 +104,7 @@
|
||||
|
||||
.article-tags {
|
||||
flex-wrap: wrap;
|
||||
text-transform: unset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,8 @@
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 25px;
|
||||
margin-top: var(--sidebar-element-separation);
|
||||
margin-bottom: 0;
|
||||
overflow-y: auto;
|
||||
|
||||
@media (min-width: $on-desktop-large) {
|
||||
@@ -179,6 +180,11 @@
|
||||
height: 25px;
|
||||
stroke-width: 1.33;
|
||||
margin-right: 40px;
|
||||
|
||||
@media (max-width: $on-desktop-large) {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -188,7 +194,7 @@
|
||||
color: var(--body-text-color);
|
||||
font-size: 1.5rem;
|
||||
|
||||
@media (max-width: $on-desktop) {
|
||||
@media (max-width: $on-desktop-large) {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
|
||||
--sidebar-avatar-size: 150px;
|
||||
--sidebar-element-separation: 25px;
|
||||
|
||||
@media (max-width: $on-desktop-large) {
|
||||
--sidebar-avatar-size: 120px;
|
||||
--sidebar-element-separation: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: $on-phone) {
|
||||
width: 100%;
|
||||
padding: 30px 0;
|
||||
@@ -42,13 +50,14 @@
|
||||
|
||||
@media (min-width: $on-tablet) {
|
||||
margin-left: 1%;
|
||||
padding-top: 50px;
|
||||
padding-top: var(--main-top-padding);
|
||||
}
|
||||
}
|
||||
|
||||
.site-info {
|
||||
z-index: 1;
|
||||
transition: box-shadow 0.5s ease;
|
||||
|
||||
@media (max-width: $on-phone) {
|
||||
padding: 15px 30px;
|
||||
}
|
||||
@@ -56,14 +65,10 @@
|
||||
.site-avatar {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
margin-bottom: 25px;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
width: var(--sidebar-avatar-size);
|
||||
height: var(--sidebar-avatar-size);
|
||||
|
||||
@media (max-width: $on-desktop-large) {
|
||||
height: 120px;
|
||||
width: 120px;
|
||||
}
|
||||
margin-bottom: var(--sidebar-element-separation);
|
||||
|
||||
.site-logo {
|
||||
width: 100%;
|
||||
@@ -117,16 +122,15 @@
|
||||
|
||||
.sidebar {
|
||||
.widget {
|
||||
&:not(:last-of-type) {
|
||||
margin-bottom: var(--section-separation);
|
||||
&:after {
|
||||
content: "";
|
||||
width: 100px;
|
||||
height: 2px;
|
||||
background-color: var(--body-text-color);
|
||||
display: block;
|
||||
margin-top: var(--section-separation);
|
||||
}
|
||||
margin-bottom: var(--section-separation);
|
||||
|
||||
&:not(:last-of-type):after {
|
||||
content: "";
|
||||
width: 100px;
|
||||
height: 2px;
|
||||
background-color: var(--body-text-color);
|
||||
display: block;
|
||||
margin-top: var(--section-separation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
}
|
||||
|
||||
@media (max-width: $on-desktop-large) {
|
||||
padding: 12px 20px;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,14 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
*/
|
||||
:root {
|
||||
@media (min-width: $on-phone + 1) {
|
||||
--main-top-padding: 35px;
|
||||
}
|
||||
|
||||
@media (min-width: $on-desktop-large) {
|
||||
--main-top-padding: 50px;
|
||||
}
|
||||
|
||||
|
||||
--body-background: #f5f5fa;
|
||||
|
||||
--accent-color: #34495e;
|
||||
@@ -63,6 +68,9 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
}
|
||||
|
||||
--small-card-padding: 25px;
|
||||
@media (max-width: $on-tablet) {
|
||||
--small-card-padding: 25px 20px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
--card-background: #424242;
|
||||
@@ -129,4 +137,4 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
--shadow-l3: 0px 10px 20px rgba(0, 0, 0, 0.04), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04);
|
||||
--shadow-l4: 0px 24px 32px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),
|
||||
0px 0px 1px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,10 +236,10 @@ function wrap(gallery: HTMLElement[]) {
|
||||
*/
|
||||
function loadPhotoSwipe() {
|
||||
const tasks = [
|
||||
loadScript("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe.min.js"),
|
||||
loadScript("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe-ui-default.min.js"),
|
||||
loadStyle("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe.min.css"),
|
||||
loadStyle("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/default-skin/default-skin.min.css")
|
||||
loadScript("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"),
|
||||
loadScript("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"),
|
||||
loadStyle("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css"),
|
||||
loadStyle("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css")
|
||||
];
|
||||
|
||||
return Promise.all(tasks);
|
||||
|
||||
+15
-12
@@ -14,22 +14,31 @@ DefaultContentLanguage = "en" # Theme i18n support
|
||||
mainSections = ["post"]
|
||||
featuredImageField = "image"
|
||||
rssFullContent = true
|
||||
|
||||
[params.dateFormat]
|
||||
published = "Jan 02, 2006"
|
||||
lastUpdated = "Jan 02, 2006 15:04 MST"
|
||||
|
||||
[params.sidebar]
|
||||
emoji = "🍥"
|
||||
avatar = "img/avatar.png"
|
||||
subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
||||
|
||||
[params.article]
|
||||
math = false
|
||||
[params.article.license]
|
||||
enabled = true
|
||||
default = "Licenced under CC BY-NC-SA 4.0"
|
||||
default = "Licensed under CC BY-NC-SA 4.0"
|
||||
|
||||
[params.comments]
|
||||
enabled = true
|
||||
# Only Disqus is available so far
|
||||
provider = "disqus"
|
||||
provider = "disqus" # Available: disqus, utterances
|
||||
[params.comments.utterances]
|
||||
repo = ""
|
||||
issueTerm = "pathname"
|
||||
label = "" # Optional
|
||||
theme = "preferred-color-scheme"
|
||||
|
||||
[params.widgets]
|
||||
enabled = ['archives', 'tag-cloud']
|
||||
[params.widgets.archives]
|
||||
@@ -38,19 +47,13 @@ DefaultContentLanguage = "en" # Theme i18n support
|
||||
path = "archives"
|
||||
[params.widgets.tagCloud]
|
||||
limit = 10
|
||||
|
||||
[params.opengraph]
|
||||
[params.opengraph.twitter]
|
||||
site = ""
|
||||
card = "summary_large_image"
|
||||
|
||||
[params.defaultImage]
|
||||
[params.defaultImage.article]
|
||||
enabled = false
|
||||
local = false
|
||||
src = ""
|
||||
[params.defaultImage.articleList]
|
||||
enabled = false
|
||||
local = true
|
||||
src = ""
|
||||
[params.defaultImage.opengraph]
|
||||
enabled = false
|
||||
local = false
|
||||
@@ -91,4 +94,4 @@ DefaultContentLanguage = "en" # Theme i18n support
|
||||
|
||||
[markup]
|
||||
[markup.highlight]
|
||||
noClasses = false
|
||||
noClasses = false
|
||||
|
||||
@@ -5,6 +5,7 @@ date = "2019-02-28"
|
||||
aliases = ["about-us", "about-hugo", "contact"]
|
||||
author = "Hugo Authors"
|
||||
license = "CC BY-NC-ND"
|
||||
lastmod = "2020-10-09"
|
||||
+++
|
||||
|
||||
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
---
|
||||
title: 中文文章内容测试
|
||||
title: Chinese Test
|
||||
description: 这是一个副标题
|
||||
date: 2020-09-09
|
||||
slug: test-chinese
|
||||
image: helena-hertz-wWZzXlDpMog-unsplash.jpg
|
||||
categories:
|
||||
- Test
|
||||
- 测试
|
||||
---
|
||||
|
||||
## 正文测试
|
||||
|
||||
@@ -4,11 +4,13 @@ title = "Placeholder Text"
|
||||
date = "2019-03-09"
|
||||
description = "Lorem Ipsum Dolor Si Amet"
|
||||
categories = [
|
||||
"Test"
|
||||
"Test",
|
||||
"Test with whitespaces"
|
||||
]
|
||||
tags = [
|
||||
"markdown",
|
||||
"text",
|
||||
"tag with whitespaces"
|
||||
]
|
||||
image = "matt-le-SJSpo9hQf7s-unsplash.jpg"
|
||||
+++
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
other = "Related contents"
|
||||
|
||||
[lastUpdatedOn]
|
||||
other ="Last updated on {{ .Count }}"
|
||||
other ="Last updated on"
|
||||
|
||||
[widgetArchivesTitle]
|
||||
other = "Archives"
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
other = "相关文章"
|
||||
|
||||
[lastUpdatedOn]
|
||||
other ="最后更新于 {{ .Count }}"
|
||||
other ="最后更新于"
|
||||
|
||||
[widgetArchivesTitle]
|
||||
other = "归档"
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
<article>
|
||||
<div class="article-details">
|
||||
<h2 class="article-title">
|
||||
<a href="{{ .Permalink }}">
|
||||
<a href="{{ .Permalink }}">
|
||||
<div class="article-details">
|
||||
<h2 class="article-title">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
</h2>
|
||||
<footer class="article-time">
|
||||
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
</time>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink "articleList" -}}
|
||||
{{ if $image.exists }}
|
||||
<div class="article-image">
|
||||
{{ if $image.resource }}
|
||||
{{- $thumbnail := $image.resource.Fill "120x120" -}}
|
||||
<img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}"
|
||||
height="{{ $thumbnail.Height }}" loading="lazy">
|
||||
{{ else }}
|
||||
<img src="{{ $image.permalink }}" loading="lazy" alt="Featured image of post {{ .Title }}" />
|
||||
{{ end }}
|
||||
</h2>
|
||||
<footer class="article-time">
|
||||
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
</time>
|
||||
</footer>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink "articleList" -}}
|
||||
{{ if $image.exists }}
|
||||
<div class="article-image">
|
||||
{{ if $image.resource }}
|
||||
{{- $thumbnail := $image.resource.Fill "120x120" -}}
|
||||
<img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}"
|
||||
height="{{ $thumbnail.Height }}" loading="lazy">
|
||||
{{ else }}
|
||||
<img src="{{ $image.permalink }}" loading="lazy" alt="Featured image of post {{ .Title }}" />
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</a>
|
||||
</article>
|
||||
@@ -1,18 +1,21 @@
|
||||
{{ $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink "article" }}
|
||||
{{- $context := . -}}
|
||||
{{- $categories := .Params.categories -}}
|
||||
<div class="article-details">
|
||||
{{ if $categories }}
|
||||
{{ if .Params.categories }}
|
||||
<header class="article-category">
|
||||
{{ range $category := $categories }}
|
||||
{{ $term := $.Site.GetPage (printf "/categories/%s" $category) }}
|
||||
{{ range (.GetTerms "categories") }}
|
||||
{{ if and $image.exists $image.resource }}
|
||||
{{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}}
|
||||
{{- $20x := $imageRaw.Fill "20x20 smart" -}}
|
||||
<a href="{{ $term.Permalink }}" class="color-tag"
|
||||
data-image="{{ $20x.RelPermalink }}" data-key="{{ $context.Slug }}" data-hash="{{ $imageRaw.Data.Integrity }}">{{ $term.Title | humanize }}</a>
|
||||
<a href="{{ .Permalink }}"
|
||||
class="color-tag"
|
||||
data-image="{{ $20x.RelPermalink }}"
|
||||
data-key="{{ $context.Slug }}"
|
||||
data-hash="{{ $imageRaw.Data.Integrity }}">
|
||||
{{ .LinkTitle }}
|
||||
</a>
|
||||
{{ else }}
|
||||
<a href="{{ $term.Permalink }}">{{ $term.Title | humanize }}</a>
|
||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</header>
|
||||
@@ -32,7 +35,7 @@
|
||||
|
||||
{{- if not .Date.IsZero -}}
|
||||
<footer class="article-time">
|
||||
{{ (resources.Get "icons/clock.svg").Content | safeHTML }}
|
||||
{{ partial "helper/icon" "clock" }}
|
||||
<time class="article-time--published">
|
||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
</time>
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
|
||||
{{ if and (.Site.Params.article.license.enabled) (not (eq .Params.license false)) }}
|
||||
<section class="article-copyright">
|
||||
{{ (resources.Get "icons/copyright.svg").Content | safeHTML }}
|
||||
{{ partial "helper/icon" "copyright" }}
|
||||
<span>{{ default .Site.Params.article.license.default .Params.license }}</span>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{- if ne .Lastmod .Date -}}
|
||||
<section class="article-time">
|
||||
{{ (resources.Get "icons/clock.svg").Content | safeHTML }}
|
||||
{{ partial "helper/icon" "clock" }}
|
||||
<span class="article-time--modified">
|
||||
{{ T "lastUpdatedOn" (.Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" )) }}
|
||||
{{ T "lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||
</span>
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
{{- $tags := .Params.Tags -}}
|
||||
{{ if $tags }}
|
||||
{{ if .Params.Tags }}
|
||||
<section class="article-tags">
|
||||
{{ range $tag := $tags }}
|
||||
{{ with $.Site.GetPage (printf "/tags/%s" $tag) }}
|
||||
<a href="{{ .Permalink }}">{{ .Title | humanize }}</a>
|
||||
{{ end }}
|
||||
{{ range (.GetTerms "tags") }}
|
||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
<script src="https://utteranc.es/client.js"
|
||||
repo="{{ .Site.Params.comments.utterances.repo }}"
|
||||
issue-term="{{ .Site.Params.comments.utterances.issueTerm }}"
|
||||
theme="{{ .Site.Params.comments.utterances.theme }}"
|
||||
{{ with .Site.Params.comments.utterances.label }}
|
||||
label="{{ . }}"
|
||||
{{ end }}
|
||||
crossorigin="anonymous"
|
||||
async>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.utterances {
|
||||
max-width: unset;
|
||||
}
|
||||
</style>
|
||||
@@ -2,7 +2,7 @@
|
||||
<section class="copyright">© {{ now.Format "2006" }} {{ .Site.Title }}</section>
|
||||
<section class="powerby">
|
||||
Built with <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> <br />
|
||||
Theme <b><a href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener" data-version="1.0.4">Stack</a></b> designed by
|
||||
Theme <b><a href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener" data-version="1.0.5">Stack</a></b> designed by
|
||||
<a href="https://jimmycai.com" target="_blank" rel="noopener">Jimmy</a>
|
||||
</section>
|
||||
</footer>
|
||||
@@ -0,0 +1,6 @@
|
||||
{{- $iconFile := resources.GetMatch (printf "icons/%s.svg" .) -}}
|
||||
{{- if $iconFile -}}
|
||||
{{- $iconFile.Content | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- errorf "Error: icon '%s.svg' is not found under 'assets/icons' folder" . -}}
|
||||
{{- end -}}
|
||||
@@ -33,7 +33,7 @@
|
||||
<li {{ if $active }} class='current' {{ end }}>
|
||||
<a href='{{ .URL | absLangURL }}'>
|
||||
{{ if .Pre }}
|
||||
{{ (resources.Get (delimit (slice "icons/" .Pre ".svg") "")).Content | safeHTML }}
|
||||
{{ partial "helper/icon" .Pre }}
|
||||
{{ end }}
|
||||
<span>{{- .Name -}}</span>
|
||||
</a>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<section class="widget archives">
|
||||
<div class="widget-icon">
|
||||
{{ (resources.Get "icons/infinity.svg").Content | safeHTML }}
|
||||
{{ partial "helper/icon" "infinity" }}
|
||||
</div>
|
||||
<h1 class="widget-title">{{ T "widgetArchivesTitle" }}</h1>
|
||||
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
{{ $tags := .Site.Taxonomies.tags.ByCount }}
|
||||
|
||||
<section class="widget tagCloud">
|
||||
<div class="widget-icon">
|
||||
{{ (resources.Get "icons/tag.svg").Content | safeHTML }}
|
||||
{{ partial "helper/icon" "tag" }}
|
||||
</div>
|
||||
<h1 class="widget-title">{{ T "widgetTagCloudTitle" }}</h1>
|
||||
|
||||
<div class="tagCloud-tags">
|
||||
{{ range first .Site.Params.widgets.tagCloud.limit $tags }}
|
||||
{{ $term := $.Site.GetPage (printf "/tags/%s" .Term) }}
|
||||
<a href="{{ $term.Permalink }}" class="font_size_{{ .Count }}">
|
||||
{{ $term.Title | humanize }}
|
||||
{{ range first .Site.Params.widgets.tagCloud.limit .Site.Taxonomies.tags.ByCount }}
|
||||
<a href="{{ .Page.Permalink }}" class="font_size_{{ .Count }}">
|
||||
{{ .Page.Title }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -34,9 +34,9 @@
|
||||
<description>
|
||||
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}
|
||||
{{- if $image.exists -}}
|
||||
{{ "<" | html }}img src="{{ $image.permalink | absURL }}" width="{{ $image.resource.Width }}" height="{{ $image.resource.Height }}" alt="Featured image of post {{ .Title }}" {{ "/>" | html}}
|
||||
{{ "<" | html }}img src="{{ $image.permalink | absURL }}" alt="Featured image of post {{ .Title }}" {{ "/>" | html}}
|
||||
{{- end -}}{{ $content }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
||||
</rss>
|
||||
|
||||
File diff suppressed because one or more lines are too long
+2
-2
@@ -5,7 +5,7 @@ name = "Stack"
|
||||
license = "GPL-3.0-only"
|
||||
licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE"
|
||||
description = "Card-style Hugo theme designed for bloggers"
|
||||
homepage = "https://blog.jimmycai.com/p/hugo-theme-stack"
|
||||
homepage = "https://theme-stack.jimmycai.com"
|
||||
tags = [
|
||||
"blog",
|
||||
"responsive",
|
||||
@@ -24,4 +24,4 @@ min_version = "0.74.0"
|
||||
|
||||
[author]
|
||||
name = "Jimmy Cai"
|
||||
homepage = "https://jimmycai.com"
|
||||
homepage = "https://jimmycai.com"
|
||||
|
||||
Reference in New Issue
Block a user