fix header generation

This commit is contained in:
tree🌴 2024-01-26 03:00:08 +01:00
parent efa0d7e2d7
commit 9ddda73c28
1 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,10 @@ const {banner, title, description} = Astro.props;
import cfonts from 'cfonts'; import cfonts from 'cfonts';
function genHeading(str) {
return cfonts.render(str + ' ', { font: '', maxLength: 5000 }, null, null, {width: "5000", height: "5000"}).string;
}
--- ---
<html lang="en"> <html lang="en">
<head> <head>
@ -88,7 +92,7 @@ import cfonts from 'cfonts';
<div class="middle-pane-medium mt-8 sm:mt-14 mb-2 sm:mb-8"> <div class="middle-pane-medium mt-8 sm:mt-14 mb-2 sm:mb-8">
<div class="leading-none flex justify-center text-[4px] sm:text-[8px] text-white"> <div class="leading-none flex justify-center text-[4px] sm:text-[8px] text-white">
{/*<img src="/page-events.png" class="h-8 sm:h-14" title="Events" />*/} {/*<img src="/page-events.png" class="h-8 sm:h-14" title="Events" />*/}
<pre><code>{cfonts.render(title + ' ', { font: '', maxLength: 2500 }).string}</code></pre> <pre><code class="font-mono layout-heading">{genHeading(title)}</code></pre>
</div> </div>
</div> </div>
} }