Button component improvements

buttons with a `href` now render as <a> elements, otherwise <button>
This commit is contained in:
ari melody 2025-07-14 01:06:16 +01:00
parent d0163ee094
commit 77665702b7
Signed by: ari
GPG key ID: CF99829C92678188
4 changed files with 64 additions and 72 deletions

View file

@ -12,12 +12,12 @@
</script>
<div class={"post-header-container" + (reply ? " reply" : "")}>
<a href="/{$server.host}/{post.account.fqn}" class="post-avatar-container" on:mouseup|stopPropagation>
<a href="/{$server.host}/@{post.account.fqn}" class="post-avatar-container" on:mouseup|stopPropagation>
<img src={post.account.avatar_url} type={post.account.avatar_type} alt="" width="48" height="48" class="post-avatar" loading="lazy" decoding="async">
</a>
<header class="post-header">
<div class="post-user-info" on:mouseup|stopPropagation>
<a href="/{$server.host}/{post.account.fqn}" class="name">{@html post.account.rich_name}</a>
<a href="/{$server.host}/@{post.account.fqn}" class="name">{@html post.account.rich_name}</a>
<span class="username">{post.account.mention}</span>
</div>
<div class="post-info" on:mouseup|stopPropagation>