Reaction Button Styling

This commit is contained in:
Chiara 2026-11-08 17:53:48 +01:00
parent 11cba5caf0
commit 1bdc48f5c9
3 changed files with 30 additions and 19 deletions

View file

@ -24,7 +24,7 @@ export default function Reaction({ slug }: { slug: string }) {
}) })
setReaction(prev => ({ ...prev, browser_id: browserId })) setReaction(prev => ({ ...prev, browser_id: browserId }))
}, []) }, [])
const handleReaction = () => { const handleReaction = () => {
let hasError = false let hasError = false
@ -51,8 +51,17 @@ export default function Reaction({ slug }: { slug: string }) {
return ( return (
<button onClick={handleReaction}> <button onClick={handleReaction}
{haveReacted ? "♥" : "🧭"} {reactionCount}
style="
font-size: 1rem;
width: 100%;
padding:8px;
font-family:Arial, Helvetica, sans-serif;
">
{haveReacted ? "♥ Yeah!" : "Hattest du Spaß beim Lesen?"} {reactionCount}
</button> </button>
) )
} }

View file

@ -30,12 +30,14 @@ const localeDate = formatLocalizedDateString(postData.date);
<h3 id="subtitle">{postData.subtitle}</h3> <h3 id="subtitle">{postData.subtitle}</h3>
<span id="introduction">{postData.introduction}</span> <span id="introduction">{postData.introduction}</span>
</div> </div>
<Reaction slug={postData.slug} client:load />
<div id="hr-knast"> <div id="hr-knast">
<hr /> <hr />
</div> </div>
<article class="markdown-content"> <article class="markdown-content">
<slot /> <slot />
<div id="react">
<Reaction slug={postData.slug} client:load />
</div>
<NavBack client:load /> <NavBack client:load />
<p class="disclaimer"> <p class="disclaimer">
Disclaimer: Dieser Artikel ist ausschließlich privat und wird nicht Disclaimer: Dieser Artikel ist ausschließlich privat und wird nicht

View file

@ -58,7 +58,7 @@ body {
font-weight: bolder; font-weight: bolder;
cursor: pointer; cursor: pointer;
font-size: 1rem; font-size: 1rem;
padding: 12px 12px 12px 0; padding: 48px 12px 12px 0;
} }
.back-btn:hover { .back-btn:hover {