1
0
mirror of https://github.com/axzilla/templui.git synced 2025-02-23 20:03:42 +00:00
templui/pkg/components/sidebar_right_templ.go
“axzilla” b290a2a7ff change: Improve icon implementation and documentation
- Add link to Lucide in documentation
- Implement icon names as constants for autocomplete
- Optimize icon storage for more efficient resource usage

These changes enhance usability through improved documentation
and autocomplete functionality, while also improving memory
efficiency by optimizing icon storage.
2024-10-11 13:43:24 +02:00

139 lines
6.3 KiB
Go

// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778
package components
//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"
import "github.com/axzilla/goilerplate/pkg/icons"
type SidebarRightLItem struct {
ImageSrc string
Url string
Text string
}
var SidebarRightLinks = []SidebarRightLItem{
{
ImageSrc: "https://templ.guide/img/logo.svg",
Url: "https://templ.guide",
Text: "Elevate your Go projects with type-safe, efficient HTML templating.",
},
{
ImageSrc: "https://alpinejs.dev/alpine_long.svg",
Url: "https://alpinejs.dev",
Text: "Simplify your JavaScript with a lightweight, powerful framework.",
},
{
ImageSrc: "https://tailwindcss.com/_next/static/media/tailwindcss-logotype-white.944c5d0ef628083bb316f9b3d643385c86bcdb3d.svg",
Url: "https://tailwindcss.com",
Text: "Create beautiful, responsive designs with ease.",
},
}
func SidebarRight() 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_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<aside class=\"border-l border-border flex flex-col w-64 h-full p-6\"><h3 class=\"text-sm font-bold text-muted-foreground\">Our Friends</h3>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for i, link := range SidebarRightLinks {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 templ.SafeURL = templ.SafeURL(link.Url)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var2)))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" target=\"_blank\" class=\"relative opacity-80 hover:opacity-100 py-6 flex flex-col items-start justify-between overflow-hidden group\"><span class=\"flex items-center justify-between w-full mb-3\"><img src=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(link.ImageSrc)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/components/sidebar_right.templ`, Line: 35, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" alt=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(link.Text)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/components/sidebar_right.templ`, Line: 35, Col: 47}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" class=\"relative h-5 md:h-6\"></span> <span class=\"relative text-xs text-muted-foreground group-hover:text-foreground md:text-sm\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(link.Text)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/components/sidebar_right.templ`, Line: 37, Col: 107}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</span> <span class=\"flex justify-start w-full\"><span class=\"relative inline-block mt-2 overflow-hidden text-xs font-medium text-muted-foreground group-hover:text-foreground\"><span class=\"absolute bottom-0 block w-full transition duration-150 ease-out transform -translate-x-full border-b border-foreground opacity-0 group-hover:translate-x-0 group-hover:opacity-100\"></span> <span class=\"\">View Website</span></span></span></a> ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if i < len(SidebarRightLinks)-1 {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<hr class=\"border-t border-border\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"border border-border rounded-lg p-4 bg-muted/50 hover:bg-muted transition-colors duration-300\"><h4 class=\"text-sm font-medium text-foreground mb-2\">Your Logo Here</h4><p class=\"text-xs text-muted-foreground mb-3\">Join our showcase and connect with fellow developers.</p><a href=\"https://twitter.com/_axzilla\" target=\"_blank\" class=\"inline-flex items-center text-xs font-medium text-primary hover:text-primary/80 transition-colors duration-300\">Add Your Logo")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = icons.ChevronRight(icons.IconProps{Size: "16"}).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></div></aside>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate