This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / appview / pages / templates / timeline / fragments / newsletterForm.html
1.5 kB 45 lines
1{{ define "timeline/fragments/newsletterForm" }} 2 {{ $id := .Id }} 3 {{ $variant := .Variant }} 4 {{ if eq $variant "hero" }} 5 <form 6 class="flex gap-2 items-stretch w-full md:max-w-md mx-auto p-2 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 rounded shadow-sm" 7 hx-post="/newsletter/signup" 8 hx-target="#newsletter-msg-{{ $id }}" 9 hx-swap="outerHTML" 10 hx-vals='{"target":"{{ $id }}"}'> 11 <span id="newsletter-msg-{{ $id }}" class="flex gap-2 items-stretch flex-1 min-w-0"> 12 <input 13 type="email" 14 name="email" 15 tabindex="4" 16 required 17 placeholder="Enter your email" 18 class="py-2 w-full" /> 19 <button class="btn-create flex items-center gap-2 text-base whitespace-nowrap" type="submit"> 20 subscribe 21 {{ i "arrow-right" "size-4" }} 22 </button> 23 </span> 24 </form> 25 {{ else }} 26 <form 27 hx-post="/newsletter/signup" 28 hx-target="#newsletter-msg-{{ $id }}" 29 hx-swap="outerHTML" 30 hx-vals='{"target":"{{ $id }}"}'> 31 <span id="newsletter-msg-{{ $id }}" class="flex items-stretch gap-2"> 32 <input 33 type="email" 34 name="email" 35 placeholder="your@email.com" 36 required 37 class="flex-1 min-w-0 text-sm py-2" /> 38 <button type="submit" class="btn whitespace-nowrap px-4 pb-0 gap-2"> 39 {{ i "mail-plus" "size-4 inline" }} 40 subscribe 41 </button> 42 </span> 43 </form> 44 {{ end }} 45{{ end }}