feat: add stats section to homepage

This commit is contained in:
Prad Nukala
2024-09-30 21:16:27 -04:00
parent 5f2e6c5dd4
commit 36ad1448df
5 changed files with 26 additions and 4 deletions
+7 -1
View File
@@ -4,7 +4,13 @@ package models
type Footer struct {
Logo *Image `pkl:"logo"`
SocialLinks []*SocialLink `pkl:"socialLinks"`
MediumLink *SocialLink `pkl:"mediumLink"`
TwitterLink *SocialLink `pkl:"twitterLink"`
DiscordLink *SocialLink `pkl:"discordLink"`
GithubLink *SocialLink `pkl:"githubLink"`
CompanyLinks []*Link `pkl:"companyLinks"`
-2
View File
@@ -15,6 +15,4 @@ type Hero struct {
SecondaryButton *Button `pkl:"secondaryButton"`
Image *Image `pkl:"image"`
Stats []*Stat `pkl:"stats"`
}
+2
View File
@@ -9,6 +9,8 @@ import (
type Models struct {
Hero *Hero `pkl:"hero"`
Stats *Stats `pkl:"stats"`
}
// LoadFromPath loads the pkl module at the given path and evaluates it into a Models
+16
View File
@@ -0,0 +1,16 @@
// 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"`
}
+1 -1
View File
@@ -8,7 +8,7 @@ func init() {
pkl.RegisterMapping("models#Hero", Hero{})
pkl.RegisterMapping("models#Button", Button{})
pkl.RegisterMapping("models#Image", Image{})
pkl.RegisterMapping("models#Stat", Stat{})
pkl.RegisterMapping("models#Stats", Stats{})
pkl.RegisterMapping("models#Link", Link{})
pkl.RegisterMapping("models#SocialLink", SocialLink{})
pkl.RegisterMapping("models#Footer", Footer{})