2024-10-15 14:31:19 -04:00
// Code generated by templ - DO NOT EDIT.
2024-11-23 01:28:58 -05:00
// templ: version: v0.2.793
package landing
2024-10-15 14:31:19 -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"
import (
"fmt"
2024-11-23 01:28:58 -05:00
models "github.com/onsonr/sonr/pkg/webapp/models"
2024-10-15 14:31:19 -04:00
)
2024-10-28 10:12:05 -04:00
// ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
// highlights is the (2nd) home page highlights section
var highlights = & models . Highlights {
Heading : "The Internet Rebuilt for You" ,
Subtitle : "Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while providing Developers a cost-effective solution for decentralized authentication." ,
Features : [] * models . Feature {
{
Title : "∞ Factor Auth" ,
Desc : "Sonr is designed to work across all platforms and devices, building a encrypted and anonymous identity layer for each user on the internet." ,
Icon : nil ,
},
{
Title : "Control Your Data" ,
Desc : "Sonr leverages advanced cryptography to permit facilitating Wallet Operations directly on-chain, without the need for a centralized server." ,
Icon : nil ,
},
{
Title : "Crypto Enabled" ,
Desc : "Sonr follows the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys." ,
Icon : nil ,
},
{
Title : "Works Everywhere" ,
Desc : "Sonr anonymously associates your online identities with a Quantum-Resistant Vault which only you can access." ,
Icon : nil ,
},
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
func Highlights () templ . Component {
2024-10-15 14:31:19 -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 )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "<!-- Features --><section class=\"relative bg-zinc-50\"><div class=\"py-12 md:py-20\"><div class=\"max-w-5xl mx-auto px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto text-center pb-12\"><h2 class=\"font-inter-tight text-3xl md:text-4xl font-bold text-zinc-900 mb-4\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2 , templ_7745c5c3_Err = templ . JoinStringErrs ( highlights . Heading )
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 52 , Col : 26 }
2024-10-15 14:31:19 -04:00
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var2 ))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "</h2><p class=\"text-lg text-zinc-500\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3 , templ_7745c5c3_Err = templ . JoinStringErrs ( highlights . Subtitle )
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 55 , Col : 27 }
2024-10-15 14:31:19 -04:00
}
_ , 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 ( "</p></div><div x-data=\"{ tab: '1' }\"><!-- Tabs buttons --><div class=\"grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = highlightTab ( 1 , highlights . Features [ 0 ]). Render ( ctx , templ_7745c5c3_Buffer )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = highlightTab ( 2 , highlights . Features [ 1 ]). Render ( ctx , templ_7745c5c3_Buffer )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
2024-10-21 11:30:52 -04:00
templ_7745c5c3_Err = highlightTab ( 3 , highlights . Features [ 2 ]). Render ( ctx , templ_7745c5c3_Buffer )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = highlightTab ( 4 , highlights . Features [ 3 ]). Render ( ctx , templ_7745c5c3_Buffer )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
2024-10-15 14:31:19 -04:00
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "</div></div></div></div></section>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
func highlightTab ( index int , highlight * models . Feature ) 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_Var4 := templ . GetChildren ( ctx )
if templ_7745c5c3_Var4 == nil {
templ_7745c5c3_Var4 = templ . NopComponent
}
ctx = templ . ClearChildren ( ctx )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "<button :class=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5 , templ_7745c5c3_Err = templ . JoinStringErrs ( getSelectedClass ( index ))
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 74 , Col : 34 }
2024-10-15 14:31:19 -04:00
}
_ , 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 ( "\" class=\"text-left px-4 py-5 border border-transparent rounded\" @click.prevent=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6 , templ_7745c5c3_Err = templ . JoinStringErrs ( getClickPrevent ( index ))
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 76 , Col : 41 }
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
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "\"><div class=\"flex items-center justify-between mb-1\"><div class=\"font-inter-tight font-semibold text-zinc-900\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7 , templ_7745c5c3_Err = templ . JoinStringErrs ( highlight . Title )
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 80 , Col : 21 }
2024-10-15 14:31:19 -04:00
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var7 ))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "</div><svg :class=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8 , templ_7745c5c3_Err = templ . JoinStringErrs ( getShowBorder ( index ))
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 83 , Col : 33 }
2024-10-15 14:31:19 -04:00
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var8 ))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "\" class=\"fill-zinc-400 shrink-0 ml-2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\"><path d=\"M8.667.186H2.675a.999.999 0 0 0 0 1.998h3.581L.971 7.469a.999.999 0 1 0 1.412 1.412l5.285-5.285v3.58a.999.999 0 1 0 1.998 0V1.186a.999.999 0 0 0-.999-.999Z\"></path></svg></div><div class=\"text-sm text-zinc-500\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9 , templ_7745c5c3_Err = templ . JoinStringErrs ( highlight . Desc )
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 95 , Col : 19 }
2024-10-15 14:31:19 -04:00
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var9 ))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "</div></button>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
func highlightCard ( index int , highlight * models . Feature ) 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_Var10 := templ . GetChildren ( ctx )
if templ_7745c5c3_Var10 == nil {
templ_7745c5c3_Var10 = templ . NopComponent
}
ctx = templ . ClearChildren ( ctx )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "<div class=\"w-full text-center\" x-show=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11 , templ_7745c5c3_Err = templ . JoinStringErrs ( getXShow ( index ))
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 103 , Col : 26 }
2024-10-15 14:31:19 -04:00
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var11 ))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "\" x-transition:enter=\"transition ease-in-out duration-700 transform order-first\" x-transition:enter-start=\"opacity-0 -translate-y-4\" x-transition:enter-end=\"opacity-100 translate-y-0\" x-transition:leave=\"transition ease-in-out duration-300 transform absolute\" x-transition:leave-start=\"opacity-100 translate-y-0\" x-transition:leave-end=\"opacity-0 translate-y-4\"><div class=\"inline-flex relative align-top\"><img class=\"rounded-t-lg border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.white))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] box-content shadow-2xl\" src=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12 , templ_7745c5c3_Err = templ . JoinStringErrs ( highlight . Image . Src )
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 114 , Col : 29 }
2024-10-15 14:31:19 -04:00
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var12 ))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "\" width=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13 , templ_7745c5c3_Err = templ . JoinStringErrs ( highlight . Image . Width )
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 115 , Col : 33 }
2024-10-15 14:31:19 -04:00
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var13 ))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "\" height=\"" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14 , templ_7745c5c3_Err = templ . JoinStringErrs ( highlight . Image . Height )
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 116 , Col : 35 }
2024-10-15 14:31:19 -04:00
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var14 ))
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_Var15 string
templ_7745c5c3_Var15 , templ_7745c5c3_Err = templ . JoinStringErrs ( highlight . Title )
if templ_7745c5c3_Err != nil {
2024-11-23 01:28:58 -05:00
return templ . Error { Err : templ_7745c5c3_Err , FileName : `pkg/webapp/components/landing/highlights.templ` , Line : 117 , Col : 25 }
2024-10-15 14:31:19 -04:00
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var15 ))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "\"></div></div>" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
func getSelectedClass ( index int ) string {
return fmt . Sprintf ( "tab === '%d' ? 'bg-zinc-100 opacity-60 hover:opacity-100 transition' : '[background:linear-gradient(theme(colors.white),theme(colors.white))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] shadow-sm rotate-1'" , index + 1 )
}
func getShowBorder ( index int ) string {
return fmt . Sprintf ( "tab === '%d' ? 'hidden' : ''" , index + 1 )
}
func getClickPrevent ( index int ) string {
return fmt . Sprintf ( "tab = '%d'" , index + 1 )
}
func getXShow ( index int ) string {
return fmt . Sprintf ( "tab === '%d'" , index + 1 )
}
var _ = templruntime . GeneratedTemplate