feat: add static hero section content to homepage

This commit is contained in:
Prad Nukala
2024-10-08 21:06:24 -04:00
parent 8811f56559
commit 3637f27369
36 changed files with 77 additions and 492 deletions
-12
View File
@@ -1,12 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Bento struct {
Title string `pkl:"title"`
Description string `pkl:"description"`
PrimaryButton *Button `pkl:"primaryButton"`
SecondaryButton *Button `pkl:"secondaryButton"`
}
-8
View File
@@ -1,8 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Button struct {
Text string `pkl:"text"`
Href string `pkl:"href"`
}
-12
View File
@@ -1,12 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type CallToAction struct {
Title string `pkl:"title"`
Description string `pkl:"description"`
PrimaryButton *Button `pkl:"primaryButton"`
SecondaryButton *Button `pkl:"secondaryButton"`
}
-12
View File
@@ -1,12 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Feature struct {
Title string `pkl:"title"`
Description string `pkl:"description"`
Icon *string `pkl:"icon"`
Image *Image `pkl:"image"`
}
-10
View File
@@ -1,10 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Features struct {
Title string `pkl:"title"`
Description string `pkl:"description"`
Image *Image `pkl:"image"`
}
-18
View File
@@ -1,18 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Footer struct {
Logo *Image `pkl:"logo"`
MediumLink *SocialLink `pkl:"mediumLink"`
TwitterLink *SocialLink `pkl:"twitterLink"`
DiscordLink *SocialLink `pkl:"discordLink"`
GithubLink *SocialLink `pkl:"githubLink"`
CompanyLinks []*Link `pkl:"companyLinks"`
ResourcesLinks []*Link `pkl:"resourcesLinks"`
}
-10
View File
@@ -1,10 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Form interface {
GetTitle() string
GetDescription() string
GetInputs() []*Input
}
-20
View File
@@ -1,20 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Hero struct {
TitleFirst string `pkl:"titleFirst"`
TitleEmphasis string `pkl:"titleEmphasis"`
TitleSecond string `pkl:"titleSecond"`
Subtitle string `pkl:"subtitle"`
PrimaryButton *Button `pkl:"primaryButton"`
SecondaryButton *Button `pkl:"secondaryButton"`
Image *Image `pkl:"image"`
Stats []*Stat `pkl:"stats"`
}
-10
View File
@@ -1,10 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Highlight struct {
Title string `pkl:"title"`
Description string `pkl:"description"`
Image *Image `pkl:"image"`
}
-10
View File
@@ -1,10 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Highlights struct {
Heading string `pkl:"heading"`
Subheading string `pkl:"subheading"`
Highlights []*Feature `pkl:"highlights"`
}
-6
View File
@@ -1,6 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Home struct {
Hero *Hero `pkl:"hero"`
}
-10
View File
@@ -1,10 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Image struct {
Src string `pkl:"src"`
Width string `pkl:"width"`
Height string `pkl:"height"`
}
-20
View File
@@ -1,20 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
import "github.com/onsonr/sonr/pkg/nebula/models/inputtype"
type Input struct {
Label string `pkl:"label"`
Type inputtype.InputType `pkl:"type"`
Placeholder string `pkl:"placeholder"`
Value *string `pkl:"value"`
Error *string `pkl:"error"`
Help *string `pkl:"help"`
Required *bool `pkl:"required"`
}
-8
View File
@@ -1,8 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Link struct {
Text string `pkl:"text"`
Href string `pkl:"href"`
}
-10
View File
@@ -1,10 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Lowlights struct {
Title string `pkl:"title"`
Description string `pkl:"description"`
Image *Image `pkl:"image"`
}
-10
View File
@@ -1,10 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type ModalForm struct {
Title string `pkl:"title"`
Description string `pkl:"description"`
Id string `pkl:"id"`
}
-45
View File
@@ -1,45 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
import (
"context"
"github.com/apple/pkl-go/pkl"
)
type Models struct {
Home *Home `pkl:"home"`
Register *ModalForm `pkl:"register"`
Login *ModalForm `pkl:"login"`
Authorize *ModalForm `pkl:"authorize"`
PrivacyConsent *ModalForm `pkl:"privacyConsent"`
}
// LoadFromPath loads the pkl module at the given path and evaluates it into a Models
func LoadFromPath(ctx context.Context, path string) (ret *Models, err error) {
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
if err != nil {
return nil, err
}
defer func() {
cerr := evaluator.Close()
if err == nil {
err = cerr
}
}()
ret, err = Load(ctx, evaluator, pkl.FileSource(path))
return ret, err
}
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Models
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Models, error) {
var ret Models
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
return nil, err
}
return &ret, nil
}
@@ -1,5 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type PublicKeyCreationOptions struct {
}
@@ -1,5 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type PublicKeyRequestOptions struct {
}
-28
View File
@@ -1,28 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type RegisterFormData interface {
Form
}
var _ RegisterFormData = (*RegisterFormDataImpl)(nil)
type RegisterFormDataImpl struct {
Title string `pkl:"title"`
Description string `pkl:"description"`
Inputs []*Input `pkl:"inputs"`
}
func (rcv *RegisterFormDataImpl) GetTitle() string {
return rcv.Title
}
func (rcv *RegisterFormDataImpl) GetDescription() string {
return rcv.Description
}
func (rcv *RegisterFormDataImpl) GetInputs() []*Input {
return rcv.Inputs
}
-8
View File
@@ -1,8 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type SocialLink struct {
Link *Link `pkl:"link"`
Icon string `pkl:"icon"`
}
-8
View File
@@ -1,8 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Stat struct {
Value string `pkl:"value"`
Label string `pkl:"label"`
}
-16
View File
@@ -1,16 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
type Stats struct {
FirstValue string `pkl:"firstValue"`
FirstLabel string `pkl:"firstLabel"`
SecondValue string `pkl:"secondValue"`
SecondLabel string `pkl:"secondLabel"`
ThirdValue string `pkl:"thirdValue"`
ThirdLabel string `pkl:"thirdLabel"`
}
-36
View File
@@ -1,36 +0,0 @@
package models
import (
"context"
"errors"
"github.com/apple/pkl-go/pkl"
)
var models *Models
func LoadFromString(ctx context.Context, s string) (err error) {
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
if err != nil {
return err
}
defer func() {
cerr := evaluator.Close()
if err == nil {
err = cerr
}
}()
ret, err := Load(ctx, evaluator, pkl.TextSource(s))
if err != nil {
return err
}
models = ret
return nil
}
func GetModels() (*Models, error) {
if models == nil {
return nil, errors.New("models not initialized")
}
return models, nil
}
-13
View File
@@ -1,13 +0,0 @@
package models
type Event string
const (
// Auth
AuthLoginSuccess Event = "login_success"
AuthLogoutSuccess Event = "logout_success"
AuthRegisterSuccess Event = "register_success"
AuthRegisterFailure Event = "register_failure"
WalletTransactionConfirmed Event = "transaction_confirmed"
)
-14
View File
@@ -1,14 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package models
import "github.com/apple/pkl-go/pkl"
func init() {
pkl.RegisterMapping("models", Models{})
pkl.RegisterMapping("models#Home", Home{})
pkl.RegisterMapping("models#Hero", Hero{})
pkl.RegisterMapping("models#Button", Button{})
pkl.RegisterMapping("models#Image", Image{})
pkl.RegisterMapping("models#Stat", Stat{})
pkl.RegisterMapping("models#ModalForm", ModalForm{})
}
@@ -1,43 +0,0 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package inputtype
import (
"encoding"
"fmt"
)
type InputType string
const (
Text InputType = "text"
Password InputType = "password"
Email InputType = "email"
Credential InputType = "credential"
File InputType = "file"
)
// String returns the string representation of InputType
func (rcv InputType) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(InputType)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for InputType.
func (rcv *InputType) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "text":
*rcv = Text
case "password":
*rcv = Password
case "email":
*rcv = Email
case "credential":
*rcv = Credential
case "file":
*rcv = File
default:
return fmt.Errorf(`illegal: "%s" is not a valid InputType`, str)
}
return nil
}
+28
View File
@@ -0,0 +1,28 @@
package models
type Button struct {
Text string
Href string
}
type Image struct {
Src string
Width string
Height string
}
type Stat struct {
Value string
Label string
}
type Hero struct {
TitleFirst string
TitleEmphasis string
TitleSecond string
Subtitle string
PrimaryButton *Button
SecondaryButton *Button
Image *Image
Stats []*Stat
}