mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-20 18:31:53 +02:00
commit
0a91156191
14 changed files with 88 additions and 83 deletions
|
@ -2,4 +2,4 @@
|
||||||
[module.hugoVersion]
|
[module.hugoVersion]
|
||||||
extended = true
|
extended = true
|
||||||
min = "0.87.0"
|
min = "0.87.0"
|
||||||
max = "0.126.2"
|
max = "0.126.3"
|
||||||
|
|
|
@ -100,8 +100,8 @@ smartTOCHideUnfocusedChildren = false
|
||||||
showHero = true
|
showHero = true
|
||||||
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||||
showBreadcrumbs = false
|
showBreadcrumbs = false
|
||||||
showViews = true
|
showViews = false
|
||||||
showLikes = true
|
showLikes = false
|
||||||
showTableOfContents = true
|
showTableOfContents = true
|
||||||
cardView = false
|
cardView = false
|
||||||
|
|
||||||
|
@ -109,8 +109,8 @@ smartTOCHideUnfocusedChildren = false
|
||||||
showHero = true
|
showHero = true
|
||||||
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||||
showBreadcrumbs = false
|
showBreadcrumbs = false
|
||||||
showViews = true
|
showViews = false
|
||||||
showLikes = true
|
showLikes = false
|
||||||
showTableOfContents = true
|
showTableOfContents = true
|
||||||
groupByYear = false
|
groupByYear = false
|
||||||
cardView = true
|
cardView = true
|
||||||
|
|
|
@ -496,7 +496,7 @@ When life gives you lemons, make lemonade.
|
||||||
| `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` |
|
| `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` |
|
||||||
|
|
||||||
{{< alert >}}
|
{{< alert >}}
|
||||||
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/variables/page/) to learn more about which parameters are available to use.
|
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/methods/page/) to learn more about which parameters are available to use.
|
||||||
{{</ alert >}}
|
{{</ alert >}}
|
||||||
|
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
|
@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
|
||||||
**Example #2:**
|
**Example #2:**
|
||||||
|
|
||||||
```md
|
```md
|
||||||
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}}
|
{{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
|
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
|
||||||
|
|
|
@ -496,7 +496,7 @@ When life gives you lemons, make lemonade.
|
||||||
| `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` |
|
| `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` |
|
||||||
|
|
||||||
{{< alert >}}
|
{{< alert >}}
|
||||||
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/variables/page/) to learn more about which parameters are available to use.
|
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/methods/page/) to learn more about which parameters are available to use.
|
||||||
{{</ alert >}}
|
{{</ alert >}}
|
||||||
|
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
|
@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
|
||||||
**Example #2:**
|
**Example #2:**
|
||||||
|
|
||||||
```md
|
```md
|
||||||
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}}
|
{{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
|
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
|
||||||
|
|
|
@ -18,7 +18,7 @@ In addition to all the [default Hugo shortcodes](https://gohugo.io/content-manag
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `icon` | **Optional.** the icon to display on the left side.<br>**Default:** `exclaimation triangle icon` (Check out the [icon shortcode](#icon) for more details on using icons.) |
|
| `icon` | **Optional.** the icon to display on the left side.<br>**Default:** `triangle-exclamation` (Check out the [icon shortcode](#icon) for more details on using icons.) |
|
||||||
| `iconColor` | **Optional.** the color for the icon in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
|
| `iconColor` | **Optional.** the color for the icon in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
|
||||||
| `cardColor` | **Optional.** the color for the card background in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
|
| `cardColor` | **Optional.** the color for the card background in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
|
||||||
| `textColor` | **Optional.** the color for the text in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
|
| `textColor` | **Optional.** the color for the text in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
|
||||||
|
@ -496,7 +496,7 @@ When life gives you lemons, make lemonade.
|
||||||
| `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` |
|
| `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` |
|
||||||
|
|
||||||
{{< alert >}}
|
{{< alert >}}
|
||||||
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/variables/page/) to learn more about which parameters are available to use.
|
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/methods/page/) to learn more about which parameters are available to use.
|
||||||
{{</ alert >}}
|
{{</ alert >}}
|
||||||
|
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
|
@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
|
||||||
**Example #2:**
|
**Example #2:**
|
||||||
|
|
||||||
```md
|
```md
|
||||||
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}}
|
{{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
|
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
|
||||||
|
|
|
@ -497,7 +497,7 @@ When life gives you lemons, make lemonade.
|
||||||
| `value` | 需要与 `where` 中定义的参数匹配的值,以进行文章查询,例如对于 `where` == `Type`,可以找到文章 `sample` |
|
| `value` | 需要与 `where` 中定义的参数匹配的值,以进行文章查询,例如对于 `where` == `Type`,可以找到文章 `sample` |
|
||||||
|
|
||||||
{{< alert >}}
|
{{< alert >}}
|
||||||
`where` 和 `value` 值用于简码中进行以下格式的查询 `where .Site.RegularPages $where $value` 。检查 [Hugo 文档](https://gohugo.io/variables/page/) 以了解有关可用参数的更多信息。
|
`where` 和 `value` 值用于简码中进行以下格式的查询 `where .Site.RegularPages $where $value` 。检查 [Hugo 文档](https://gohugo.io/methods/page/) 以了解有关可用参数的更多信息。
|
||||||
{{</ alert >}}
|
{{</ alert >}}
|
||||||
|
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
|
@ -513,7 +513,7 @@ When life gives you lemons, make lemonade.
|
||||||
**例 2:**
|
**例 2:**
|
||||||
|
|
||||||
```md
|
```md
|
||||||
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}}
|
{{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
|
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
{{- $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
||||||
{{ $url := urls.Parse .Destination }}
|
{{- $url := urls.Parse .Destination }}
|
||||||
{{ $altText := .Text }}
|
{{- $altText := .Text }}
|
||||||
{{ $caption := .Title }}
|
{{- $caption := .Title }}
|
||||||
{{ if findRE "^https?" $url.Scheme }}
|
{{- if findRE "^https?" $url.Scheme }}
|
||||||
<figure>
|
<figure>
|
||||||
<img class="my-0 rounded-md" loading="lazy" src="{{ $url.String }}" alt="{{ $altText }}" />
|
<img class="my-0 rounded-md" loading="lazy" src="{{ $url.String }}" alt="{{ $altText }}" />
|
||||||
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
||||||
</figure>
|
</figure>
|
||||||
{{ else }}
|
{{- else }}
|
||||||
{{ $resource := "" }}
|
{{- $resource := "" }}
|
||||||
{{ if $.Page.Resources.GetMatch ($url.String) }}
|
{{- if $.Page.Resources.GetMatch ($url.String) }}
|
||||||
{{ $resource = $.Page.Resources.GetMatch ($url.String) }}
|
{{- $resource = $.Page.Resources.GetMatch ($url.String) }}
|
||||||
{{ else if resources.GetMatch ($url.String) }}
|
{{- else if resources.GetMatch ($url.String) }}
|
||||||
{{ $resource = resources.Get ($url.String) }}
|
{{- $resource = resources.Get ($url.String) }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{ with $resource }}
|
{{- with $resource }}
|
||||||
<figure>
|
<figure>
|
||||||
{{ if $disableImageOptimization }}
|
{{- if or $disableImageOptimization (eq .MediaType.SubType "svg")}}
|
||||||
<img
|
<img
|
||||||
class="my-0 rounded-md"
|
class="my-0 rounded-md"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
src="{{ .RelPermalink }}"
|
src="{{ .RelPermalink }}"
|
||||||
alt="{{ $altText }}"
|
alt="{{ $altText }}"
|
||||||
/>
|
/>
|
||||||
{{ else }}
|
{{- else }}
|
||||||
<img
|
<img
|
||||||
class="my-0 rounded-md"
|
class="my-0 rounded-md"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
|
@ -35,13 +35,13 @@
|
||||||
src="{{ (.Resize "660x").RelPermalink }}"
|
src="{{ (.Resize "660x").RelPermalink }}"
|
||||||
alt="{{ $altText }}"
|
alt="{{ $altText }}"
|
||||||
/>
|
/>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
||||||
</figure>
|
</figure>
|
||||||
{{ else }}
|
{{- else }}
|
||||||
<figure>
|
<figure>
|
||||||
<img class="my-0 rounded-md" loading="lazy" src="{{ $url.String }}" alt="{{ $altText }}" />
|
<img class="my-0 rounded-md" loading="lazy" src="{{ $url.String }}" alt="{{ $altText }}" />
|
||||||
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
||||||
</figure>
|
</figure>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
<a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"{{ end }} {{ if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
|
<a href="{{ .Destination | safeURL }}"
|
||||||
{{ .Text | safeHTML }}</a>
|
{{- with .Title -}}
|
||||||
|
title="{{ . }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
|
||||||
|
{{- .Text | safeHTML -}}
|
||||||
|
</a>
|
|
@ -27,7 +27,7 @@
|
||||||
{{ if .Site.Params.footer.showCopyright | default true }}
|
{{ if .Site.Params.footer.showCopyright | default true }}
|
||||||
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
||||||
{{- with replace .Site.Params.copyright "{ year }" now.Year }}
|
{{- with replace .Site.Params.copyright "{ year }" now.Year }}
|
||||||
{{ . | emojify }}
|
{{ . | markdownify }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
©
|
©
|
||||||
{{ now.Format "2006" }}
|
{{ now.Format "2006" }}
|
||||||
|
|
|
@ -2,49 +2,49 @@
|
||||||
{{ if .Get "default" }}
|
{{ if .Get "default" }}
|
||||||
{{ template "_internal/shortcodes/figure.html" . }}
|
{{ template "_internal/shortcodes/figure.html" . }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $url := urls.Parse (.Get "src") }}
|
{{- $url := urls.Parse (.Get "src") }}
|
||||||
{{ $altText := .Get "alt" }}
|
{{- $altText := .Get "alt" }}
|
||||||
{{ $caption := .Get "caption" }}
|
{{- $caption := .Get "caption" }}
|
||||||
{{ $href := .Get "href" }}
|
{{- $href := .Get "href" }}
|
||||||
{{ $class := .Get "class" }}
|
{{- $class := .Get "class" }}
|
||||||
{{ $target := .Get "target" | default "_blank" }}
|
{{- $target := .Get "target" | default "_blank" }}
|
||||||
{{ $nozoom := .Get "nozoom" | default false }}
|
{{- $nozoom := .Get "nozoom" | default false -}}
|
||||||
|
|
||||||
<figure>
|
<figure>
|
||||||
{{ with $href }}<a href="{{ . }}" {{ with $target }}target="{{ . }}"{{ end }}>{{ end }}
|
{{- with $href }}<a href="{{ . }}" {{ with $target }}target="{{ . }}"{{ end }}>{{ end -}}
|
||||||
{{ if findRE "^https?" $url.Scheme }}
|
{{- if findRE "^https?" $url.Scheme }}
|
||||||
<img class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" />
|
<img class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" />
|
||||||
{{ else }}
|
{{- else }}
|
||||||
{{ $resource := "" }}
|
{{- $resource := "" }}
|
||||||
{{ if $.Page.Resources.GetMatch ($url.String) }}
|
{{- if $.Page.Resources.GetMatch ($url.String) }}
|
||||||
{{ $resource = $.Page.Resources.GetMatch ($url.String) }}
|
{{- $resource = $.Page.Resources.GetMatch ($url.String) }}
|
||||||
{{ else if resources.GetMatch ($url.String) }}
|
{{- else if resources.GetMatch ($url.String) }}
|
||||||
{{ $resource = resources.Get ($url.String) }}
|
{{- $resource = resources.Get ($url.String) }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{ with $resource }}
|
{{- with $resource }}
|
||||||
{{ if $disableImageOptimization }}
|
{{- if or $disableImageOptimization (eq .MediaType.SubType "svg")}}
|
||||||
<img
|
<img
|
||||||
class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}"
|
class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}"
|
||||||
src="{{ .RelPermalink }}"
|
src="{{ .RelPermalink }}"
|
||||||
alt="{{ $altText }}"
|
alt="{{ $altText }}"
|
||||||
/>
|
/>
|
||||||
{{ else }}
|
{{- else }}
|
||||||
<img
|
<img
|
||||||
class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}"
|
class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}"
|
||||||
srcset="
|
srcset="
|
||||||
{{ (.Resize "330x").RelPermalink }} 330w,
|
{{ (.Resize "330x").RelPermalink }} 330w,
|
||||||
{{ (.Resize "660x").RelPermalink }} 660w,
|
{{ (.Resize "660x").RelPermalink }} 660w,
|
||||||
{{ (.Resize "1024x").RelPermalink }} 1024w,
|
{{ (.Resize "1024x").RelPermalink }} 1024w,
|
||||||
{{ (.Resize "1320x").RelPermalink }} 2x"
|
{{ (.Resize "1320x").RelPermalink }} 2x"
|
||||||
src="{{ (.Resize "660x").RelPermalink }}"
|
src="{{ (.Resize "660x").RelPermalink }}"
|
||||||
alt="{{ $altText }}"
|
alt="{{ $altText }}"
|
||||||
/>
|
/>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{ else }}
|
{{- else }}
|
||||||
<img class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" />
|
<img class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" />
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
||||||
{{ if $href }}</a>{{ end }}
|
{{ if $href }}</a>{{ end }}
|
||||||
</figure>
|
</figure>
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<ol class="border-l-2 border-primary-500 dark:border-primary-300">
|
<ol class="border-l-2 border-primary-500 dark:border-primary-300 list-none">
|
||||||
{{- .Inner -}}
|
{{- .Inner -}}
|
||||||
</ol>
|
</ol>
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "hugo-blowfish-theme",
|
"name": "hugo-blowfish-theme",
|
||||||
"version": "2.69.0",
|
"version": "2.70.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "hugo-blowfish-theme",
|
"name": "hugo-blowfish-theme",
|
||||||
"version": "2.69.0",
|
"version": "2.70.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "hugo-blowfish-theme",
|
"name": "hugo-blowfish-theme",
|
||||||
"version": "2.69.0",
|
"version": "2.70.0",
|
||||||
"description": "Blowfish theme for Hugo",
|
"description": "Blowfish theme for Hugo.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "vendor-copy",
|
"postinstall": "vendor-copy",
|
||||||
"assets": "rimraf assets/vendor && vendor-copy",
|
"assets": "rimraf assets/vendor && vendor-copy",
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
v0.126.2
|
v0.126.3
|
||||||
|
|
Loading…
Add table
Reference in a new issue