Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/corporate-modernist. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
45 lines
1.4 KiB
Plaintext
45 lines
1.4 KiB
Plaintext
package main
|
|
|
|
// logoStripComponent renders the corporate-modernist:logo_strip block.
|
|
templ logoStripComponent(data LogoStripData) {
|
|
<section class="cm-section" data-block="corporate-modernist:logo_strip">
|
|
<div class="cm-content-well">
|
|
if data.Caption != "" {
|
|
<p class="cm-stat-label" style="text-align: center; margin-bottom: 2rem;">{ data.Caption }</p>
|
|
}
|
|
if len(data.Logos) > 0 {
|
|
<div style="display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2.5rem;">
|
|
for _, logo := range data.Logos {
|
|
if logo.Href != "" {
|
|
<a href={ templ.SafeURL(logo.Href) } class="cm-logo" style="display: inline-flex; align-items: center;">
|
|
@logoStripImage(logo)
|
|
</a>
|
|
} else {
|
|
<span class="cm-logo" style="display: inline-flex; align-items: center;">
|
|
@logoStripImage(logo)
|
|
</span>
|
|
}
|
|
}
|
|
</div>
|
|
} else {
|
|
<p class="cm-stat-label" style="text-align: center;">No client logos configured.</p>
|
|
}
|
|
</div>
|
|
</section>
|
|
}
|
|
|
|
templ logoStripImage(logo LogoStripItem) {
|
|
if logo.Src != "" {
|
|
<img src={ logo.Src } alt={ logoStripAlt(logo) } style="max-height: 2rem; width: auto; display: block;"/>
|
|
} else {
|
|
<span class="cm-stat-label" style="margin: 0;">{ logoStripAlt(logo) }</span>
|
|
}
|
|
}
|
|
|
|
func logoStripAlt(logo LogoStripItem) string {
|
|
if logo.Alt != "" {
|
|
return logo.Alt
|
|
}
|
|
return "Client logo"
|
|
}
|