Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/editorial. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
package main
|
|
|
|
// bylineComponent renders the byline. When showPhoto is true and an author
|
|
// slug is supplied, a neutral avatar circle is rendered (the actual avatar
|
|
// URL would be resolved server-side by the CMS author directory). When the
|
|
// dateline is empty the dateline cell is suppressed.
|
|
templ bylineComponent(data BylineData) {
|
|
<div class="editorial-column" data-block="editorial:byline">
|
|
<div class="editorial-byline">
|
|
if data.ShowPhoto && data.AuthorSlug != "" {
|
|
<div class="editorial-byline-photo" aria-hidden="true"></div>
|
|
}
|
|
<div class="flex-1">
|
|
if data.AuthorSlug != "" {
|
|
<div class="editorial-byline-author">
|
|
{ "By " }{ data.AuthorSlug }
|
|
</div>
|
|
} else {
|
|
<div class="editorial-byline-author">
|
|
{ "By Editorial Staff" }
|
|
</div>
|
|
}
|
|
<div class="editorial-byline-meta">
|
|
if data.Dateline != "" {
|
|
<span>{ data.Dateline }</span>
|
|
}
|
|
if data.ShowReadTime {
|
|
if data.Dateline != "" {
|
|
<span class="px-1">·</span>
|
|
}
|
|
<span>{ "5 min read" }</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|