chore: gitignore generated _templ.go files, track .templ sources
Generated _templ.go files are deterministic output from .templ sources, same as output.css from input.css. Remove them from version control to reduce diff noise and merge conflicts. Add build:templ and live:templ tasks to the Taskfile so generation happens as part of the build.
This commit is contained in:
21
features/common/layouts/base.templ
Normal file
21
features/common/layouts/base.templ
Normal file
@@ -0,0 +1,21 @@
|
||||
package layouts
|
||||
|
||||
import "github.com/ryanhamamura/c4/config"
|
||||
|
||||
templ Base(title string) {
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{ title }</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
|
||||
<script defer type="module" src="/assets/js/datastar.js"></script>
|
||||
<link href="/assets/css/output.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body class="flex flex-col h-screen">
|
||||
if config.Global.Environment == config.Dev {
|
||||
<div data-init="@get('/reload', {retryMaxCount: 1000, retryInterval:20, retryMaxWaitMs:200})"></div>
|
||||
}
|
||||
{ children... }
|
||||
</body>
|
||||
</html>
|
||||
}
|
||||
Reference in New Issue
Block a user