Monorepo for Tangled tangled.org
2

Configure Feed

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

appview/strings: fix buttons alignment

Signed-off-by: eti <eti@eti.tf>

author
eti
committer
Tangled
date (May 29, 2026, 7:15 PM +0300) commit 12598efb parent 1f1b83e6
+28 -25
+28 -25
appview/pages/templates/strings/string.html
··· 30 30 </span> 31 31 </div> 32 32 33 - <div class="w-full sm:w-fit grid grid-cols-3 gap-2 z-auto"> 34 - {{ if and .LoggedInUser (eq .LoggedInUser.Did .String.Did) }} 35 - <a class="btn text-sm no-underline hover:no-underline flex items-center gap-2 group" 36 - hx-boost="true" 37 - href="/strings/{{ .String.Did }}/{{ .String.Rkey }}/edit"> 38 - {{ i "pencil" "w-4 h-4" }} 39 - <span class="hidden md:inline">Edit</span> 40 - {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 41 - </a> 42 - <button 43 - class="btn text-sm text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 flex items-center gap-2 group" 44 - title="Delete string" 45 - hx-delete="/strings/{{ .String.Did }}/{{ .String.Rkey }}/" 46 - hx-swap="none" 47 - hx-confirm="Are you sure you want to delete the string `{{ .String.Filename }}`?" 48 - > 49 - {{ i "trash-2" "w-4 h-4" }} 50 - <span class="hidden md:inline">Delete</span> 51 - {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 52 - </button> 53 - {{ end }} 54 - {{ template "fragments/starBtn" 55 - (dict "SubjectAt" .String.AtUri 56 - "IsStarred" .IsStarred 57 - "StarCount" .StarCount) }} 33 + {{ $isOwner := and .LoggedInUser (eq .LoggedInUser.Did .String.Did) }} 34 + <div class="w-fit grid grid-flow-col grid-cols-3 gap-2"> 35 + {{ if $isOwner }} 36 + <a class="btn no-underline hover:no-underline group" 37 + hx-boost="true" 38 + href="/strings/{{ .String.Did }}/{{ .String.Rkey }}/edit"> 39 + {{ i "pencil" "w-4 h-4" }} 40 + <span class="hidden md:inline">Edit</span> 41 + {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 42 + </a> 43 + <button 44 + class="btn text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 group" 45 + title="Delete string" 46 + hx-delete="/strings/{{ .String.Did }}/{{ .String.Rkey }}/" 47 + hx-swap="none" 48 + hx-confirm="Are you sure you want to delete the string `{{ .String.Filename }}`?" 49 + > 50 + {{ i "trash-2" "w-4 h-4" }} 51 + <span class="hidden md:inline">Delete</span> 52 + {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 53 + </button> 54 + {{ end }} 55 + <div class="{{ if not $isOwner }}col-span-3 justify-self-end{{ end }}"> 56 + {{ template "fragments/starBtn" 57 + (dict "SubjectAt" .String.AtUri 58 + "IsStarred" .IsStarred 59 + "StarCount" .StarCount) }} 60 + </div> 58 61 </div> 59 62 </div> 60 63 </section>