Files
sonr/internal/gui/elements/global.templ
T
228adb7f93 master -> develop (#20)
* Squash merge develop into master

* feat: add automated production release workflow

* feat: add Gitflow workflow for syncing branches

* ci: update workflow runner to latest ubuntu version

* feat: enable buf.build publishing on master and develop branches

---------

Co-authored-by: Prad Nukala <prad@sonr.io>
2024-09-23 12:39:59 -04:00

55 lines
1.3 KiB
Templ

package elements
templ Layout(title string) {
<!DOCTYPE html>
<html>
<head>
@defaultStyles()
<title>{ title }</title>
</head>
<body class="flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4">
<main class="flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3">
{ children... }
</main>
</body>
</html>
}
templ Spacer() {
<br/>
}
templ ServiceWorker(path string) {
<script>
navigator.serviceWorker.register({ path })
</script>
}
templ defaultStyles() {
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<script src="https://cdn.sonr.io/js/htmx.min.js"></script>
<link href="https://cdn.sonr.io/stylesheet.css" rel="stylesheet"/>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/alpinejs" defer></script>
<style>[x-cloak]{display:none}</style>
<style>font-family: R-Flex, system-ui, Inter, Helvetica, Arial, sans-serif;</style>
}
templ Rows() {
<div class="flex flex-row w-full gap-2 md:gap-4">
{ children... }
</div>
}
templ Columns() {
<div class="flex flex-col h-full w-full gap-3 md:gap-6 md:flex-row">
{ children... }
</div>
}
css main() {
font-family: R-Flex, system-ui, Avenir, Helvetica, Arial, sans-serif;
}