mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-02-02 03:22:33 -06:00
commit
0a91156191
14 changed files with 88 additions and 83 deletions
|
@ -2,4 +2,4 @@
|
|||
[module.hugoVersion]
|
||||
extended = true
|
||||
min = "0.87.0"
|
||||
max = "0.126.2"
|
||||
max = "0.126.3"
|
||||
|
|
|
@ -100,8 +100,8 @@ smartTOCHideUnfocusedChildren = false
|
|||
showHero = true
|
||||
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||
showBreadcrumbs = false
|
||||
showViews = true
|
||||
showLikes = true
|
||||
showViews = false
|
||||
showLikes = false
|
||||
showTableOfContents = true
|
||||
cardView = false
|
||||
|
||||
|
@ -109,8 +109,8 @@ smartTOCHideUnfocusedChildren = false
|
|||
showHero = true
|
||||
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||
showBreadcrumbs = false
|
||||
showViews = true
|
||||
showLikes = true
|
||||
showViews = false
|
||||
showLikes = false
|
||||
showTableOfContents = true
|
||||
groupByYear = false
|
||||
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` |
|
||||
|
||||
{{< 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 >}}
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
|
@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
|
|||
**Example #2:**
|
||||
|
||||
```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">}}
|
||||
|
|
|
@ -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` |
|
||||
|
||||
{{< 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 >}}
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
|
@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
|
|||
**Example #2:**
|
||||
|
||||
```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">}}
|
||||
|
|
|
@ -18,7 +18,7 @@ In addition to all the [default Hugo shortcodes](https://gohugo.io/content-manag
|
|||
<!-- prettier-ignore-start -->
|
||||
| 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 . |
|
||||
| `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 . |
|
||||
|
@ -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` |
|
||||
|
||||
{{< 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 >}}
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
|
@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
|
|||
**Example #2:**
|
||||
|
||||
```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">}}
|
||||
|
|
|
@ -497,7 +497,7 @@ When life gives you lemons, make lemonade.
|
|||
| `value` | 需要与 `where` 中定义的参数匹配的值,以进行文章查询,例如对于 `where` == `Type`,可以找到文章 `sample` |
|
||||
|
||||
{{< 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 >}}
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
|
@ -513,7 +513,7 @@ When life gives you lemons, make lemonade.
|
|||
**例 2:**
|
||||
|
||||
```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">}}
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
||||
{{ $url := urls.Parse .Destination }}
|
||||
{{ $altText := .Text }}
|
||||
{{ $caption := .Title }}
|
||||
{{ if findRE "^https?" $url.Scheme }}
|
||||
{{- $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
||||
{{- $url := urls.Parse .Destination }}
|
||||
{{- $altText := .Text }}
|
||||
{{- $caption := .Title }}
|
||||
{{- if findRE "^https?" $url.Scheme }}
|
||||
<figure>
|
||||
<img class="my-0 rounded-md" loading="lazy" src="{{ $url.String }}" alt="{{ $altText }}" />
|
||||
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
||||
</figure>
|
||||
{{ else }}
|
||||
{{ $resource := "" }}
|
||||
{{ if $.Page.Resources.GetMatch ($url.String) }}
|
||||
{{ $resource = $.Page.Resources.GetMatch ($url.String) }}
|
||||
{{ else if resources.GetMatch ($url.String) }}
|
||||
{{ $resource = resources.Get ($url.String) }}
|
||||
{{ end }}
|
||||
{{ with $resource }}
|
||||
{{- else }}
|
||||
{{- $resource := "" }}
|
||||
{{- if $.Page.Resources.GetMatch ($url.String) }}
|
||||
{{- $resource = $.Page.Resources.GetMatch ($url.String) }}
|
||||
{{- else if resources.GetMatch ($url.String) }}
|
||||
{{- $resource = resources.Get ($url.String) }}
|
||||
{{- end }}
|
||||
{{- with $resource }}
|
||||
<figure>
|
||||
{{ if $disableImageOptimization }}
|
||||
{{- if or $disableImageOptimization (eq .MediaType.SubType "svg")}}
|
||||
<img
|
||||
class="my-0 rounded-md"
|
||||
loading="lazy"
|
||||
src="{{ .RelPermalink }}"
|
||||
alt="{{ $altText }}"
|
||||
/>
|
||||
{{ else }}
|
||||
{{- else }}
|
||||
<img
|
||||
class="my-0 rounded-md"
|
||||
loading="lazy"
|
||||
|
@ -35,13 +35,13 @@
|
|||
src="{{ (.Resize "660x").RelPermalink }}"
|
||||
alt="{{ $altText }}"
|
||||
/>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
||||
</figure>
|
||||
{{ else }}
|
||||
{{- else }}
|
||||
<figure>
|
||||
<img class="my-0 rounded-md" loading="lazy" src="{{ $url.String }}" alt="{{ $altText }}" />
|
||||
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
||||
</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 }}>
|
||||
{{ .Text | safeHTML }}</a>
|
||||
<a href="{{ .Destination | safeURL }}"
|
||||
{{- 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 }}
|
||||
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
||||
{{- with replace .Site.Params.copyright "{ year }" now.Year }}
|
||||
{{ . | emojify }}
|
||||
{{ . | markdownify }}
|
||||
{{- else }}
|
||||
©
|
||||
{{ now.Format "2006" }}
|
||||
|
|
|
@ -2,49 +2,49 @@
|
|||
{{ if .Get "default" }}
|
||||
{{ template "_internal/shortcodes/figure.html" . }}
|
||||
{{ else }}
|
||||
{{ $url := urls.Parse (.Get "src") }}
|
||||
{{ $altText := .Get "alt" }}
|
||||
{{ $caption := .Get "caption" }}
|
||||
{{ $href := .Get "href" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $target := .Get "target" | default "_blank" }}
|
||||
{{ $nozoom := .Get "nozoom" | default false }}
|
||||
{{- $url := urls.Parse (.Get "src") }}
|
||||
{{- $altText := .Get "alt" }}
|
||||
{{- $caption := .Get "caption" }}
|
||||
{{- $href := .Get "href" }}
|
||||
{{- $class := .Get "class" }}
|
||||
{{- $target := .Get "target" | default "_blank" }}
|
||||
{{- $nozoom := .Get "nozoom" | default false -}}
|
||||
|
||||
<figure>
|
||||
{{ with $href }}<a href="{{ . }}" {{ with $target }}target="{{ . }}"{{ end }}>{{ end }}
|
||||
{{ if findRE "^https?" $url.Scheme }}
|
||||
<img class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" />
|
||||
{{ else }}
|
||||
{{ $resource := "" }}
|
||||
{{ if $.Page.Resources.GetMatch ($url.String) }}
|
||||
{{ $resource = $.Page.Resources.GetMatch ($url.String) }}
|
||||
{{ else if resources.GetMatch ($url.String) }}
|
||||
{{ $resource = resources.Get ($url.String) }}
|
||||
{{ end }}
|
||||
{{ with $resource }}
|
||||
{{ if $disableImageOptimization }}
|
||||
<img
|
||||
class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}"
|
||||
src="{{ .RelPermalink }}"
|
||||
alt="{{ $altText }}"
|
||||
/>
|
||||
{{ else }}
|
||||
<img
|
||||
class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}"
|
||||
srcset="
|
||||
{{ (.Resize "330x").RelPermalink }} 330w,
|
||||
{{ (.Resize "660x").RelPermalink }} 660w,
|
||||
{{ (.Resize "1024x").RelPermalink }} 1024w,
|
||||
{{ (.Resize "1320x").RelPermalink }} 2x"
|
||||
src="{{ (.Resize "660x").RelPermalink }}"
|
||||
alt="{{ $altText }}"
|
||||
/>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<img class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- with $href }}<a href="{{ . }}" {{ with $target }}target="{{ . }}"{{ end }}>{{ end -}}
|
||||
{{- if findRE "^https?" $url.Scheme }}
|
||||
<img class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" />
|
||||
{{- else }}
|
||||
{{- $resource := "" }}
|
||||
{{- if $.Page.Resources.GetMatch ($url.String) }}
|
||||
{{- $resource = $.Page.Resources.GetMatch ($url.String) }}
|
||||
{{- else if resources.GetMatch ($url.String) }}
|
||||
{{- $resource = resources.Get ($url.String) }}
|
||||
{{- end }}
|
||||
{{- with $resource }}
|
||||
{{- if or $disableImageOptimization (eq .MediaType.SubType "svg")}}
|
||||
<img
|
||||
class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}"
|
||||
src="{{ .RelPermalink }}"
|
||||
alt="{{ $altText }}"
|
||||
/>
|
||||
{{- else }}
|
||||
<img
|
||||
class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}"
|
||||
srcset="
|
||||
{{ (.Resize "330x").RelPermalink }} 330w,
|
||||
{{ (.Resize "660x").RelPermalink }} 660w,
|
||||
{{ (.Resize "1024x").RelPermalink }} 1024w,
|
||||
{{ (.Resize "1320x").RelPermalink }} 2x"
|
||||
src="{{ (.Resize "660x").RelPermalink }}"
|
||||
alt="{{ $altText }}"
|
||||
/>
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
<img class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" />
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
||||
{{ if $href }}</a>{{ end }}
|
||||
</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 -}}
|
||||
</ol>
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "hugo-blowfish-theme",
|
||||
"version": "2.69.0",
|
||||
"version": "2.70.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "hugo-blowfish-theme",
|
||||
"version": "2.69.0",
|
||||
"version": "2.70.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "hugo-blowfish-theme",
|
||||
"version": "2.69.0",
|
||||
"description": "Blowfish theme for Hugo",
|
||||
"version": "2.70.0",
|
||||
"description": "Blowfish theme for Hugo.",
|
||||
"scripts": {
|
||||
"postinstall": "vendor-copy",
|
||||
"assets": "rimraf assets/vendor && vendor-copy",
|
||||
|
|
|
@ -1 +1 @@
|
|||
v0.126.2
|
||||
v0.126.3
|
||||
|
|
Loading…
Reference in a new issue