2024-04-08 21:50:52 +07:00
|
|
|
package components
|
|
|
|
|
|
|
|
import "github.com/tigorlazuardi/redmage/views"
|
|
|
|
|
2024-04-09 21:49:23 +07:00
|
|
|
templ Head(vc *views.Context, extras ...templ.Component) {
|
2024-04-08 21:50:52 +07:00
|
|
|
<head>
|
2024-05-04 19:39:02 +07:00
|
|
|
<script>
|
|
|
|
document.querySelector('html').dataset.theme = localStorage.getItem('theme') || '';
|
|
|
|
</script>
|
2024-04-08 21:50:52 +07:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
|
|
<meta name="keywords" content="Reddit, Image, Downloader"/>
|
|
|
|
<link rel="stylesheet" href="/public/style.css"/>
|
|
|
|
<link rel="icon" href="/public/favicon.svg"/>
|
2024-05-01 16:10:04 +07:00
|
|
|
@Dayjs(vc)
|
2024-05-01 15:51:52 +07:00
|
|
|
@HTMX(vc)
|
2024-05-07 16:48:15 +07:00
|
|
|
@AlpineJS(vc)
|
2024-04-08 21:50:52 +07:00
|
|
|
if vc.Config.Bool("http.hotreload") {
|
|
|
|
<script src="/public/hot_reload.js"></script>
|
|
|
|
}
|
2024-04-09 21:49:23 +07:00
|
|
|
for _, extra := range extras {
|
|
|
|
@extra
|
|
|
|
}
|
2024-04-08 21:50:52 +07:00
|
|
|
</head>
|
|
|
|
}
|
2024-04-09 21:49:23 +07:00
|
|
|
|
|
|
|
templ HeadTitle(name string) {
|
2024-04-28 22:00:56 +07:00
|
|
|
<title>{ name }</title>
|
|
|
|
}
|