diff --git a/archetypes/series.md b/archetypes/series.md new file mode 100644 index 0000000..b2133f3 --- /dev/null +++ b/archetypes/series.md @@ -0,0 +1,7 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +image: +style: + background: "#2a9d8f" + color: "#fff" +--- diff --git a/assets/icons/forward.svg b/assets/icons/forward.svg new file mode 100644 index 0000000..0b55dcd --- /dev/null +++ b/assets/icons/forward.svg @@ -0,0 +1,64 @@ + + diff --git a/assets/icons/series.svg b/assets/icons/series.svg new file mode 100644 index 0000000..3c87803 --- /dev/null +++ b/assets/icons/series.svg @@ -0,0 +1,7 @@ + + + diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss index 7059853..fac471d 100644 --- a/assets/scss/partials/layout/article.scss +++ b/assets/scss/partials/layout/article.scss @@ -93,7 +93,8 @@ background: var(--card-background); border-radius: var(--tag-border-radius); color: var(--card-text-color-tertiary); - margin-right: 30px; + margin-top: -10px; + margin-right: 30px; display: inline-flex; align-items: center; font-size: 1.4rem; @@ -114,6 +115,36 @@ height: 20px; } + span { + font-weight: 500; + white-space: nowrap; + } + } + .forward-home { + background: var(--card-background); + border-radius: var(--tag-border-radius); + color: var(--card-text-color-tertiary); + margin-right: 30px; + display: inline; + align-items: center; + font-size: 1.4rem; + text-transform: uppercase; + padding: 10px 10px 10px 15px; + + transition: box-shadow 0.3s ease; + + box-shadow: var(--shadow-l1); + + &:hover { + box-shadow: var(--shadow-l2); + } + + svg { + margin-right: 5px; + width: 20px; + height: 20px; + } + span { font-weight: 500; white-space: nowrap; diff --git a/assets/scss/partials/widgets.scss b/assets/scss/partials/widgets.scss index 33a02dd..1bc1914 100644 --- a/assets/scss/partials/widgets.scss +++ b/assets/scss/partials/widgets.scss @@ -64,3 +64,34 @@ } } } + +/* Series widget */ +.widget.series { + .widget-series--list { + border-radius: var(--card-border-radius); + box-shadow: var(--shadow-l1); + background-color: var(--card-background); + } + + .series-stream { + &:not(:last-of-type) { + border-bottom: 1.5px solid var(--card-separator-color); + } + + a { + font-size: 1.4rem; + padding: 18px 25px; + display: flex; + + span.stream { + flex: 1; + color: var(--card-text-color-main); + font-weight: bold; + } + + span.count { + color: var(--card-text-color-tertiary); + } + } + } +} diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index ee7a8a3..330d0e9 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -119,19 +119,20 @@ params: emitMetadata: 0 gitalk: - owner: - admin: - repo: - clientID: - clientSecret: - + owner: + admin: + repo: + clientID: + clientSecret: + cusdis: - host: - id: + host: + id: widgets: enabled: - search +# - series - archives - tag-cloud @@ -141,6 +142,9 @@ params: tagCloud: limit: 10 + series: + limit: 5 + opengraph: twitter: # Your Twitter username @@ -168,6 +172,12 @@ params: content: enabled: true +taxonomies: + tag: "tags" + category: "categories" + series: "series" + + ### Custom menu ### See https://docs.stack.jimmycai.com/configuration/custom-menu.html ### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter @@ -181,14 +191,14 @@ menu: ### For demonstration purpose, the home link will be open in a new tab newTab: true icon: home - + social: - identifier: github name: GitHub url: https://github.com/CaiJimmy/hugo-theme-stack params: icon: brand-github - + - identifier: twitter name: Twitter url: https://twitter.com @@ -206,6 +216,10 @@ related: - name: categories weight: 200 + - name: series + weight: 300 + + markup: goldmark: renderer: diff --git a/i18n/en.yaml b/i18n/en.yaml index 0197d89..d4b26d6 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -20,6 +20,12 @@ article: back: other: Back + forward: + other: Forward + + home: + other: Home + tableOfContents: other: Table of contents @@ -52,6 +58,13 @@ widget: title: other: Tags + series: + title: + other: Series + + more: + other: More + search: title: other: Search diff --git a/i18n/it.yaml b/i18n/it.yaml index 6c4114c..a8d7cdf 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -20,6 +20,12 @@ article: back: other: Indietro + forward: + other: Successivo + + home: + other: Casa + tableOfContents: other: Indice diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index 321aa6d..da1c6d9 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -1,5 +1,19 @@ {{ define "body-class" }}template-archives{{ end }} {{ define "main" }} + + {{- $taxonomy := $.Site.GetPage "taxonomyTerm" "series" -}} + {{- $terms := $taxonomy.Pages -}} + {{ if $terms }} +