Blog post and style tweaks
This commit is contained in:
parent
ff56875de9
commit
73b2473c24
14 changed files with 67 additions and 35 deletions
|
|
@ -44,7 +44,7 @@
|
|||
<div>
|
||||
<!-- prettier-ignore -->
|
||||
{{ partial "responsive-image.html" (dict "src"
|
||||
"images/misc/thinkpad_t480s.jpg" "alt" "My Thinkpad T480s with stickerbomb" "width" "900x" "page" .) }}
|
||||
"images/misc/thinkpad_t480s.jpg" "alt" "My Thinkpad T480s with stickerbomb" "page" .) }}
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<!-- prettier-ignore -->
|
||||
{{ $src := .src }}
|
||||
{{ $alt := .alt | default "" }}
|
||||
{{ $width := .width | default "800x" }}
|
||||
{{ $width := or .width "800x800" }}
|
||||
|
||||
<figure class="blog-img-container">
|
||||
{{ with .page.Resources.GetMatch $src }}
|
||||
{{ $resized := .Resize $width }}
|
||||
{{ $resized := .Fit $width }}
|
||||
<img src="{{ $resized.RelPermalink }}" alt="{{ $alt }}" loading="lazy" class="blog-img" />
|
||||
{{ else }}
|
||||
{{ with resources.Get $src }}
|
||||
{{ $resized := .Resize $width }}
|
||||
{{ $resized := .Fit $width }}
|
||||
<img src="{{ $resized.RelPermalink }}" alt="{{ $alt }}" loading="lazy" class="blog-img" />
|
||||
{{ else }}
|
||||
<img src="{{ $src }}" alt="{{ $alt }}" loading="lazy" class="blog-img" />
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
loop
|
||||
muted
|
||||
playsinline
|
||||
style="position: relative; z-index: 4; max-width: 100%; height: auto"
|
||||
style="position: relative; z-index: 4; max-width: 100%; height: auto; border-radius: 12px; border: 3px solid transparent; background: linear-gradient(#000, #000) padding-box, linear-gradient(180deg, #0f0, #000) border-box;"
|
||||
>
|
||||
<source src="{{ .RelPermalink }}" type="{{ .MediaType }}" />
|
||||
</video>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue