mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
Merge branch 'main' into main
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
|
||||
<div class="flex flex-row flex-wrap items-center">
|
||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||
{{ if not (eq $taxonomy "authors")}}
|
||||
{{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series"))}}
|
||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||
{{ range $context.GetTerms $taxonomy }}
|
||||
<span style="margin-top:0.5rem" class="mr-2" onclick="window.open({{ .RelPermalink }});">
|
||||
|
||||
@@ -43,11 +43,13 @@
|
||||
|
||||
</div>
|
||||
<script>
|
||||
{{ if not .Site.Params.disableImageZoom | default true }}
|
||||
mediumZoom(document.querySelectorAll("img:not(.nozoom)"), {
|
||||
margin: 24,
|
||||
background: 'rgba(0,0,0,0.5)',
|
||||
scrollOffset: 0,
|
||||
})
|
||||
{{ end }}
|
||||
</script>
|
||||
{{ $jsProcess := resources.Get "js/process.js" }}
|
||||
{{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint "sha512" }}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
{{- with $featured -}}
|
||||
{{ with .Resize "1200x" }}
|
||||
<div id="hero" class="relative h-[45vh] single_hero_background nozoom" style="background-image:url({{ .RelPermalink }});">
|
||||
<div id="hero" class="relative h-[300px] single_hero_background nozoom" style="background-image:url({{ .RelPermalink }});">
|
||||
<div class="hero_gradient bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -4,15 +4,20 @@
|
||||
<div class="mx-auto max-w-7xl p-0">
|
||||
<div class="relative sm:overflow-hidden">
|
||||
<div class="absolute inset-0">
|
||||
<img class="h-full w-full object-cover m-0 nozoom" src="{{ .Site.Params.homepage.homepageImage }}">
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ $homepageImage := resources.Get . }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="h-full w-full object-cover m-0 nozoom" src="{{ $homepageImage.RelPermalink }}">
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-t from-neutral-100 dark:from-neutral-800 to-transparent dark:to-neutral-300 mix-blend-normal dark:mix-blend-multiply">
|
||||
</div>
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center">
|
||||
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center justify-center text-center">
|
||||
{{ with .Site.Author.image }}
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ if $authorImage }}
|
||||
|
||||
@@ -14,8 +14,13 @@
|
||||
</div>
|
||||
<div class="mt-6 sm:mt-16 lg:mt-0">
|
||||
<div class="-mr-48 pl-4 sm:pl-6 md:-mr-16 lg:relative lg:m-0 lg:h-full lg:px-0">
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ $homepageImage := resources.Get . }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="w-full rounded-xl shadow-xl lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
|
||||
src="{{ .Site.Params.homepage.homepageImage }}">
|
||||
src="{{ $homepageImage.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,12 +4,17 @@
|
||||
<div class="mx-auto max-w-7xl p-0">
|
||||
<div class="relative shadow-xl sm:overflow-hidden rounded-2xl">
|
||||
<div class="absolute inset-0">
|
||||
<img class="h-full w-full object-cover m-0 nozoom" src="{{ .Site.Params.homepage.homepageImage }}">
|
||||
{{ with .Site.Params.homepage.homepageImage }}
|
||||
{{ $homepageImage := resources.Get . }}
|
||||
{{ if $homepageImage }}
|
||||
<img class="h-full w-full object-cover m-0 nozoom" src="{{ $homepageImage.RelPermalink }}">
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-700 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center">
|
||||
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center justify-center text-center">
|
||||
{{ with .Site.Author.image }}
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ if $authorImage }}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<span>
|
||||
<span id="likes_{{ .File.Path }}" title="likes">{{- i18n "article.likes" 0 | markdownify | emojify -}}</span>
|
||||
<span id="likes_{{ .File.Path }}" title="likes">0</span>
|
||||
<span>{{ partial "icon.html" "heart" }}</span>
|
||||
</span>
|
||||
{{- /* Trim EOF */ -}}
|
||||
@@ -1,4 +1,5 @@
|
||||
<span id="views_{{ .File.Path }}" title="views">
|
||||
{{- i18n "article.views" 0 | markdownify | emojify -}}
|
||||
<span>
|
||||
<span id="views_{{ .File.Path }}" title="views">0</span>
|
||||
<span>{{ partial "icon.html" "eye" }}</span>
|
||||
</span>
|
||||
{{- /* Trim EOF */ -}}
|
||||
|
||||
24
layouts/partials/series.html
Normal file
24
layouts/partials/series.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{{ 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 }}>
|
||||
<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.
|
||||
</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
|
||||
</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}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
</details>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user