Merge pull request #330 from nunocoracao/dev

🔖 Release v2.19.0
This commit is contained in:
Nuno Coração 2022-12-21 21:15:05 +00:00 committed by GitHub
commit 23474cbdb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
76 changed files with 426 additions and 1014 deletions

View file

@ -1446,6 +1446,10 @@ select {
display: flex;
}
.grid {
display: grid;
}
.hidden {
display: none;
}
@ -1526,10 +1530,6 @@ select {
width: 100%;
}
.w-36 {
width: 9rem;
}
.w-24 {
width: 6rem;
}
@ -1542,6 +1542,10 @@ select {
width: 1.5rem;
}
.w-36 {
width: 9rem;
}
.min-w-0 {
min-width: 0px;
}
@ -1653,6 +1657,10 @@ select {
justify-content: space-between;
}
.gap-4 {
gap: 1rem;
}
.space-y-10 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));
@ -1749,11 +1757,6 @@ select {
border-color: rgba(var(--color-neutral-300), var(--tw-border-opacity));
}
.border-neutral-400 {
--tw-border-opacity: 1;
border-color: rgba(var(--color-neutral-400), var(--tw-border-opacity));
}
.border-neutral-200 {
--tw-border-opacity: 1;
border-color: rgba(var(--color-neutral-200), var(--tw-border-opacity));
@ -3440,6 +3443,10 @@ body:has(#menu-controller:checked) {
max-width: 65ch;
}
.sm\:grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sm\:flex-row {
flex-direction: row;
}
@ -3543,6 +3550,10 @@ body:has(#menu-controller:checked) {
width: auto;
}
.md\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.md\:justify-start {
justify-content: flex-start;
}
@ -3706,10 +3717,18 @@ body:has(#menu-controller:checked) {
.xl\:w-1\/4 {
width: 25%;
}
.xl\:grid-cols-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
@media (min-width: 1536px) {
.\32xl\:w-1\/5 {
width: 20%;
}
.\32xl\:grid-cols-5 {
grid-template-columns: repeat(5, minmax(0, 1fr));
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -15,7 +15,9 @@ enableCodeCopy = true
# mainSections = ["section1", "section2"]
# robots = ""
#defaultBackgroundImage = "IMAGE.jpg" # used as default for background images
# disableImageOptimization = false
# defaultBackgroundImage = "IMAGE.jpg" # used as default for background images
[header]
layout = "basic" # valid options: basic, fixed

View file

@ -15,6 +15,8 @@ enableCodeCopy = true
mainSections = ["docs"]
# robots = ""
disableImageOptimization = false
defaultBackgroundImage = "/img/iceland.jpg"
[header]

View file

@ -137,6 +137,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. |
| `robots` | _Not set_ | String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values. |
| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. |
| `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. |
| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style |
| `header.layout` | `"basic"` | Defines the header for the entire site, supported values are `basic` and `fixed`. |
| `footer.showMenu` | `true` | Show/hide the footer menu, which can be configured in the `[[footer]]` section of the `config/_default/menus.en.toml` file. |

View file

@ -14,6 +14,7 @@ The examples below are a small selection taken from the [official Mermaid docs](
## Flowchart
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
graph TD
A[Christmas] -->|Get money| B(Go shopping)
@ -30,9 +31,11 @@ F
G
end
{{< /mermaid >}}
</div>
## Sequence diagram
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
sequenceDiagram
autonumber
@ -50,9 +53,11 @@ loop Every minute
John-->Alice: Great!
end
{{< /mermaid >}}
</div>
## Class diagram
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
classDiagram
Animal "1" <|-- Duck
@ -76,9 +81,11 @@ class Zebra{
+run()
}
{{< /mermaid >}}
</div>
## Entity relationship diagram
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
@ -90,3 +97,5 @@ ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
{{< /mermaid >}}
</div>

View file

@ -8,7 +8,8 @@
<div class="flex mb-6 px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
<span class="flex items-center justify-between grow dark:text-neutral-300">
<span class="prose dark:prose-invert">This is a demo of theme's list configurations: <code id="config">card view with constrained width</code></span>
<span class="prose dark:prose-invert">This is a demo of theme's list configurations: <code
id="config">card view with constrained width</code></span>
<button id="switch-config-button"
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700">
Switch config &orarr;
@ -17,28 +18,22 @@
</div>
<div id="CardViewScreenWidth" class="">
<section class="relative w-screen max-w-[1600px]" style="left: calc(max(-50vw,-800px) + 50%);">
<div class="flex flex-wrap pl-8 pr-8">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages }}
<div class="flex flex-wrap w-full p-4 sm:w-1/2 md:w-1/3 xl:w-1/4 2xl:w-1/5">
{{ partial "article-link-card.html" . }}
</div>
{{ end }}
</div>
<section
class="relative w-screen max-w-[1600px] grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
style="left: calc(max(-50vw,-800px) + 50%);">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages }}
{{ partial "article-link-card.html" . }}
{{ end }}
</section>
</div>
<div id="CardViewProse" class="hidden h-full">
<section class="w-full">
<div class="flex flex-wrap">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages }}
<div class="flex flex-wrap w-full p-4 sm:w-1/2 md:w-1/3">
{{ partial "article-link-card.html" . }}
</div>
{{ end }}
</div>
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages }}
{{ partial "article-link-card.html" . }}
{{ end }}
</section>
</div>

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} বার পছন্দ করা হয়েছে"
other: "{{ .Count }} বার পছন্দ করা হয়েছে"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "লেখক"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} Wort"
other: "{{ .Count }} Wörter"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} like"
other: "{{ .Count }} likes"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Author"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} palabra"
other: "{{ .Count }} palabras"
part_of_series: "Este artículo es parte de una serie."
part: "Parte"
this_article: "Este artículo"
author:
byline_title: "Autor"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} sana"
other: "{{ .Count }} sanaa"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Kirjoittaja"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} mot"
other: "{{ .Count }} mots"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Auteur"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} מילה"
other: "{{ .Count }} מילים"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "מחבר"

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} sviđa se"
other: "{{ .Count }} sviđa se"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} szó"
other: "{{ .Count }} szó"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Szerző"

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} disukai"
other: "{{ .Count }} disukai"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Penulis"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} parola"
other: "{{ .Count }} parole"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autore"

View file

@ -12,7 +12,10 @@ article:
word_count:
one: "{{ .Count }} 文字"
other: "{{ .Count }} 文字"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "著者"

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} polubienie"
other: "{{ .Count }} polubień"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -15,6 +15,9 @@ article:
views:
one: "{{ .Count }} visualização"
other: "{{ .Count }} visualizaçōes"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -15,6 +15,9 @@ article:
views:
one: "{{ .Count }} visualização"
other: "{{ .Count }} visualizaçōes"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -12,6 +12,9 @@ article:
word_count:
one: "{{ .Count }} cuvânt"
other: "{{ .Count }} cuvinte"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Autor"

View file

@ -18,6 +18,9 @@ article:
likes:
one: "{{ .Count }} нравится"
other: "{{ .Count }} нравится"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Автор"

View file

@ -11,6 +11,9 @@ article:
word_count:
one: "{{ .Count }} kelime"
other: "{{ .Count }} kelime"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "Yazar"

View file

@ -11,6 +11,9 @@ article:
word_count:
one: "{{ .Count }} 字"
other: "{{ .Count }} 字"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "作者"

View file

@ -11,6 +11,9 @@ article:
word_count:
one: "{{ .Count }} 字"
other: "{{ .Count }} 字"
part_of_series: "This article is part of a series."
part: "Part"
this_article: "This Article"
author:
byline_title: "作者"

View file

@ -23,7 +23,7 @@
</div>
</header>
{{ if .Content }}
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
<section class="flex flex-col max-w-full mt-0 mb-5 prose dark:prose-invert lg:flex-row">
<div class="min-w-0 min-h-0 max-w-prose">
{{ .Content | emojify }}
</div>

View file

@ -13,7 +13,7 @@
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured -}}
{{ with .Resize "600x" }}
{{ with .Fill "600x600" }}
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
{{ end }}
{{- else -}}

View file

@ -32,7 +32,7 @@
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured -}}
{{ with .Resize "600x" }}
{{ with .Fill "600x400" }}
<div class="{{ $articleImageClasses }}" style="background-image:url({{ .RelPermalink }});"></div>
{{ end }}
{{- else -}}

View file

@ -8,46 +8,36 @@
{{ if .Site.Params.homepage.cardView | default false }}
{{ if .Site.Params.homepage.cardViewScreenWidth | default false }}
<section class="relative w-screen max-w-[1600px]" style="left: calc(max(-50vw,-800px) + 50%);">
<div class="flex flex-wrap pl-8 pr-8">
{{ else }}
<section class="w-full">
<div class="flex flex-wrap">
{{ end }}
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages }}
{{ if .Site.Params.homepage.cardViewScreenWidth | default false }}
<div class="flex flex-wrap w-full p-4 sm:w-1/2 md:w-1/3 xl:w-1/4 2xl:w-1/5">
{{ else }}
<div class="flex flex-wrap w-full p-4 sm:w-1/2 md:w-1/3">
{{ end }}
{{ partial "article-link-card.html" . }}
</div>
{{ end }}
</div>
</section>
{{ else }}
<section class="space-y-10 w-full">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)).Pages
}}
{{ partial "article-link.html" . }}
{{ end }}
</section>
<section class="relative w-screen max-w-[1600px] grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
style="left: calc(max(-50vw,-800px) + 50%);">
{{ else }}
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
{{ end }}
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages }}
{{ partial "article-link-card.html" . }}
{{ end }}
{{ if .Site.Params.homepage.showMoreLink | default false }}
{{ if index .Site.Params.homepage "showRecentItems" }}
{{ $showMoreLinkDest = .Site.Params.homepage.showMoreLinkDest }}
{{ end }}
<div class="mt-10 flex justify-center">
<a href="{{ $showMoreLinkDest }}">
<button
class="bg-transparent hover:text-primary-500 prose dark:prose-invert font-semibold hover:text-white py-2 px-4 border border-primary-500 hover:border-transparent rounded">
{{ i18n "recent.show_more" | markdownify | emojify }}
</button>
</a>
</div>
{{ end }}
{{ end }}
</section>
{{ else }}
<section class="space-y-10 w-full">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)).Pages
}}
{{ partial "article-link.html" . }}
{{ end }}
</section>
{{ end }}
{{ if .Site.Params.homepage.showMoreLink | default false }}
{{ if index .Site.Params.homepage "showRecentItems" }}
{{ $showMoreLinkDest = .Site.Params.homepage.showMoreLinkDest }}
{{ end }}
<div class="mt-10 flex justify-center">
<a href="{{ $showMoreLinkDest }}">
<button
class="bg-transparent hover:text-primary-500 prose dark:prose-invert font-semibold hover:text-white py-2 px-4 border border-primary-500 hover:border-transparent rounded">
{{ i18n "recent.show_more" | markdownify | emojify }}
</button>
</a>
</div>
{{ end }}
{{ end }}

View file

@ -2,19 +2,19 @@
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5">
<summary
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
{{ index .Params.series 0 }} - This article is part of a series.
{{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }}
</summary>
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
Part {{ $post.Params.series_order }}: This Article
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ i18n "article.this_article" }}
</div>
{{ else }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="{{$post.Permalink}}">
Part {{ $post.Params.series_order }}: {{ $post.Params.title}}
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ $post.Params.title}}
</a>
</div>
{{end}}

View file

@ -1,20 +1,21 @@
{{ if .Params.series }}
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5" {{ if .Params.seriesOpened | default (.Site.Params.article.seriesOpened | default false) }} open {{ end }}>
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5" {{
if .Params.seriesOpened | default (.Site.Params.article.seriesOpened | default false) }} open {{ end }}>
<summary
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
{{ index .Params.series 0 }} - This article is part of a series.
{{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }}
</summary>
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
Part {{ $post.Params.series_order }}: This Article
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ i18n "article.this_article" }}
</div>
{{ else }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="{{$post.Permalink}}">
Part {{ $post.Params.series_order }}: {{ $post.Params.title}}
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ $post.Params.title}}
</a>
</div>
{{end}}

View file

@ -1,3 +1,4 @@
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
{{ if .Get "default" }}
{{ template "_internal/shortcodes/figure.html" . }}
{{ else }}
@ -21,6 +22,13 @@
{{ with $resource }}
<figure {{ with $class }}class="{{ . }}"{{ end }}>
{{ with $href }}<a href="{{ . }}">{{ end }}
{{ if $disableImageOptimization }}
<img
class="my-0 rounded-md"
src="{{ .RelPermalink }}"
alt="{{ $altText }}"
/>
{{ else }}
<img
class="my-0 rounded-md"
srcset="
@ -31,6 +39,7 @@
src="{{ (.Resize "660x").RelPermalink }}"
alt="{{ $altText }}"
/>
{{ end }}
{{ if $href }}</a>{{ end }}
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
</figure>

836
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "hugo-blowfish-theme",
"version": "2.18.0",
"version": "2.19.0",
"description": "Blowfish theme for Hugo",
"scripts": {
"fullinstall": "npm run preinstall && npm install && npm run postinstall",
@ -35,10 +35,10 @@
"homepage": "https://github.com/nunocoracao/blowfish#readme",
"devDependencies": {
"@tailwindcss/typography": "^0.5.8",
"chart.js": "^4.0.1",
"chart.js": "^4.1.1",
"fuse.js": "^6.6.2",
"katex": "^0.16.4",
"mermaid": "^9.2.2",
"mermaid": "^9.3.0",
"prettier": "^2.8.1",
"prettier-plugin-go-template": "^0.0.13",
"prettier-plugin-tailwindcss": "^0.2.1",
@ -78,7 +78,7 @@
}
],
"dependencies": {
"@headlessui/react": "^1.7.5",
"@headlessui/react": "^1.7.7",
"@heroicons/react": "^2.0.13",
"@tailwindcss/forms": "^0.5.3",
"commander": "^9.4.1"