Merge pull request #404 from nunocoracao/dev

🔖 Release v2.24.0
This commit is contained in:
Nuno Coração 2023-01-08 21:53:00 +00:00 committed by GitHub
commit 59745ee3a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 130 additions and 111 deletions

View file

@ -3,7 +3,8 @@
<a target="_blank" href="https://www.buymeacoffee.com/nunocoracao"><img class="nozoom" src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=nunocoracao&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff" /></a>
<a target="_blank" href="http://tee.pub/lic/qwSlWVBL5zc"><img class="nozoom" src="https://img.buymeacoffee.com/button-api/?text=Merch Store &emoji=💎&slug=nunocoracao&button_colour=5F7FFF&font_colour=ffffff&font_family=Lato&outline_colour=000000&coffee_colour=FFDD00" /></a>
[![Blowfish Docs Deploy](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml)
[![Deploy Production to Firebase](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml)
[![Deploy Production to GitHub pages](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml)
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=0.87.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.87.0)
[![GitHub](https://img.shields.io/github/license/nunocoracao/blowfish)](https://github.com/nunocoracao/blowfish/blob/main/LICENSE)
[![Blowfish](https://img.shields.io/badge/Hugo--Themes-@Blowfish-blue)](https://themes.gohugo.io/themes/blowfish/)

View file

@ -1321,10 +1321,6 @@ select {
margin-bottom: 3rem;
}
.mb-16 {
margin-bottom: 4rem;
}
.mt-5 {
margin-top: 1.25rem;
}
@ -1389,6 +1385,10 @@ select {
margin-bottom: 0.25rem;
}
.mb-16 {
margin-bottom: 4rem;
}
.-mb-1 {
margin-bottom: -0.25rem;
}
@ -1473,14 +1473,14 @@ select {
height: 100vh;
}
.h-12 {
height: 3rem;
}
.h-24 {
height: 6rem;
}
.h-12 {
height: 3rem;
}
.h-8 {
height: 2rem;
}
@ -1525,10 +1525,6 @@ select {
min-height: 148px;
}
.w-12 {
width: 3rem;
}
.w-full {
width: 100%;
}
@ -1541,6 +1537,10 @@ select {
width: 6rem;
}
.w-12 {
width: 3rem;
}
.w-8 {
width: 2rem;
}
@ -2052,11 +2052,6 @@ select {
line-height: 1.25rem;
}
.text-xl {
font-size: 1.25rem;
line-height: 1.75rem;
}
.text-base {
font-size: 1rem;
line-height: 1.5rem;
@ -2076,6 +2071,11 @@ select {
font-size: 0.6rem;
}
.text-xl {
font-size: 1.25rem;
line-height: 1.75rem;
}
.font-extrabold {
font-weight: 800;
}
@ -2131,16 +2131,16 @@ select {
color: rgba(var(--color-primary-600), var(--tw-text-opacity));
}
.text-neutral-700 {
--tw-text-opacity: 1;
color: rgba(var(--color-neutral-700), var(--tw-text-opacity));
}
.text-neutral-500 {
--tw-text-opacity: 1;
color: rgba(var(--color-neutral-500), var(--tw-text-opacity));
}
.text-neutral-700 {
--tw-text-opacity: 1;
color: rgba(var(--color-neutral-700), var(--tw-text-opacity));
}
.text-neutral-800 {
--tw-text-opacity: 1;
color: rgba(var(--color-neutral-800), var(--tw-text-opacity));
@ -3041,11 +3041,6 @@ body:has(#menu-controller:checked) {
background-color: rgba(var(--color-primary-500), var(--tw-bg-opacity)) !important;
}
.hover\:text-primary-600:hover {
--tw-text-opacity: 1;
color: rgba(var(--color-primary-600), var(--tw-text-opacity));
}
.hover\:text-primary-700:hover {
--tw-text-opacity: 1;
color: rgba(var(--color-primary-700), var(--tw-text-opacity));
@ -3061,6 +3056,11 @@ body:has(#menu-controller:checked) {
color: rgba(var(--color-neutral), var(--tw-text-opacity));
}
.hover\:text-primary-600:hover {
--tw-text-opacity: 1;
color: rgba(var(--color-primary-600), var(--tw-text-opacity));
}
.hover\:text-primary-400:hover {
--tw-text-opacity: 1;
color: rgba(var(--color-primary-400), var(--tw-text-opacity));
@ -3271,15 +3271,15 @@ body:has(#menu-controller:checked) {
background-color: rgba(var(--color-neutral-600), var(--tw-bg-opacity));
}
.dark .dark\:bg-neutral-800\/50 {
background-color: rgba(var(--color-neutral-800), 0.5);
}
.dark .dark\:bg-primary-400 {
--tw-bg-opacity: 1;
background-color: rgba(var(--color-primary-400), var(--tw-bg-opacity));
}
.dark .dark\:bg-neutral-800\/50 {
background-color: rgba(var(--color-neutral-800), 0.5);
}
.dark .dark\:bg-neutral-900\/50 {
background-color: rgba(var(--color-neutral-900), 0.5);
}

File diff suppressed because one or more lines are too long

View file

@ -55,6 +55,11 @@ Blowfish ships with a number of colour schemes out of the box. To change the bas
In addition to the default schemes, you can also create your own and re-style the entire website to your liking. Schemes are created by by placing a `<scheme-name>.css` file in the `assets/css/schemes/` folder. Once the file is created, simply refer to it by name in the theme configuration.
{{< alert "github">}}
**Note:** generating these files manually can be hard, I've built a `nodejs` terminal tool to help with that, [Fugu](https://github.com/nunocoracao/fugu). In a nutshell, you pass the main three `hex` values of your color pallette and the program will output a css file that can be imported directly into Blowfish.
{{< /alert >}}
Blowfish defines a three-colour palette that is used throughout the theme. The three colours are defined as `neutral`, `primary` and `secondary` variants, each containing ten shades of colour.
Due to the way Tailwind CSS 3.0 calculates colour values with opacity, the colours specified in the scheme need to [conform to a particular format](https://github.com/adamwathan/tailwind-css-variable-text-opacity-demo) by providing the red, green and blue colour values.

View file

@ -29,7 +29,7 @@ Front matter parameter default values are inherited from the theme's [base confi
| `authors` | _Not set_ | Array of values for authors, if set it overrides `showAuthor` settings for page or site. Used on the multiple authors feature, check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. |
| `showAuthorsBadges` | `article.showAuthorsBadges` | Whether the `authors` taxonomies are are displayed in the article or list header. This requires the setup of `multiple authors` and the `authors` taxonomy. Check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. |
| `showHero` | `article.showHero` | Whether the thumbnail image will be shown as a hero image within the article page. |
| `heroStyle` | `article.heroStyle` | Style to display the hero image, valid options are: `basic`, `big`, `background`. |
| `heroStyle` | `article.heroStyle` | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. |
| `showBreadcrumbs` | `article.showBreadcrumbs` or `list.showBreadcrumbs` | Whether the breadcrumbs are displayed in the article or list header. |
| `showDate` | `article.showDate` | Whether or not the article date is displayed. The date is set using the `date` parameter. |
| `showDateUpdated` | `article.showDateUpdated` | Whether or not the date the article was updated is displayed. The date is set using the `lastmod` parameter. |

View file

@ -18,6 +18,12 @@ Real websites that are built with Blowfish.
{{< /lead >}}
{{< alert >}}
**Blowfish user?** To add your site to this list, [submit a pull request](https://github.com/nunocoracao/blowfish/blob/main/exampleSite/content/users/index.md).
{{</ alert >}}
| Website | Details |
| --------------------------------------------------------------------- | ---------------------------- |
| [nunocoracao.com](https://nunocoracao.com) | Personal site - Theme author |

View file

@ -1,8 +1,8 @@
article:
anchor_label: "Anchor"
anchor_label: "Âncora"
date: "{{ .Date }}"
# date_updated: "Updated: {{ .Date }}"
draft: "Draft"
date_updated: "Atualizado em: {{ .Date }}"
draft: "Rascunho"
edit_title: "Editar Conteúdo"
reading_time:
one: "{{ .Count }} minuto"
@ -15,16 +15,16 @@ 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"
part_of_series: "Este artigo faz parte de uma série de artigos."
part: "Parte"
this_article: "Esse Artigo"
author:
byline_title: "Autor"
# code:
# copy: "Copy"
# copied: "Copied"
code:
copy: "Copiar"
copied: "Copiado"
error:
404_title: "Página não econtrada :confused:"
@ -38,16 +38,16 @@ footer:
list:
externalurl_title: "Link para site externo"
no_articles: "Não tem artigos para lista aqui ainda."
no_articles: "Não tem artigos para listar aqui ainda."
# nav:
# scroll_to_top_title: "Scroll to top"
# skip_to_main: "Skip to main content"
nav:
scroll_to_top_title: "Ir para o topo"
skip_to_main: "Ir para o conteúdo principal"
# search:
# open_button_title: "Search (/)"
# close_button_title: "Close (Esc)"
# input_placeholder: "Search"
search:
open_button_title: "Pesquisar (/)"
close_button_title: "Fechar (Esc)"
input_placeholder: "Pesquisar"
sharing:
email: "Enviar por email"

View file

@ -26,13 +26,7 @@
<main id="main-content" class="grow">
{{ block "main" . }}{{ end }}
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }}
<div class="pointer-events-none absolute top-[100vh] bottom-0 w-12 ltr:right-0 rtl:left-0">
<a href="#the-top"
class="pointer-events-auto sticky top-[calc(100vh-5.5rem)] flex h-12 w-12 mb-16 items-center justify-center rounded-full bg-neutral/50 text-xl text-neutral-700 backdrop-blur hover:text-primary-600 dark:bg-neutral-800/50 dark:text-neutral dark:hover:text-primary-400"
aria-label="{{ i18n " nav.scroll_to_top_title" }}" title="{{ i18n " nav.scroll_to_top_title" }}">
&uarr;
</a>
</div>
{{- partial "scroll-to-top.html" . -}}
{{ end }}
</main>
{{- partial "footer.html" . -}}

View file

@ -3,13 +3,15 @@
<article>
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
{{ $heroStyle := print "partials/hero/" .Site.Params.article.heroStyle ".html" }}
{{ $heroStyle := .Params.heroStyle }}
{{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }}
{{ $heroStyle := print "partials/hero/" $heroStyle ".html" }}
{{ if templates.Exists $heroStyle }}
{{ partial $heroStyle . }}
{{ else }}
{{ partial "partials/hero/basic.html" . }}
{{ end }}
{{- end -}}
{{ end }}
<header id="single_header" class="mt-5 max-w-prose">
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}

View file

@ -0,0 +1,7 @@
<div class="pointer-events-none absolute top-[100vh] bottom-0 w-12 ltr:right-0 rtl:left-0">
<a href="#the-top"
class="pointer-events-auto sticky top-[calc(100vh-5.5rem)] flex h-12 w-12 mb-16 items-center justify-center rounded-full bg-neutral/50 text-xl text-neutral-700 backdrop-blur hover:text-primary-600 dark:bg-neutral-800/50 dark:text-neutral dark:hover:text-primary-400"
aria-label="{{ i18n "nav.scroll_to_top_title" }}" title="{{ i18n "nav.scroll_to_top_title" }}">
&uarr;
</a>
</div>

View file

@ -1,41 +1,45 @@
{{/* Mermaid */}}
{{ if .Page.HasShortcode "mermaid" }}
{{ $mermaidLib := resources.Get "lib/mermaid/mermaid.min.js" }}
{{ $mermaidConfig := resources.Get "js/mermaid.js" }}
{{ $mermaidConfig := $mermaidConfig | resources.Minify }}
{{ $mermaidJS := slice $mermaidLib $mermaidConfig | resources.Concat "js/mermaid.bundle.js" | resources.Fingerprint "sha512" }}
<script defer type="text/javascript" src="{{ $mermaidJS.RelPermalink }}" integrity="{{ $mermaidJS.Data.Integrity }}"></script>
{{ $mermaidLib := resources.Get "lib/mermaid/mermaid.min.js" }}
{{ $mermaidConfig := resources.Get "js/mermaid.js" }}
{{ $mermaidConfig := $mermaidConfig | resources.Minify }}
{{ $mermaidJS := slice $mermaidLib $mermaidConfig | resources.Concat "js/mermaid.bundle.js" | resources.Fingerprint
"sha512" }}
<script defer type="text/javascript" src="{{ $mermaidJS.RelPermalink }}"
integrity="{{ $mermaidJS.Data.Integrity }}"></script>
{{ end }}
{{/* Chart */}}
{{ if .Page.HasShortcode "chart" }}
{{ $chartLib := resources.Get "lib/chart/chart.min.js" }}
{{ $chartConfig := resources.Get "js/chart.js" }}
{{ $chartConfig := $chartConfig | resources.Minify }}
{{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint "sha512" }}
<script defer type="text/javascript" src="{{ $chartJS.RelPermalink }}" integrity="{{ $chartJS.Data.Integrity }}"></script>
{{ $chartLib := resources.Get "lib/chart/chart.min.js" }}
{{ $chartConfig := resources.Get "js/chart.js" }}
{{ $chartConfig := $chartConfig | resources.Minify }}
{{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint "sha512" }}
<script defer type="text/javascript" src="{{ $chartJS.RelPermalink }}"
integrity="{{ $chartJS.Data.Integrity }}"></script>
{{ end }}
{{/* Katex */}}
{{ if .Page.HasShortcode "katex" }}
{{ $katexCSS := resources.Get "lib/katex/katex.min.css" }}
{{ $katexCSS := $katexCSS | resources.Fingerprint "sha512" }}
<link
type="text/css" rel="stylesheet"
href="{{ $katexCSS.RelPermalink }}"
integrity="{{ $katexCSS.Data.Integrity }}"
/>
{{ $katexJS := resources.Get "lib/katex/katex.min.js" }}
{{ $katexJS := $katexJS | resources.Fingerprint "sha512" }}
<script defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script>
{{ $katexRenderJS := resources.Get "lib/katex/auto-render.min.js" }}
{{ $katexRenderJS := $katexRenderJS | resources.Fingerprint "sha512" }}
<script defer src="{{ $katexRenderJS.RelPermalink }}" integrity="{{ $katexRenderJS.Data.Integrity }}" onload="renderMathInElement(document.body);"></script>
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
{{ range $katexFonts }}
<!-- {{ .RelPermalink }} -->
{{ end }}
{{/* TypeIt */}}
{{ if .Page.HasShortcode "typeit" }}
{{ $typeitLib := resources.Get "lib/typeit/typeit.umd.js" }}
<script defer type="text/javascript" src="{{ $typeitLib.RelPermalink }}" integrity="{{ $typeitLib.Data.Integrity }}"></script>
{{ end }}
{{ $katexCSS := resources.Get "lib/katex/katex.min.css" }}
{{ $katexCSS := $katexCSS | resources.Fingerprint "sha512" }}
<link type="text/css" rel="stylesheet" href="{{ $katexCSS.RelPermalink }}" integrity="{{ $katexCSS.Data.Integrity }}" />
{{ $katexJS := resources.Get "lib/katex/katex.min.js" }}
{{ $katexJS := $katexJS | resources.Fingerprint "sha512" }}
<script defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script>
{{ $katexRenderJS := resources.Get "lib/katex/auto-render.min.js" }}
{{ $katexRenderJS := $katexRenderJS | resources.Fingerprint "sha512" }}
<script defer src="{{ $katexRenderJS.RelPermalink }}" integrity="{{ $katexRenderJS.Data.Integrity }}"
onload="renderMathInElement(document.body);"></script>
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
{{ range $katexFonts }}
<!-- {{ .RelPermalink }} -->
{{ end }}
{{ end }}
{{/* TypeIt */}}
{{ if .Page.HasShortcode "typeit" }}
{{ $typeitLib := resources.Get "lib/typeit/typeit.umd.js" }}
<script defer src="{{ $typeitLib.RelPermalink }}" integrity="{{ $typeitLib.Data.Integrity }}"
onload="renderTypeItElements();"></script>
{{ end }}

View file

@ -1,3 +1,3 @@
<div class="lead !mb-9 text-xl">
<div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl">
{{ .Inner | markdownify }}
</div>

18
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "hugo-blowfish-theme",
"version": "2.21.0",
"version": "2.23.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "hugo-blowfish-theme",
"version": "2.21.0",
"version": "2.23.1",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@ -17,7 +17,7 @@
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.8",
"chart.js": "^4.1.1",
"chart.js": "^4.1.2",
"fuse.js": "^6.6.2",
"katex": "^0.16.4",
"mermaid": "^9.3.0",
@ -213,9 +213,9 @@
}
},
"node_modules/chart.js": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.1.1.tgz",
"integrity": "sha512-P0pCosNXp+LR8zO/QTkZKT6Hb7p0DPFtypEeVOf+6x06hX13NIb75R0DXUA4Ksx/+48chDQKtCCmRCviQRTqsA==",
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.1.2.tgz",
"integrity": "sha512-9L1w6WLPq6ztiWVVOYtDtpo0CUsBKDWPrUEdwChAyzczaikqeSwNKEv3QpJ7EO4ICcLSi6UDVhgvcnUhRJidRA==",
"dev": true,
"dependencies": {
"@kurkle/color": "^0.3.0"
@ -1815,9 +1815,9 @@
"integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA=="
},
"chart.js": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.1.1.tgz",
"integrity": "sha512-P0pCosNXp+LR8zO/QTkZKT6Hb7p0DPFtypEeVOf+6x06hX13NIb75R0DXUA4Ksx/+48chDQKtCCmRCviQRTqsA==",
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.1.2.tgz",
"integrity": "sha512-9L1w6WLPq6ztiWVVOYtDtpo0CUsBKDWPrUEdwChAyzczaikqeSwNKEv3QpJ7EO4ICcLSi6UDVhgvcnUhRJidRA==",
"dev": true,
"requires": {
"@kurkle/color": "^0.3.0"

View file

@ -1,6 +1,6 @@
{
"name": "hugo-blowfish-theme",
"version": "2.23.1",
"version": "2.24.0",
"description": "Blowfish theme for Hugo",
"scripts": {
"fullinstall": "npm run preinstall && npm install && npm run postinstall",
@ -35,7 +35,7 @@
"homepage": "https://github.com/nunocoracao/blowfish#readme",
"devDependencies": {
"@tailwindcss/typography": "^0.5.8",
"chart.js": "^4.1.1",
"chart.js": "^4.1.2",
"fuse.js": "^6.6.2",
"katex": "^0.16.4",
"mermaid": "^9.3.0",