feat: add image border as query param

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2023-09-21 17:31:43 +02:00
parent 2b3e2cb8d5
commit 26ee37b52a
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
{{ $params := (urls.Parse $imagePath).Query }}
{{ $width := index $params "w" }}
{{ $height := index $params "h" }}
{{ $border := index $params "border" }}
<div
@ -23,7 +24,7 @@
height="{{ index . 0 }}"
{{ end }}
{{ with .Title }}title="{{ . }}"{{ end }}
class="rounded mx-auto"
class="rounded mx-auto{{ with $border }} border border-divider-light dark:border-divider-dark{{end}}"
/>
<template x-teleport="body">
<div