1
0
mirror of git://f0xx.org/ac/ac-platform-php synced 2026-08-12 18:13:05 +03:00

Add global FOR SALE corner badge linking to Contact us page.

Rendered from platform_render_footer() on all consoles and hub: white
background, double red border with 1px gap, -45deg ribbon, per-letter rotation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-08-05 11:40:05 +02:00
parent dafa15808c
commit 8f2de348b5

View File

@@ -240,4 +240,34 @@ function platform_render_footer(array $opts = []): void
}
echo '</footer>';
platform_render_for_sale_badge($opts);
}
/** Bottom-right “FOR SALE” ribbon → Contact us (landing page 12). */
function platform_render_for_sale_badge(array $opts = []): void
{
if (array_key_exists('for_sale_badge', $opts) && !$opts['for_sale_badge']) {
return;
}
$cfg = platform_footer_config();
if (array_key_exists('for_sale_badge', $cfg) && !$cfg['for_sale_badge']) {
return;
}
$url = trim((string) ($opts['for_sale_badge_url'] ?? ($cfg['for_sale_badge_url'] ?? '')));
if ($url === '') {
$url = 'https://apps.f0xx.org/app/androidcast_project/?page=12';
}
echo '<a href="' . platform_footer_h($url) . '" class="platform-for-sale-badge"'
. ' title="Contact us" aria-label="For sale — contact us">';
echo '<span class="platform-for-sale-badge__outer">';
echo '<span class="platform-for-sale-badge__inner">';
echo '<span class="platform-for-sale-badge__letters" aria-hidden="true">';
foreach (str_split('FOR SALE') as $ch) {
if ($ch === ' ') {
echo '<span class="platform-for-sale-badge__space"></span>';
continue;
}
echo '<span class="platform-for-sale-badge__letter">' . platform_footer_h($ch) . '</span>';
}
echo '</span></span></span></a>';
}