mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-23 06:55:43 -06:00
commit
9d440a8856
11 changed files with 38 additions and 26 deletions
|
@ -13,7 +13,7 @@ function createCopyButton(highlightDiv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function copyCodeToClipboard(button, highlightDiv) {
|
async function copyCodeToClipboard(button, highlightDiv) {
|
||||||
const codeToCopy = highlightDiv.querySelector(":last-child > .chroma > code").innerText;
|
const codeToCopy = highlightDiv.querySelector(":last-child").innerText;
|
||||||
try {
|
try {
|
||||||
result = await navigator.permissions.query({ name: "clipboard-write" });
|
result = await navigator.permissions.query({ name: "clipboard-write" });
|
||||||
if (result.state == "granted" || result.state == "prompt") {
|
if (result.state == "granted" || result.state == "prompt") {
|
||||||
|
|
|
@ -8,6 +8,7 @@ Welcome to Blowfish, one of the most flexible and robust Hugo themes. It is desi
|
||||||
```node
|
```node
|
||||||
npx blowfish-tools
|
npx blowfish-tools
|
||||||
```
|
```
|
||||||
|
|
||||||
<iframe width="100%" height="350" src="https://www.youtube.com/embed/SgXhGb-7QbU?si=ce44baicuQ6zMeXz" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
<iframe width="100%" height="350" src="https://www.youtube.com/embed/SgXhGb-7QbU?si=ce44baicuQ6zMeXz" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
||||||
|
|
||||||
<!--You can also find the complete theme documentation in [docs]({{< ref "docs" >}}). Blowfish is highly customizable and can be configured to fit your needs: from a static website to a blog. Checkout some [examples](/examples) and what some of our [users](/users) have been building.
|
<!--You can also find the complete theme documentation in [docs]({{< ref "docs" >}}). Blowfish is highly customizable and can be configured to fit your needs: from a static website to a blog. Checkout some [examples](/examples) and what some of our [users](/users) have been building.
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
{{ partial "translations.html" . }}
|
{{ partial "translations.html" . }}
|
||||||
|
|
||||||
{{ if .Site.Params.enableSearch | default false }}
|
{{ if .Site.Params.enableSearch | default false }}
|
||||||
<button id="search-button" aria-label="Search" class="text-base hover:text-primary-600 dark:hover:text-primary-400 h-12"
|
<button id="search-button" aria-label="Search" class="text-base hover:text-primary-600 dark:hover:text-primary-400"
|
||||||
title="{{ i18n " search.open_button_title" }}">
|
title="{{ i18n " search.open_button_title" }}">
|
||||||
{{ partial "icon.html" "search" }}
|
{{ partial "icon.html" "search" }}
|
||||||
</button>
|
</button>
|
||||||
|
@ -45,12 +45,12 @@
|
||||||
{{/* Appearance switch */}}
|
{{/* Appearance switch */}}
|
||||||
{{ if .Site.Params.footer.showAppearanceSwitcher | default false }}
|
{{ if .Site.Params.footer.showAppearanceSwitcher | default false }}
|
||||||
<div
|
<div
|
||||||
class="{{ if .Site.Params.footer.showScrollToTop | default true -}} ltr:mr-14 rtl:ml-14 {{- end }} cursor-pointer text-sm text-neutral-700 hover:text-primary-600 dark:text-neutral dark:hover:text-primary-400">
|
class="{{ if .Site.Params.footer.showScrollToTop | default true -}} ltr:mr-14 rtl:ml-14 {{- end }} flex items-center">
|
||||||
<button id="appearance-switcher" aria-label="Dark mode switcher" type="button">
|
<button id="appearance-switcher" aria-label="Dark mode switcher" type="button" class="text-base hover:text-primary-600 dark:hover:text-primary-400">
|
||||||
<div class="flex items-center justify-center h-12 dark:hidden">
|
<div class="flex items-center justify-center dark:hidden">
|
||||||
{{ partial "icon.html" "moon" }}
|
{{ partial "icon.html" "moon" }}
|
||||||
</div>
|
</div>
|
||||||
<div class="items-center justify-center hidden h-12 dark:flex">
|
<div class="items-center justify-center hidden dark:flex">
|
||||||
{{ partial "icon.html" "sun" }}
|
{{ partial "icon.html" "sun" }}
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
<div class="flex md:hidden items-center space-x-5 md:ml-12">
|
<div class="flex md:hidden items-center space-x-5 md:ml-12 h-12">
|
||||||
|
|
||||||
<span></span>
|
<span></span>
|
||||||
|
|
||||||
|
@ -73,11 +73,11 @@
|
||||||
|
|
||||||
{{/* Appearance switch */}}
|
{{/* Appearance switch */}}
|
||||||
{{ if .Site.Params.footer.showAppearanceSwitcher | default false }}
|
{{ if .Site.Params.footer.showAppearanceSwitcher | default false }}
|
||||||
<button id="appearance-switcher-mobile" aria-label="Dark mode switcher" type="button" style="margin-right:5px">
|
<button id="appearance-switcher-mobile" aria-label="Dark mode switcher" type="button" class="text-base hover:text-primary-600 dark:hover:text-primary-400" style="margin-right:5px">
|
||||||
<div class="flex items-center justify-center h-12 dark:hidden">
|
<div class="flex items-center justify-center dark:hidden">
|
||||||
{{ partial "icon.html" "moon" }}
|
{{ partial "icon.html" "moon" }}
|
||||||
</div>
|
</div>
|
||||||
<div class="items-center justify-center hidden h-12 dark:flex">
|
<div class="items-center justify-center hidden dark:flex">
|
||||||
{{ partial "icon.html" "sun" }}
|
{{ partial "icon.html" "sun" }}
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<li class="mt-1">
|
<li class="mt-1">
|
||||||
<a class="flex items-center">
|
<a class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||||
{{ if .Pre }}
|
{{ if .Pre }}
|
||||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||||
{{ partial "icon.html" .Pre }}
|
{{ partial "icon.html" .Pre }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p class="text-bg font-bg text-gray-500 hover:text-gray-900" title="{{ .Title }}">
|
<p class="text-bg font-bg" title="{{ .Title }}">
|
||||||
{{ .Name | markdownify | emojify }}
|
{{ .Name | markdownify | emojify }}
|
||||||
</p>
|
</p>
|
||||||
<span>
|
<span>
|
||||||
|
@ -16,13 +16,13 @@
|
||||||
{{ range .Children }}
|
{{ range .Children }}
|
||||||
<li class="mt-1">
|
<li class="mt-1">
|
||||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||||
) }} target="_blank" {{ end }} class="flex items-center">
|
) }} target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||||
{{ if .Pre }}
|
{{ if .Pre }}
|
||||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||||
{{ partial "icon.html" .Pre }}
|
{{ partial "icon.html" .Pre }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p class="text-sm font-small text-gray-500 hover:text-gray-900" title="{{ .Title }}">
|
<p class="text-sm font-small" title="{{ .Title }}">
|
||||||
{{ .Name | markdownify | emojify }}
|
{{ .Name | markdownify | emojify }}
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<li class="mt-1">
|
<li class="mt-1">
|
||||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:"
|
||||||
) }} target="_blank" {{ end }} class="flex items-center">
|
) }} target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||||
{{ if .Pre }}
|
{{ if .Pre }}
|
||||||
<div {{ if and .Pre .Name}} class="mr-2" {{ end }}>
|
<div {{ if and .Pre .Name}} class="mr-2" {{ end }}>
|
||||||
{{ partial "icon.html" .Pre }}
|
{{ partial "icon.html" .Pre }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p class="text-bg font-bg text-gray-500 hover:text-gray-900" title="{{ .Title }}">
|
<p class="text-bg font-bg" title="{{ .Title }}">
|
||||||
{{ .Name | markdownify | emojify }}
|
{{ .Name | markdownify | emojify }}
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a {{ if .URL }} href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
<a {{ if .URL }} href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||||
target="_blank" {{ end }} {{ end }} class="text-base font-medium text-gray-500 hover:text-gray-900" title="{{ .Title }}">
|
target="_blank" {{ end }} {{ end }} class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}">
|
||||||
{{ .Name | markdownify | emojify }}
|
{{ .Name | markdownify | emojify }}
|
||||||
</a>
|
</a>
|
||||||
<span>
|
<span>
|
||||||
|
@ -18,13 +18,13 @@
|
||||||
<div class="flex flex-col space-y-3">
|
<div class="flex flex-col space-y-3">
|
||||||
{{ range .Children }}
|
{{ range .Children }}
|
||||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
|
||||||
target="_blank" {{ end }} class="flex items-center">
|
target="_blank" {{ end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||||
{{ if .Pre }}
|
{{ if .Pre }}
|
||||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||||
{{ partial "icon.html" .Pre }}
|
{{ partial "icon.html" .Pre }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p class="text-sm font-sm text-gray-500 hover:text-gray-900" title="{{ .Title }}">
|
<p class="text-sm font-sm" title="{{ .Title }}">
|
||||||
{{ .Name | markdownify | emojify }}
|
{{ .Name | markdownify | emojify }}
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }} target="_blank" {{
|
<a href="{{ .URL }}" {{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }} target="_blank" {{
|
||||||
end }} class="flex items-center">
|
end }} class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
|
||||||
{{ if .Pre }}
|
{{ if .Pre }}
|
||||||
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
<span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
|
||||||
{{ partial "icon.html" .Pre }}
|
{{ partial "icon.html" .Pre }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p class="text-base font-medium text-gray-500 hover:text-gray-900" title="{{ .Title }}">
|
<p class="text-base font-medium" title="{{ .Title }}">
|
||||||
{{ .Name | markdownify | emojify }}
|
{{ .Name | markdownify | emojify }}
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
|
@ -4,11 +4,22 @@
|
||||||
{{- $featured := $images.GetMatch "*background*" -}}
|
{{- $featured := $images.GetMatch "*background*" -}}
|
||||||
{{- if not $featured }}{{ $featured = $images.GetMatch "*feature*" }}{{ end -}}
|
{{- if not $featured }}{{ $featured = $images.GetMatch "*feature*" }}{{ end -}}
|
||||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||||
|
|
||||||
{{ if and .Params.featureimage (not $featured) }}
|
{{ if and .Params.featureimage (not $featured) }}
|
||||||
{{- $url:= .Params.featureimage -}}
|
{{- $url:= .Params.featureimage -}}
|
||||||
{{ $featured = resources.GetRemote $url }}
|
{{ $featured = resources.GetRemote $url }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- if not $featured }}{{ with .Site.Params.defaultBackgroundImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}}
|
|
||||||
|
{{- if not $featured }}
|
||||||
|
{{ with .Site.Params.defaultBackgroundImage }}
|
||||||
|
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||||
|
{{ $featured = resources.GetRemote . }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $featured = resources.Get . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
{{ $isParentList := eq (.Scratch.Get "scope") "list" }}
|
{{ $isParentList := eq (.Scratch.Get "scope") "list" }}
|
||||||
{{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or
|
{{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or
|
||||||
(and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList))
|
(and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{ if .IsTranslated }}
|
{{ if .IsTranslated }}
|
||||||
<div>
|
<div>
|
||||||
<div class="cursor-pointer flex items-center nested-menu">
|
<div class="cursor-pointer flex items-center nested-menu">
|
||||||
<a href="#" class="text-base font-medium text-gray-500 hover:text-gray-900" title="{{ .Title }}">
|
<a href="#" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}">
|
||||||
{{- i18n "global.language" | markdownify | emojify -}}
|
{{- i18n "global.language" | markdownify | emojify -}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
<div class="flex flex-col space-y-3">
|
<div class="flex flex-col space-y-3">
|
||||||
{{ range .AllTranslations }}
|
{{ range .AllTranslations }}
|
||||||
<a href="{{ .RelPermalink }}" class="flex items-center">
|
<a href="{{ .RelPermalink }}" class="flex items-center">
|
||||||
<p class="text-sm font-sm text-gray-500 hover:text-gray-900" title="{{ .Title }}">
|
<p class="text-sm font-sm text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="{{ .Title }}">
|
||||||
{{ .Language.Params.displayName | emojify }}
|
{{ .Language.Params.displayName | emojify }}
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{{- $gitLabData := getJSON ($gitlabURL) -}}
|
{{- $gitLabData := getJSON ($gitlabURL) -}}
|
||||||
{{- with $gitLabData -}}
|
{{- with $gitLabData -}}
|
||||||
|
|
||||||
<a target="_blank" href="{{ .html_url }}" class="cursor-pointer">
|
<a id="{{ $id }}" target="_blank" href="{{ .web_url }}" class="cursor-pointer">
|
||||||
<div class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
|
<div class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
|
||||||
|
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hugo-blowfish-theme",
|
"name": "hugo-blowfish-theme",
|
||||||
"version": "2.55.0",
|
"version": "2.56.0",
|
||||||
"description": "Blowfish theme for Hugo",
|
"description": "Blowfish theme for Hugo",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "vendor-copy",
|
"postinstall": "vendor-copy",
|
||||||
|
|
Loading…
Reference in a new issue