github.com/ngsalvo/datastar-rick-and-morty@v0.0.0-20250318143428-01c52f047cfc/web/layouts/page.templ (about) 1 package layouts 2 3 templ head(title string) { 4 <head> 5 <meta charset="UTF-8"/> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"/> 7 <script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar/bundles/datastar.js"></script> 8 <title>{ title }</title> 9 <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon"/> 10 <link rel="stylesheet" href="/static/styles/styles.css" type="text/css"/> 11 <link rel="preconnect" href="https://fonts.googleapi.com"/> 12 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/> 13 </head> 14 } 15 16 templ Page(title string) { 17 <!DOCTYPE html> 18 <html lang="en" class="h-screen max-h-screen bg-ctp-base"> 19 @head(title) 20 <body class="h-screen isolate bg-background text-text"> 21 <div class="w-full h-full overflow-y-scroll"> 22 <main> 23 { children... } 24 </main> 25 </div> 26 <pre data-text="ctx.signals.JSON()"></pre> 27 </body> 28 </html> 29 }