Support multi-paragraph host bios on detail page; v2.0.23
Publish Container / docker (push) Successful in 13m57s
Publish Container / docker (push) Successful in 13m57s
Split bio on blank lines to render each paragraph as its own <p> tag. Also grows the admin textarea from 3 to 8 rows so long bios are easier to write and review. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
7ff5c453e8
commit
b999a2fe86
3 files changed
+5
-3
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "siteforge",
|
"name": "siteforge",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.0.22",
|
"version": "2.0.23",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
+1
-1
@@ -5091,7 +5091,7 @@ async function handleAssetUpload(event: ChangeEvent<HTMLInputElement>) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="admin-field">
|
<div className="admin-field">
|
||||||
<label>Bio</label>
|
<label>Bio</label>
|
||||||
<textarea rows={3} value={host.bio} onChange={e => updateHost(host.id, { bio: e.target.value })} />
|
<textarea rows={8} value={host.bio} onChange={e => updateHost(host.id, { bio: e.target.value })} />
|
||||||
</div>
|
</div>
|
||||||
<div className="admin-field">
|
<div className="admin-field">
|
||||||
<label>Photo</label>
|
<label>Photo</label>
|
||||||
|
|||||||
+3
-1
@@ -2023,7 +2023,9 @@ function NuggetsHostDetailPage({ content }: { content: SiteContent }) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="nuggets-host-detail-body">
|
<div className="nuggets-host-detail-body">
|
||||||
{host.bio && <p className="nuggets-host-detail-bio">{host.bio}</p>}
|
{host.bio && host.bio.split(/\n\n+/).map((para, i) => (
|
||||||
|
<p key={i} className="nuggets-host-detail-bio">{para.replace(/\n/g, ' ')}</p>
|
||||||
|
))}
|
||||||
{(nuggets.spotifyUrl || nuggets.appleUrl) && (
|
{(nuggets.spotifyUrl || nuggets.appleUrl) && (
|
||||||
<div className="nuggets-host-detail-listen">
|
<div className="nuggets-host-detail-listen">
|
||||||
<p className="eyebrow" style={{ marginBottom: '0.75rem' }}>Listen to {nuggets.title}</p>
|
<p className="eyebrow" style={{ marginBottom: '0.75rem' }}>Listen to {nuggets.title}</p>
|
||||||
|
|||||||
Reference in new issue
Block a user