56 lines
1.3 KiB
Text
56 lines
1.3 KiB
Text
package templates
|
|
|
|
import "io"
|
|
import "context"
|
|
|
|
// Render renders a component to an io.Writer
|
|
func Render(w io.Writer, component templ.Component) error {
|
|
return component.Render(context.Background(), w)
|
|
}
|
|
|
|
// Layout is the base layout for all pages
|
|
templ Layout(title string) {
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<title>{ title }</title>
|
|
<link
|
|
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css"
|
|
rel="stylesheet"
|
|
/>
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css"
|
|
/>
|
|
<style>
|
|
body {
|
|
padding-top: 20px;
|
|
background-color: #f8f9fa;
|
|
}
|
|
.card {
|
|
margin-bottom: 20px;
|
|
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
|
}
|
|
.config-warning {
|
|
margin-bottom: 20px;
|
|
}
|
|
.toast-container {
|
|
position: fixed;
|
|
top: 20px;
|
|
right: 20px;
|
|
z-index: 1050;
|
|
}
|
|
.update-badge {
|
|
font-size: 0.8em;
|
|
margin-left: 10px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
{ children... }
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|
|
}
|