2024-10-07 20:13:38 -04:00
|
|
|
// Code generated by templ - DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
// templ: version: v0.2.778
|
2024-10-09 14:16:53 -04:00
|
|
|
package styles
|
2024-10-07 20:13:38 -04:00
|
|
|
|
|
|
|
|
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
|
|
|
|
|
|
|
|
|
import "github.com/a-h/templ"
|
|
|
|
|
import templruntime "github.com/a-h/templ/runtime"
|
|
|
|
|
|
|
|
|
|
const (
|
2024-10-07 20:24:18 -04:00
|
|
|
PublicOrigin = "https://cdn.sonr.id"
|
2024-10-07 20:13:38 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
stylesHandle = templ.NewOnceHandle()
|
|
|
|
|
alpineHandle = templ.NewOnceHandle()
|
2024-10-07 20:24:18 -04:00
|
|
|
dexieHandle = templ.NewOnceHandle()
|
2024-10-07 20:13:38 -04:00
|
|
|
htmxHandle = templ.NewOnceHandle()
|
|
|
|
|
)
|
|
|
|
|
|
2024-10-10 13:44:17 -04:00
|
|
|
func Fonts() templ.Component {
|
2024-10-07 20:13:38 -04:00
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
|
return templ_7745c5c3_CtxErr
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
|
|
|
if !templ_7745c5c3_IsBuffer {
|
|
|
|
|
defer func() {
|
|
|
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err == nil {
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
|
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var1 == nil {
|
|
|
|
|
templ_7745c5c3_Var1 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
2024-10-10 13:44:17 -04:00
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<link rel=\"preload\" href=\"https://cdn.sonr.id/fonts/ZTBrosOskon90s-BoldSemExp.woff2\" as=\"font\" type=\"font/woff2\" crossorigin><link rel=\"preload\" href=\"https://cdn.sonr.id/fonts/ZTBrosOskon90s-BoldSemExpIta.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func Styles() templ.Component {
|
|
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
|
return templ_7745c5c3_CtxErr
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
|
|
|
if !templ_7745c5c3_IsBuffer {
|
|
|
|
|
defer func() {
|
|
|
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err == nil {
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
|
templ_7745c5c3_Var2 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var2 == nil {
|
|
|
|
|
templ_7745c5c3_Var2 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
2024-10-09 00:37:50 -04:00
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<link href=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
2024-10-07 20:13:38 -04:00
|
|
|
return templ_7745c5c3_Err
|
2024-10-09 00:37:50 -04:00
|
|
|
}
|
2024-10-10 13:44:17 -04:00
|
|
|
var templ_7745c5c3_Var3 string
|
|
|
|
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/css/styles.css")
|
2024-10-09 00:37:50 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
2024-10-21 11:30:52 -04:00
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/scripts.templ`, Line: 20, Col: 50}
|
2024-10-09 00:37:50 -04:00
|
|
|
}
|
2024-10-10 13:44:17 -04:00
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
2024-10-09 00:37:50 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" rel=\"stylesheet\">")
|
2024-10-07 20:13:38 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func Alpine() templ.Component {
|
|
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
|
return templ_7745c5c3_CtxErr
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
|
|
|
if !templ_7745c5c3_IsBuffer {
|
|
|
|
|
defer func() {
|
|
|
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err == nil {
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
2024-10-10 13:44:17 -04:00
|
|
|
templ_7745c5c3_Var4 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var4 == nil {
|
|
|
|
|
templ_7745c5c3_Var4 = templ.NopComponent
|
2024-10-07 20:13:38 -04:00
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
2024-10-09 00:37:50 -04:00
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script src=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
2024-10-07 20:13:38 -04:00
|
|
|
return templ_7745c5c3_Err
|
2024-10-09 00:37:50 -04:00
|
|
|
}
|
2024-10-10 13:44:17 -04:00
|
|
|
var templ_7745c5c3_Var5 string
|
2024-10-15 14:31:19 -04:00
|
|
|
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/alpine-focus.min.js")
|
2024-10-09 00:37:50 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
2024-10-21 11:30:52 -04:00
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/scripts.templ`, Line: 24, Col: 59}
|
2024-10-09 00:37:50 -04:00
|
|
|
}
|
2024-10-10 13:44:17 -04:00
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
2024-10-09 00:37:50 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
2024-10-15 14:31:19 -04:00
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" defer></script><script src=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var6 string
|
|
|
|
|
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/alpine.min.js")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
2024-10-21 11:30:52 -04:00
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/scripts.templ`, Line: 25, Col: 53}
|
2024-10-15 14:31:19 -04:00
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
2024-10-09 00:37:50 -04:00
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" defer></script>")
|
2024-10-07 20:13:38 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-07 20:24:18 -04:00
|
|
|
func Dexie() templ.Component {
|
2024-10-07 20:13:38 -04:00
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
|
return templ_7745c5c3_CtxErr
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
|
|
|
if !templ_7745c5c3_IsBuffer {
|
|
|
|
|
defer func() {
|
|
|
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err == nil {
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
2024-10-15 14:31:19 -04:00
|
|
|
templ_7745c5c3_Var7 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var7 == nil {
|
|
|
|
|
templ_7745c5c3_Var7 = templ.NopComponent
|
2024-10-07 20:13:38 -04:00
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
2024-10-09 00:37:50 -04:00
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script src=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
2024-10-07 20:13:38 -04:00
|
|
|
return templ_7745c5c3_Err
|
2024-10-09 00:37:50 -04:00
|
|
|
}
|
2024-10-15 14:31:19 -04:00
|
|
|
var templ_7745c5c3_Var8 string
|
|
|
|
|
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/dexie.min.js")
|
2024-10-09 00:37:50 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
2024-10-21 11:30:52 -04:00
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/scripts.templ`, Line: 29, Col: 52}
|
2024-10-09 00:37:50 -04:00
|
|
|
}
|
2024-10-15 14:31:19 -04:00
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
2024-10-09 00:37:50 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"></script>")
|
2024-10-07 20:24:18 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func Htmx() templ.Component {
|
|
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
|
return templ_7745c5c3_CtxErr
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
|
|
|
if !templ_7745c5c3_IsBuffer {
|
|
|
|
|
defer func() {
|
|
|
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err == nil {
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
2024-10-15 14:31:19 -04:00
|
|
|
templ_7745c5c3_Var9 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var9 == nil {
|
|
|
|
|
templ_7745c5c3_Var9 = templ.NopComponent
|
2024-10-07 20:24:18 -04:00
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
2024-10-09 00:37:50 -04:00
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script src=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
2024-10-15 14:31:19 -04:00
|
|
|
var templ_7745c5c3_Var10 string
|
|
|
|
|
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/htmx.min.js")
|
2024-10-09 00:37:50 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
2024-10-21 11:30:52 -04:00
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/scripts.templ`, Line: 33, Col: 51}
|
2024-10-09 00:37:50 -04:00
|
|
|
}
|
2024-10-15 14:31:19 -04:00
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
2024-10-09 00:37:50 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
2024-10-07 20:24:18 -04:00
|
|
|
return templ_7745c5c3_Err
|
2024-10-09 00:37:50 -04:00
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"></script>")
|
2024-10-07 20:13:38 -04:00
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-15 14:31:19 -04:00
|
|
|
func Toaster() templ.Component {
|
|
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
|
return templ_7745c5c3_CtxErr
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
|
|
|
if !templ_7745c5c3_IsBuffer {
|
|
|
|
|
defer func() {
|
|
|
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err == nil {
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
|
templ_7745c5c3_Var11 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var11 == nil {
|
|
|
|
|
templ_7745c5c3_Var11 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div x-data=\"{ \n title: 'Default Toast Notification', \n description: '',\n type: 'default',\n position: 'top-center',\n expanded: false,\n popToast (custom){\n let html = '';\n if(typeof custom != 'undefined'){\n html = custom;\n }\n toast(this.title, { description: this.description, type: this.type, position: this.position, html: html })\n }\n }\" x-init=\"\n window.toast = function(message, options = {}){\n let description = '';\n let type = 'default';\n let position = 'top-center';\n let html = '';\n if(typeof options.description != 'undefined') description = options.description;\n if(typeof options.type != 'undefined') type = options.type;\n if(typeof options.position != 'undefined') position = options.position;\n if(typeof options.html != 'undefined') html = options.html;\n window.dispatchEvent(new CustomEvent('toast-show', { detail : { type: type, message: message, description: description, position : position, html: html }}));\n }\n \">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_Var11.Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-07 20:13:38 -04:00
|
|
|
var _ = templruntime.GeneratedTemplate
|