feat: update blog pages
This commit is contained in:
14
layouts/partials/content/card-image.html
Normal file
14
layouts/partials/content/card-image.html
Normal file
@ -0,0 +1,14 @@
|
||||
{{ $fillImage := .Scratch.Get "fillImage" }}
|
||||
{{ if not $fillImage -}}
|
||||
{{ $fillImage = site.Params.fillImage }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) }}
|
||||
{{ if not $image -}}
|
||||
{{ $image = resources.Get (printf "%s%s" "images/" site.Params.defaultImage) }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $image = $image.Fill $fillImage }}
|
||||
{{ $lqip := $image.Resize site.Params.lqipWidth -}}
|
||||
|
||||
<img class="card-img-top img-fluid lazyload blur-up" src="{{ $lqip.Permalink }}" data-src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}">
|
@ -53,7 +53,7 @@
|
||||
{{- $active := or ($current.IsMenuCurrent "main" .) ($current.HasMenuCurrent "main" .) -}}
|
||||
{{- $active = or $active (eq .Name $current.Title) -}}
|
||||
{{- $active = or $active (and (eq .Name ($section | humanize)) (eq $current.Section $section)) -}}
|
||||
{{- $active = or $active (and (eq .Name "Blog") (eq $current.Section "blog" "contributors")) -}}
|
||||
{{- $active = or $active (and (eq .Name "Blog") (eq $current.Section "blog" "contributors" "categories" "tags")) -}}
|
||||
{{ if .HasChildren }}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle ps-0 py-1" href="#" id="navbarDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
|
Reference in New Issue
Block a user