mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
feat(nebula): create Home model for home page
This commit is contained in:
parent
3baec2745b
commit
8d8935c045
2
Makefile
2
Makefile
@ -94,7 +94,7 @@ endif
|
||||
|
||||
install: go.sum
|
||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/sonrd
|
||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/motr
|
||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/hway
|
||||
|
||||
########################################
|
||||
### Tools & dependencies
|
||||
|
8
pkg/nebula/models/Home.pkl.go
Normal file
8
pkg/nebula/models/Home.pkl.go
Normal file
@ -0,0 +1,8 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
type Home struct {
|
||||
Hero *Hero `pkl:"hero"`
|
||||
|
||||
Stats *Stats `pkl:"stats"`
|
||||
}
|
@ -8,9 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type Models struct {
|
||||
Hero *Hero `pkl:"hero"`
|
||||
|
||||
Stats *Stats `pkl:"stats"`
|
||||
Home *Home `pkl:"home"`
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Models
|
||||
|
@ -5,6 +5,7 @@ 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{})
|
||||
|
@ -28,3 +28,8 @@ stats = new Stats {
|
||||
thirdValue = "1.5M+";
|
||||
thirdLabel = "Assets packed with power beyond your imagination.";
|
||||
};
|
||||
|
||||
home = new Home {
|
||||
hero = hero;
|
||||
stats = stats;
|
||||
};
|
||||
|
@ -2,6 +2,7 @@ package pages
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/home"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
@ -11,5 +12,5 @@ func Home(c echo.Context) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return echoResponse(c, home.View(mdls.Hero))
|
||||
return echoResponse(c, home.View(mdls.Home.Hero))
|
||||
}
|
||||
|
@ -74,8 +74,12 @@ class Footer {
|
||||
resourcesLinks: List<Link>
|
||||
}
|
||||
|
||||
hero : Hero
|
||||
stats : Stats
|
||||
class Home {
|
||||
hero: Hero
|
||||
stats: Stats
|
||||
}
|
||||
|
||||
home : Home
|
||||
|
||||
// ╭───────────────────────────────────────────────────────────╮
|
||||
// │ Registration Components │
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/ipfs/boxo/path"
|
||||
"github.com/ipfs/kubo/client/rpc"
|
||||
|
||||
"github.com/onsonr/sonr/x/vault/types"
|
||||
)
|
||||
|
||||
@ -74,8 +75,3 @@ func (k Keeper) HasPathInIPFS(ctx sdk.Context, cid string) (bool, error) {
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// validateSubjectOrigin checks if the subject and origin are valid
|
||||
func (k Keeper) validateSubjectOrigin(ctx sdk.Context, subject string, origin string) error {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user