mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feat(nebula): create Home model for home page
This commit is contained in:
@@ -94,7 +94,7 @@ endif
|
|||||||
|
|
||||||
install: go.sum
|
install: go.sum
|
||||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/sonrd
|
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
|
### Tools & dependencies
|
||||||
|
|||||||
@@ -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 {
|
type Models struct {
|
||||||
Hero *Hero `pkl:"hero"`
|
Home *Home `pkl:"home"`
|
||||||
|
|
||||||
Stats *Stats `pkl:"stats"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Models
|
// 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() {
|
func init() {
|
||||||
pkl.RegisterMapping("models", Models{})
|
pkl.RegisterMapping("models", Models{})
|
||||||
|
pkl.RegisterMapping("models#Home", Home{})
|
||||||
pkl.RegisterMapping("models#Hero", Hero{})
|
pkl.RegisterMapping("models#Hero", Hero{})
|
||||||
pkl.RegisterMapping("models#Button", Button{})
|
pkl.RegisterMapping("models#Button", Button{})
|
||||||
pkl.RegisterMapping("models#Image", Image{})
|
pkl.RegisterMapping("models#Image", Image{})
|
||||||
|
|||||||
@@ -28,3 +28,8 @@ stats = new Stats {
|
|||||||
thirdValue = "1.5M+";
|
thirdValue = "1.5M+";
|
||||||
thirdLabel = "Assets packed with power beyond your imagination.";
|
thirdLabel = "Assets packed with power beyond your imagination.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home = new Home {
|
||||||
|
hero = hero;
|
||||||
|
stats = stats;
|
||||||
|
};
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package pages
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
|
|
||||||
"github.com/onsonr/sonr/pkg/nebula/components/home"
|
"github.com/onsonr/sonr/pkg/nebula/components/home"
|
||||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||||
)
|
)
|
||||||
@@ -11,5 +12,5 @@ func Home(c echo.Context) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return echoResponse(c, home.View(mdls.Hero))
|
return echoResponse(c, home.View(mdls.Home.Hero))
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-2
@@ -74,8 +74,12 @@ class Footer {
|
|||||||
resourcesLinks: List<Link>
|
resourcesLinks: List<Link>
|
||||||
}
|
}
|
||||||
|
|
||||||
hero : Hero
|
class Home {
|
||||||
stats : Stats
|
hero: Hero
|
||||||
|
stats: Stats
|
||||||
|
}
|
||||||
|
|
||||||
|
home : Home
|
||||||
|
|
||||||
// ╭───────────────────────────────────────────────────────────╮
|
// ╭───────────────────────────────────────────────────────────╮
|
||||||
// │ Registration Components │
|
// │ Registration Components │
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import (
|
|||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/ipfs/boxo/path"
|
"github.com/ipfs/boxo/path"
|
||||||
"github.com/ipfs/kubo/client/rpc"
|
"github.com/ipfs/kubo/client/rpc"
|
||||||
|
|
||||||
"github.com/onsonr/sonr/x/vault/types"
|
"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
|
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
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user