mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
feature/refactor types (#1101)
- **docs: remove discord badge from README** - **fix: ensure go version is up-to-date** - **<no value>** - **refactor: update import paths for blocks to components** - **feat: add Hero component template** - **fix: update footer logo to svg** - **feat: add Query/Sign and Query/Verify RPC methods** - **refactor: rename Keyshares to KsVal in did/v1/state.proto**
This commit is contained in:
parent
91d8f523dd
commit
d04c87de43
1
.github/workflows/run-goreleaser.yml
vendored
1
.github/workflows/run-goreleaser.yml
vendored
@ -26,6 +26,7 @@ jobs:
|
|||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.22"
|
go-version: "1.22"
|
||||||
|
check-latest: true
|
||||||
|
|
||||||
- name: Clean up dist directory
|
- name: Clean up dist directory
|
||||||
run: rm -rf dist
|
run: rm -rf dist
|
||||||
|
10
Makefile
10
Makefile
@ -297,7 +297,7 @@ sh-testnet: mod-tidy
|
|||||||
### templ & vault ###
|
### templ & vault ###
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
.PHONY: dwn motr templ
|
.PHONY: dwn motr templ pkl nebula
|
||||||
|
|
||||||
motr:
|
motr:
|
||||||
@echo "(motr) Building motr gateway"
|
@echo "(motr) Building motr gateway"
|
||||||
@ -312,10 +312,14 @@ templ:
|
|||||||
go install github.com/a-h/templ/cmd/templ@latest
|
go install github.com/a-h/templ/cmd/templ@latest
|
||||||
templ generate
|
templ generate
|
||||||
|
|
||||||
|
nebula:
|
||||||
|
@echo "(nebula) Building nebula"
|
||||||
|
cd pkg/nebula && bun run build
|
||||||
|
|
||||||
pkl:
|
pkl:
|
||||||
@echo "(pkl) Building PKL"
|
@echo "(pkl) Building PKL"
|
||||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./app/config/pkl/dwn.pkl
|
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/dwn.pkl
|
||||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./app/config/pkl/orm.pkl
|
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/orm.pkl
|
||||||
|
|
||||||
start-caddy:
|
start-caddy:
|
||||||
@echo "(start-caddy) Starting caddy"
|
@echo "(start-caddy) Starting caddy"
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,8 @@ const _ = grpc.SupportPackageIsVersion7
|
|||||||
const (
|
const (
|
||||||
Query_Params_FullMethodName = "/did.v1.Query/Params"
|
Query_Params_FullMethodName = "/did.v1.Query/Params"
|
||||||
Query_Resolve_FullMethodName = "/did.v1.Query/Resolve"
|
Query_Resolve_FullMethodName = "/did.v1.Query/Resolve"
|
||||||
|
Query_Sign_FullMethodName = "/did.v1.Query/Sign"
|
||||||
|
Query_Verify_FullMethodName = "/did.v1.Query/Verify"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QueryClient is the client API for Query service.
|
// QueryClient is the client API for Query service.
|
||||||
@ -31,6 +33,10 @@ type QueryClient interface {
|
|||||||
Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||||
// Resolve queries the DID document by its id.
|
// Resolve queries the DID document by its id.
|
||||||
Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error)
|
Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error)
|
||||||
|
// Sign signs a message with the DID document
|
||||||
|
Sign(ctx context.Context, in *QuerySignRequest, opts ...grpc.CallOption) (*QuerySignResponse, error)
|
||||||
|
// Verify verifies a message with the DID document
|
||||||
|
Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type queryClient struct {
|
type queryClient struct {
|
||||||
@ -59,6 +65,24 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grp
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) Sign(ctx context.Context, in *QuerySignRequest, opts ...grpc.CallOption) (*QuerySignResponse, error) {
|
||||||
|
out := new(QuerySignResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_Sign_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error) {
|
||||||
|
out := new(QueryVerifyResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_Verify_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// QueryServer is the server API for Query service.
|
// QueryServer is the server API for Query service.
|
||||||
// All implementations must embed UnimplementedQueryServer
|
// All implementations must embed UnimplementedQueryServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@ -67,6 +91,10 @@ type QueryServer interface {
|
|||||||
Params(context.Context, *QueryRequest) (*QueryParamsResponse, error)
|
Params(context.Context, *QueryRequest) (*QueryParamsResponse, error)
|
||||||
// Resolve queries the DID document by its id.
|
// Resolve queries the DID document by its id.
|
||||||
Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error)
|
Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error)
|
||||||
|
// Sign signs a message with the DID document
|
||||||
|
Sign(context.Context, *QuerySignRequest) (*QuerySignResponse, error)
|
||||||
|
// Verify verifies a message with the DID document
|
||||||
|
Verify(context.Context, *QueryVerifyRequest) (*QueryVerifyResponse, error)
|
||||||
mustEmbedUnimplementedQueryServer()
|
mustEmbedUnimplementedQueryServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,6 +108,12 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryPa
|
|||||||
func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) {
|
func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedQueryServer) Sign(context.Context, *QuerySignRequest) (*QuerySignResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedQueryServer) Verify(context.Context, *QueryVerifyRequest) (*QueryVerifyResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||||
|
|
||||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||||
@ -129,6 +163,42 @@ func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(inter
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Query_Sign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QuerySignRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).Sign(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_Sign_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).Sign(ctx, req.(*QuerySignRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Query_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryVerifyRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).Verify(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_Verify_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).Verify(ctx, req.(*QueryVerifyRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -144,6 +214,14 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "Resolve",
|
MethodName: "Resolve",
|
||||||
Handler: _Query_Resolve_Handler,
|
Handler: _Query_Resolve_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Sign",
|
||||||
|
Handler: _Query_Sign_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Verify",
|
||||||
|
Handler: _Query_Verify_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "did/v1/query.proto",
|
Metadata: "did/v1/query.proto",
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2290,7 +2290,7 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) {
|
|||||||
return file_macaroon_v1_tx_proto_rawDescGZIP(), []int{1}
|
return file_macaroon_v1_tx_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgIssueMacaroon is the message type for the AuthorizeService RPC.
|
// MsgIssueMacaroon is the message type for the IssueMacaroon RPC.
|
||||||
type MsgIssueMacaroon struct {
|
type MsgIssueMacaroon struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -2354,7 +2354,7 @@ func (x *MsgIssueMacaroon) GetToken() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgIssueMacaroonResponse is the response type for the AuthorizeService
|
// MsgIssueMacaroonResponse is the response type for the IssueMacaroon
|
||||||
// RPC.
|
// RPC.
|
||||||
type MsgIssueMacaroonResponse struct {
|
type MsgIssueMacaroonResponse struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -2443,29 +2443,29 @@ var file_macaroon_v1_tx_proto_rawDesc = []byte{
|
|||||||
0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18,
|
0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18,
|
||||||
0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
|
0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||||
0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65,
|
0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65,
|
||||||
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xba,
|
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xb7,
|
||||||
0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x52, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x52, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f,
|
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f,
|
||||||
0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61,
|
0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61,
|
||||||
0x72, 0x61, 0x6d, 0x73, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e,
|
0x72, 0x61, 0x6d, 0x73, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e,
|
||||||
0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61,
|
0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61,
|
||||||
0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x10, 0x41, 0x75,
|
0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0d, 0x49, 0x73,
|
||||||
0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d,
|
0x73, 0x75, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x6d, 0x61,
|
||||||
0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67,
|
0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x73, 0x73,
|
||||||
0x49, 0x73, 0x73, 0x75, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x1a, 0x25, 0x2e,
|
0x75, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x1a, 0x25, 0x2e, 0x6d, 0x61, 0x63,
|
||||||
0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49,
|
0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x73, 0x73, 0x75,
|
||||||
0x73, 0x73, 0x75, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9a, 0x01, 0x0a, 0x0f,
|
0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9a, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d,
|
||||||
0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42,
|
0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78,
|
||||||
0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68,
|
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f,
|
0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f,
|
||||||
0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f,
|
0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b,
|
||||||
0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03,
|
0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58,
|
||||||
0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56,
|
0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02,
|
||||||
0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2,
|
0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x4d,
|
||||||
0x02, 0x17, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50,
|
0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
|
||||||
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61,
|
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f,
|
||||||
0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -2493,9 +2493,9 @@ var file_macaroon_v1_tx_proto_depIdxs = []int32{
|
|||||||
5, // 0: macaroon.v1.MsgUpdateParams.params:type_name -> macaroon.v1.Params
|
5, // 0: macaroon.v1.MsgUpdateParams.params:type_name -> macaroon.v1.Params
|
||||||
4, // 1: macaroon.v1.MsgIssueMacaroon.permissions:type_name -> macaroon.v1.MsgIssueMacaroon.PermissionsEntry
|
4, // 1: macaroon.v1.MsgIssueMacaroon.permissions:type_name -> macaroon.v1.MsgIssueMacaroon.PermissionsEntry
|
||||||
0, // 2: macaroon.v1.Msg.UpdateParams:input_type -> macaroon.v1.MsgUpdateParams
|
0, // 2: macaroon.v1.Msg.UpdateParams:input_type -> macaroon.v1.MsgUpdateParams
|
||||||
2, // 3: macaroon.v1.Msg.AuthorizeService:input_type -> macaroon.v1.MsgIssueMacaroon
|
2, // 3: macaroon.v1.Msg.IssueMacaroon:input_type -> macaroon.v1.MsgIssueMacaroon
|
||||||
1, // 4: macaroon.v1.Msg.UpdateParams:output_type -> macaroon.v1.MsgUpdateParamsResponse
|
1, // 4: macaroon.v1.Msg.UpdateParams:output_type -> macaroon.v1.MsgUpdateParamsResponse
|
||||||
3, // 5: macaroon.v1.Msg.AuthorizeService:output_type -> macaroon.v1.MsgIssueMacaroonResponse
|
3, // 5: macaroon.v1.Msg.IssueMacaroon:output_type -> macaroon.v1.MsgIssueMacaroonResponse
|
||||||
4, // [4:6] is the sub-list for method output_type
|
4, // [4:6] is the sub-list for method output_type
|
||||||
2, // [2:4] is the sub-list for method input_type
|
2, // [2:4] is the sub-list for method input_type
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
|
@ -19,8 +19,8 @@ import (
|
|||||||
const _ = grpc.SupportPackageIsVersion7
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Msg_UpdateParams_FullMethodName = "/macaroon.v1.Msg/UpdateParams"
|
Msg_UpdateParams_FullMethodName = "/macaroon.v1.Msg/UpdateParams"
|
||||||
Msg_AuthorizeService_FullMethodName = "/macaroon.v1.Msg/AuthorizeService"
|
Msg_IssueMacaroon_FullMethodName = "/macaroon.v1.Msg/IssueMacaroon"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgClient is the client API for Msg service.
|
// MsgClient is the client API for Msg service.
|
||||||
@ -31,9 +31,9 @@ type MsgClient interface {
|
|||||||
//
|
//
|
||||||
// Since: cosmos-sdk 0.47
|
// Since: cosmos-sdk 0.47
|
||||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||||
// AuthorizeService asserts the given controller is the owner of the given
|
// IssueMacaroon asserts the given controller is the owner of the given
|
||||||
// address.
|
// address.
|
||||||
AuthorizeService(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error)
|
IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type msgClient struct {
|
type msgClient struct {
|
||||||
@ -53,9 +53,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error) {
|
func (c *msgClient) IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error) {
|
||||||
out := new(MsgIssueMacaroonResponse)
|
out := new(MsgIssueMacaroonResponse)
|
||||||
err := c.cc.Invoke(ctx, Msg_AuthorizeService_FullMethodName, in, out, opts...)
|
err := c.cc.Invoke(ctx, Msg_IssueMacaroon_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -70,9 +70,9 @@ type MsgServer interface {
|
|||||||
//
|
//
|
||||||
// Since: cosmos-sdk 0.47
|
// Since: cosmos-sdk 0.47
|
||||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||||
// AuthorizeService asserts the given controller is the owner of the given
|
// IssueMacaroon asserts the given controller is the owner of the given
|
||||||
// address.
|
// address.
|
||||||
AuthorizeService(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error)
|
IssueMacaroon(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error)
|
||||||
mustEmbedUnimplementedMsgServer()
|
mustEmbedUnimplementedMsgServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,8 +83,8 @@ type UnimplementedMsgServer struct {
|
|||||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedMsgServer) AuthorizeService(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error) {
|
func (UnimplementedMsgServer) IssueMacaroon(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method AuthorizeService not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method IssueMacaroon not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||||
|
|
||||||
@ -117,20 +117,20 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Msg_AuthorizeService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Msg_IssueMacaroon_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(MsgIssueMacaroon)
|
in := new(MsgIssueMacaroon)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if interceptor == nil {
|
if interceptor == nil {
|
||||||
return srv.(MsgServer).AuthorizeService(ctx, in)
|
return srv.(MsgServer).IssueMacaroon(ctx, in)
|
||||||
}
|
}
|
||||||
info := &grpc.UnaryServerInfo{
|
info := &grpc.UnaryServerInfo{
|
||||||
Server: srv,
|
Server: srv,
|
||||||
FullMethod: Msg_AuthorizeService_FullMethodName,
|
FullMethod: Msg_IssueMacaroon_FullMethodName,
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(MsgServer).AuthorizeService(ctx, req.(*MsgIssueMacaroon))
|
return srv.(MsgServer).IssueMacaroon(ctx, req.(*MsgIssueMacaroon))
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
@ -147,8 +147,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
|||||||
Handler: _Msg_UpdateParams_Handler,
|
Handler: _Msg_UpdateParams_Handler,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "AuthorizeService",
|
MethodName: "IssueMacaroon",
|
||||||
Handler: _Msg_AuthorizeService_Handler,
|
Handler: _Msg_IssueMacaroon_Handler,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
|
@ -11,12 +11,20 @@ import (
|
|||||||
|
|
||||||
type DWNTable interface {
|
type DWNTable interface {
|
||||||
Insert(ctx context.Context, dWN *DWN) error
|
Insert(ctx context.Context, dWN *DWN) error
|
||||||
|
InsertReturningId(ctx context.Context, dWN *DWN) (uint64, error)
|
||||||
|
LastInsertedSequence(ctx context.Context) (uint64, error)
|
||||||
Update(ctx context.Context, dWN *DWN) error
|
Update(ctx context.Context, dWN *DWN) error
|
||||||
Save(ctx context.Context, dWN *DWN) error
|
Save(ctx context.Context, dWN *DWN) error
|
||||||
Delete(ctx context.Context, dWN *DWN) error
|
Delete(ctx context.Context, dWN *DWN) error
|
||||||
Has(ctx context.Context, account []byte) (found bool, err error)
|
Has(ctx context.Context, id uint64) (found bool, err error)
|
||||||
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
Get(ctx context.Context, account []byte) (*DWN, error)
|
Get(ctx context.Context, id uint64) (*DWN, error)
|
||||||
|
HasByAlias(ctx context.Context, alias string) (found bool, err error)
|
||||||
|
// GetByAlias returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
|
GetByAlias(ctx context.Context, alias string) (*DWN, error)
|
||||||
|
HasByCid(ctx context.Context, cid string) (found bool, err error)
|
||||||
|
// GetByCid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
|
GetByCid(ctx context.Context, cid string) (*DWN, error)
|
||||||
List(ctx context.Context, prefixKey DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error)
|
List(ctx context.Context, prefixKey DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error)
|
||||||
ListRange(ctx context.Context, from, to DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error)
|
ListRange(ctx context.Context, from, to DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error)
|
||||||
DeleteBy(ctx context.Context, prefixKey DWNIndexKey) error
|
DeleteBy(ctx context.Context, prefixKey DWNIndexKey) error
|
||||||
@ -42,36 +50,49 @@ type DWNIndexKey interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// primary key starting index..
|
// primary key starting index..
|
||||||
type DWNPrimaryKey = DWNAccountIndexKey
|
type DWNPrimaryKey = DWNIdIndexKey
|
||||||
|
|
||||||
type DWNAccountIndexKey struct {
|
type DWNIdIndexKey struct {
|
||||||
vs []interface{}
|
vs []interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x DWNAccountIndexKey) id() uint32 { return 0 }
|
func (x DWNIdIndexKey) id() uint32 { return 0 }
|
||||||
func (x DWNAccountIndexKey) values() []interface{} { return x.vs }
|
func (x DWNIdIndexKey) values() []interface{} { return x.vs }
|
||||||
func (x DWNAccountIndexKey) dWNIndexKey() {}
|
func (x DWNIdIndexKey) dWNIndexKey() {}
|
||||||
|
|
||||||
func (this DWNAccountIndexKey) WithAccount(account []byte) DWNAccountIndexKey {
|
func (this DWNIdIndexKey) WithId(id uint64) DWNIdIndexKey {
|
||||||
this.vs = []interface{}{account}
|
this.vs = []interface{}{id}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
type DWNAmountIndexKey struct {
|
type DWNAliasIndexKey struct {
|
||||||
vs []interface{}
|
vs []interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x DWNAmountIndexKey) id() uint32 { return 1 }
|
func (x DWNAliasIndexKey) id() uint32 { return 1 }
|
||||||
func (x DWNAmountIndexKey) values() []interface{} { return x.vs }
|
func (x DWNAliasIndexKey) values() []interface{} { return x.vs }
|
||||||
func (x DWNAmountIndexKey) dWNIndexKey() {}
|
func (x DWNAliasIndexKey) dWNIndexKey() {}
|
||||||
|
|
||||||
func (this DWNAmountIndexKey) WithAmount(amount uint64) DWNAmountIndexKey {
|
func (this DWNAliasIndexKey) WithAlias(alias string) DWNAliasIndexKey {
|
||||||
this.vs = []interface{}{amount}
|
this.vs = []interface{}{alias}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type DWNCidIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x DWNCidIndexKey) id() uint32 { return 2 }
|
||||||
|
func (x DWNCidIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x DWNCidIndexKey) dWNIndexKey() {}
|
||||||
|
|
||||||
|
func (this DWNCidIndexKey) WithCid(cid string) DWNCidIndexKey {
|
||||||
|
this.vs = []interface{}{cid}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
type dWNTable struct {
|
type dWNTable struct {
|
||||||
table ormtable.Table
|
table ormtable.AutoIncrementTable
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this dWNTable) Insert(ctx context.Context, dWN *DWN) error {
|
func (this dWNTable) Insert(ctx context.Context, dWN *DWN) error {
|
||||||
@ -90,13 +111,61 @@ func (this dWNTable) Delete(ctx context.Context, dWN *DWN) error {
|
|||||||
return this.table.Delete(ctx, dWN)
|
return this.table.Delete(ctx, dWN)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this dWNTable) Has(ctx context.Context, account []byte) (found bool, err error) {
|
func (this dWNTable) InsertReturningId(ctx context.Context, dWN *DWN) (uint64, error) {
|
||||||
return this.table.PrimaryKey().Has(ctx, account)
|
return this.table.InsertReturningPKey(ctx, dWN)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this dWNTable) Get(ctx context.Context, account []byte) (*DWN, error) {
|
func (this dWNTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
||||||
|
return this.table.LastInsertedSequence(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) Has(ctx context.Context, id uint64) (found bool, err error) {
|
||||||
|
return this.table.PrimaryKey().Has(ctx, id)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) Get(ctx context.Context, id uint64) (*DWN, error) {
|
||||||
var dWN DWN
|
var dWN DWN
|
||||||
found, err := this.table.PrimaryKey().Get(ctx, &dWN, account)
|
found, err := this.table.PrimaryKey().Get(ctx, &dWN, id)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &dWN, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) HasByAlias(ctx context.Context, alias string) (found bool, err error) {
|
||||||
|
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||||
|
alias,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) GetByAlias(ctx context.Context, alias string) (*DWN, error) {
|
||||||
|
var dWN DWN
|
||||||
|
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &dWN,
|
||||||
|
alias,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &dWN, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) HasByCid(ctx context.Context, cid string) (found bool, err error) {
|
||||||
|
return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx,
|
||||||
|
cid,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) GetByCid(ctx context.Context, cid string) (*DWN, error) {
|
||||||
|
var dWN DWN
|
||||||
|
found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &dWN,
|
||||||
|
cid,
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -133,7 +202,7 @@ func NewDWNTable(db ormtable.Schema) (DWNTable, error) {
|
|||||||
if table == nil {
|
if table == nil {
|
||||||
return nil, ormerrors.TableNotFound.Wrap(string((&DWN{}).ProtoReflect().Descriptor().FullName()))
|
return nil, ormerrors.TableNotFound.Wrap(string((&DWN{}).ProtoReflect().Descriptor().FullName()))
|
||||||
}
|
}
|
||||||
return dWNTable{table}, nil
|
return dWNTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type StateStore interface {
|
type StateStore interface {
|
||||||
|
@ -14,16 +14,18 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
md_DWN protoreflect.MessageDescriptor
|
md_DWN protoreflect.MessageDescriptor
|
||||||
fd_DWN_account protoreflect.FieldDescriptor
|
fd_DWN_id protoreflect.FieldDescriptor
|
||||||
fd_DWN_amount protoreflect.FieldDescriptor
|
fd_DWN_alias protoreflect.FieldDescriptor
|
||||||
|
fd_DWN_cid protoreflect.FieldDescriptor
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
file_vault_v1_state_proto_init()
|
file_vault_v1_state_proto_init()
|
||||||
md_DWN = File_vault_v1_state_proto.Messages().ByName("DWN")
|
md_DWN = File_vault_v1_state_proto.Messages().ByName("DWN")
|
||||||
fd_DWN_account = md_DWN.Fields().ByName("account")
|
fd_DWN_id = md_DWN.Fields().ByName("id")
|
||||||
fd_DWN_amount = md_DWN.Fields().ByName("amount")
|
fd_DWN_alias = md_DWN.Fields().ByName("alias")
|
||||||
|
fd_DWN_cid = md_DWN.Fields().ByName("cid")
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ protoreflect.Message = (*fastReflection_DWN)(nil)
|
var _ protoreflect.Message = (*fastReflection_DWN)(nil)
|
||||||
@ -91,15 +93,21 @@ func (x *fastReflection_DWN) Interface() protoreflect.ProtoMessage {
|
|||||||
// While iterating, mutating operations may only be performed
|
// While iterating, mutating operations may only be performed
|
||||||
// on the current field descriptor.
|
// on the current field descriptor.
|
||||||
func (x *fastReflection_DWN) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
func (x *fastReflection_DWN) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||||
if len(x.Account) != 0 {
|
if x.Id != uint64(0) {
|
||||||
value := protoreflect.ValueOfBytes(x.Account)
|
value := protoreflect.ValueOfUint64(x.Id)
|
||||||
if !f(fd_DWN_account, value) {
|
if !f(fd_DWN_id, value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if x.Amount != uint64(0) {
|
if x.Alias != "" {
|
||||||
value := protoreflect.ValueOfUint64(x.Amount)
|
value := protoreflect.ValueOfString(x.Alias)
|
||||||
if !f(fd_DWN_amount, value) {
|
if !f(fd_DWN_alias, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.Cid != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.Cid)
|
||||||
|
if !f(fd_DWN_cid, value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -118,10 +126,12 @@ func (x *fastReflection_DWN) Range(f func(protoreflect.FieldDescriptor, protoref
|
|||||||
// a repeated field is populated if it is non-empty.
|
// a repeated field is populated if it is non-empty.
|
||||||
func (x *fastReflection_DWN) Has(fd protoreflect.FieldDescriptor) bool {
|
func (x *fastReflection_DWN) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "vault.v1.DWN.account":
|
case "vault.v1.DWN.id":
|
||||||
return len(x.Account) != 0
|
return x.Id != uint64(0)
|
||||||
case "vault.v1.DWN.amount":
|
case "vault.v1.DWN.alias":
|
||||||
return x.Amount != uint64(0)
|
return x.Alias != ""
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
return x.Cid != ""
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
@ -138,10 +148,12 @@ func (x *fastReflection_DWN) Has(fd protoreflect.FieldDescriptor) bool {
|
|||||||
// Clear is a mutating operation and unsafe for concurrent use.
|
// Clear is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_DWN) Clear(fd protoreflect.FieldDescriptor) {
|
func (x *fastReflection_DWN) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "vault.v1.DWN.account":
|
case "vault.v1.DWN.id":
|
||||||
x.Account = nil
|
x.Id = uint64(0)
|
||||||
case "vault.v1.DWN.amount":
|
case "vault.v1.DWN.alias":
|
||||||
x.Amount = uint64(0)
|
x.Alias = ""
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
x.Cid = ""
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
@ -158,12 +170,15 @@ func (x *fastReflection_DWN) Clear(fd protoreflect.FieldDescriptor) {
|
|||||||
// of the value; to obtain a mutable reference, use Mutable.
|
// of the value; to obtain a mutable reference, use Mutable.
|
||||||
func (x *fastReflection_DWN) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_DWN) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch descriptor.FullName() {
|
switch descriptor.FullName() {
|
||||||
case "vault.v1.DWN.account":
|
case "vault.v1.DWN.id":
|
||||||
value := x.Account
|
value := x.Id
|
||||||
return protoreflect.ValueOfBytes(value)
|
|
||||||
case "vault.v1.DWN.amount":
|
|
||||||
value := x.Amount
|
|
||||||
return protoreflect.ValueOfUint64(value)
|
return protoreflect.ValueOfUint64(value)
|
||||||
|
case "vault.v1.DWN.alias":
|
||||||
|
value := x.Alias
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
value := x.Cid
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
@ -184,10 +199,12 @@ func (x *fastReflection_DWN) Get(descriptor protoreflect.FieldDescriptor) protor
|
|||||||
// Set is a mutating operation and unsafe for concurrent use.
|
// Set is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_DWN) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
func (x *fastReflection_DWN) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "vault.v1.DWN.account":
|
case "vault.v1.DWN.id":
|
||||||
x.Account = value.Bytes()
|
x.Id = value.Uint()
|
||||||
case "vault.v1.DWN.amount":
|
case "vault.v1.DWN.alias":
|
||||||
x.Amount = value.Uint()
|
x.Alias = value.Interface().(string)
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
x.Cid = value.Interface().(string)
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
@ -208,10 +225,12 @@ func (x *fastReflection_DWN) Set(fd protoreflect.FieldDescriptor, value protoref
|
|||||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_DWN) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_DWN) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "vault.v1.DWN.account":
|
case "vault.v1.DWN.id":
|
||||||
panic(fmt.Errorf("field account of message vault.v1.DWN is not mutable"))
|
panic(fmt.Errorf("field id of message vault.v1.DWN is not mutable"))
|
||||||
case "vault.v1.DWN.amount":
|
case "vault.v1.DWN.alias":
|
||||||
panic(fmt.Errorf("field amount of message vault.v1.DWN is not mutable"))
|
panic(fmt.Errorf("field alias of message vault.v1.DWN is not mutable"))
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
panic(fmt.Errorf("field cid of message vault.v1.DWN is not mutable"))
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
@ -225,10 +244,12 @@ func (x *fastReflection_DWN) Mutable(fd protoreflect.FieldDescriptor) protorefle
|
|||||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||||
func (x *fastReflection_DWN) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_DWN) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "vault.v1.DWN.account":
|
case "vault.v1.DWN.id":
|
||||||
return protoreflect.ValueOfBytes(nil)
|
|
||||||
case "vault.v1.DWN.amount":
|
|
||||||
return protoreflect.ValueOfUint64(uint64(0))
|
return protoreflect.ValueOfUint64(uint64(0))
|
||||||
|
case "vault.v1.DWN.alias":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
@ -298,12 +319,16 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods {
|
|||||||
var n int
|
var n int
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
l = len(x.Account)
|
if x.Id != 0 {
|
||||||
|
n += 1 + runtime.Sov(uint64(x.Id))
|
||||||
|
}
|
||||||
|
l = len(x.Alias)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + runtime.Sov(uint64(l))
|
n += 1 + l + runtime.Sov(uint64(l))
|
||||||
}
|
}
|
||||||
if x.Amount != 0 {
|
l = len(x.Cid)
|
||||||
n += 1 + runtime.Sov(uint64(x.Amount))
|
if l > 0 {
|
||||||
|
n += 1 + l + runtime.Sov(uint64(l))
|
||||||
}
|
}
|
||||||
if x.unknownFields != nil {
|
if x.unknownFields != nil {
|
||||||
n += len(x.unknownFields)
|
n += len(x.unknownFields)
|
||||||
@ -334,17 +359,24 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods {
|
|||||||
i -= len(x.unknownFields)
|
i -= len(x.unknownFields)
|
||||||
copy(dAtA[i:], x.unknownFields)
|
copy(dAtA[i:], x.unknownFields)
|
||||||
}
|
}
|
||||||
if x.Amount != 0 {
|
if len(x.Cid) > 0 {
|
||||||
i = runtime.EncodeVarint(dAtA, i, uint64(x.Amount))
|
i -= len(x.Cid)
|
||||||
|
copy(dAtA[i:], x.Cid)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x10
|
dAtA[i] = 0x1a
|
||||||
}
|
}
|
||||||
if len(x.Account) > 0 {
|
if len(x.Alias) > 0 {
|
||||||
i -= len(x.Account)
|
i -= len(x.Alias)
|
||||||
copy(dAtA[i:], x.Account)
|
copy(dAtA[i:], x.Alias)
|
||||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Account)))
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Alias)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0xa
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
if x.Id != 0 {
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(x.Id))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x8
|
||||||
}
|
}
|
||||||
if input.Buf != nil {
|
if input.Buf != nil {
|
||||||
input.Buf = append(input.Buf, dAtA...)
|
input.Buf = append(input.Buf, dAtA...)
|
||||||
@ -396,10 +428,10 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods {
|
|||||||
}
|
}
|
||||||
switch fieldNum {
|
switch fieldNum {
|
||||||
case 1:
|
case 1:
|
||||||
if wireType != 2 {
|
if wireType != 0 {
|
||||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Account", wireType)
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
||||||
}
|
}
|
||||||
var byteLen int
|
x.Id = 0
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||||
@ -409,31 +441,48 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods {
|
|||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= int(b&0x7F) << shift
|
x.Id |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if byteLen < 0 {
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLen := int(stringLen)
|
||||||
|
if intStringLen < 0 {
|
||||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
x.Account = append(x.Account[:0], dAtA[iNdEx:postIndex]...)
|
x.Alias = string(dAtA[iNdEx:postIndex])
|
||||||
if x.Account == nil {
|
|
||||||
x.Account = []byte{}
|
|
||||||
}
|
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 2:
|
case 3:
|
||||||
if wireType != 0 {
|
if wireType != 2 {
|
||||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType)
|
||||||
}
|
}
|
||||||
x.Amount = 0
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||||
@ -443,11 +492,24 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods {
|
|||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
x.Amount |= uint64(b&0x7F) << shift
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
intStringLen := int(stringLen)
|
||||||
|
if intStringLen < 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
x.Cid = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||||
@ -501,8 +563,9 @@ type DWN struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
|
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
|
Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"`
|
||||||
|
Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DWN) Reset() {
|
func (x *DWN) Reset() {
|
||||||
@ -525,42 +588,50 @@ func (*DWN) Descriptor() ([]byte, []int) {
|
|||||||
return file_vault_v1_state_proto_rawDescGZIP(), []int{0}
|
return file_vault_v1_state_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DWN) GetAccount() []byte {
|
func (x *DWN) GetId() uint64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Account
|
return x.Id
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DWN) GetAmount() uint64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Amount
|
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *DWN) GetAlias() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Alias
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DWN) GetCid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Cid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_vault_v1_state_proto protoreflect.FileDescriptor
|
var File_vault_v1_state_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_vault_v1_state_proto_rawDesc = []byte{
|
var file_vault_v1_state_proto_rawDesc = []byte{
|
||||||
0x0a, 0x14, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65,
|
0x0a, 0x14, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65,
|
||||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31,
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31,
|
||||||
0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f,
|
0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f,
|
||||||
0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a, 0x03, 0x44, 0x57, 0x4e,
|
0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, 0x03, 0x44, 0x57, 0x4e,
|
||||||
0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64,
|
||||||
0x0c, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d,
|
0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75,
|
0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x03, 0x20,
|
||||||
0x6e, 0x74, 0x3a, 0x1f, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x19, 0x0a, 0x09, 0x0a, 0x07, 0x61, 0x63,
|
0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x3a, 0x28, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x22,
|
||||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x10,
|
0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61,
|
||||||
0x01, 0x18, 0x01, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c,
|
0x73, 0x10, 0x01, 0x18, 0x01, 0x12, 0x09, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x10, 0x02, 0x18, 0x01,
|
||||||
0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f,
|
0x18, 0x01, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74,
|
||||||
0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f,
|
0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
|
||||||
0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e,
|
||||||
0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2,
|
0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61,
|
||||||
0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31,
|
0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02,
|
||||||
0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61,
|
0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca,
|
||||||
0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75,
|
||||||
0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
|
0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -9,9 +9,10 @@ import (
|
|||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/labstack/gommon/log"
|
"github.com/labstack/gommon/log"
|
||||||
"github.com/onsonr/sonr/nebula"
|
|
||||||
"github.com/onsonr/sonr/nebula/pages"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
"github.com/onsonr/sonr/pkg/nebula"
|
||||||
|
"github.com/onsonr/sonr/pkg/nebula/pages"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewProxyCmd() *cobra.Command {
|
func NewProxyCmd() *cobra.Command {
|
||||||
|
@ -9,9 +9,10 @@ import (
|
|||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/labstack/gommon/log"
|
"github.com/labstack/gommon/log"
|
||||||
"github.com/onsonr/sonr/nebula"
|
|
||||||
"github.com/onsonr/sonr/nebula/pages"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
"github.com/onsonr/sonr/pkg/nebula"
|
||||||
|
"github.com/onsonr/sonr/pkg/nebula/pages"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewProxyCmd() *cobra.Command {
|
func NewProxyCmd() *cobra.Command {
|
||||||
|
39
devbox.json
39
devbox.json
@ -26,15 +26,36 @@
|
|||||||
},
|
},
|
||||||
"shell": {
|
"shell": {
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:docker": ["make local-image"],
|
"build:docker": [
|
||||||
"build:motr": ["cd nebula && bun run build", "make motr"],
|
"make local-image"
|
||||||
"build:nebula": ["cd nebula && bun run build"],
|
],
|
||||||
"build:sonrd": ["make dwn", "make build"],
|
"build:motr": [
|
||||||
"gen:proto": ["make proto-gen"],
|
"make nebula",
|
||||||
"gen:pkl": ["make pkl"],
|
"make motr"
|
||||||
"gen:templ": ["make templ"],
|
],
|
||||||
"start:motr": ["make templ", "make motr", "make start-motr"],
|
"build:sonrd": [
|
||||||
"start:testnet": ["make templ", "make install", "make sh-testnet"]
|
"make dwn",
|
||||||
|
"make build"
|
||||||
|
],
|
||||||
|
"gen:proto": [
|
||||||
|
"make proto-gen"
|
||||||
|
],
|
||||||
|
"gen:pkl": [
|
||||||
|
"make pkl"
|
||||||
|
],
|
||||||
|
"gen:templ": [
|
||||||
|
"make templ"
|
||||||
|
],
|
||||||
|
"start:motr": [
|
||||||
|
"make templ",
|
||||||
|
"make motr",
|
||||||
|
"make start-motr"
|
||||||
|
],
|
||||||
|
"start:testnet": [
|
||||||
|
"make templ",
|
||||||
|
"make install",
|
||||||
|
"make sh-testnet"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
// Code generated by templ - DO NOT EDIT.
|
|
||||||
|
|
||||||
// templ: version: v0.2.778
|
|
||||||
package blocks
|
|
||||||
|
|
||||||
//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"
|
|
||||||
|
|
||||||
func FooterMarketingNav() 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_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("<!-- Site footer --><footer><div class=\"max-w-6xl mx-auto px-4 sm:px-6\"><!-- Top area: Blocks --><div class=\"grid sm:grid-cols-12 gap-8 py-8 md:py-12 border-t border-zinc-200\"><!-- 1st block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-6 max-sm:order-1 flex flex-col\"><div class=\"mb-4\"><!-- Logo --><a class=\"flex items-center justify-center bg-white w-8 h-8 rounded shadow-sm shadow-zinc-950/20\" href=\"index.html\"><img src=\"./images/logo.png\" width=\"24\" height=\"24\" alt=\"Logo\"></a></div><div class=\"grow text-sm text-zinc-500\">© Cruip.com. All rights reserved.</div><!-- Social links --><ul class=\"flex space-x-4 mt-4 mb-1\"><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Twitter\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"m7.063 3 3.495 4.475L14.601 3h2.454l-5.359 5.931L18 17h-4.938l-3.866-4.893L4.771 17H2.316l5.735-6.342L2 3h5.063Zm-.74 1.347H4.866l8.875 11.232h1.36L6.323 4.347Z\"></path></svg></a></li><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Medium\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M17 2H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1Zm-1.708 3.791-.858.823a.251.251 0 0 0-.1.241V12.9a.251.251 0 0 0 .1.241l.838.823v.181h-4.215v-.181l.868-.843c.085-.085.085-.11.085-.241V7.993L9.6 14.124h-.329l-2.81-6.13V12.1a.567.567 0 0 0 .156.472l1.129 1.37v.181h-3.2v-.181l1.129-1.37a.547.547 0 0 0 .146-.472V7.351A.416.416 0 0 0 5.683 7l-1-1.209V5.61H7.8l2.4 5.283 2.122-5.283h2.971l-.001.181Z\"></path></svg></a></li><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Telegram\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M17.968 3.276a.338.338 0 0 0-.232-.253 1.192 1.192 0 0 0-.63.045S3.087 8.106 2.286 8.664c-.172.121-.23.19-.259.272-.138.4.293.573.293.573l3.613 1.177a.388.388 0 0 0 .183-.011c.822-.519 8.27-5.222 8.7-5.38.068-.02.118 0 .1.049-.172.6-6.606 6.319-6.64 6.354a.138.138 0 0 0-.05.118l-.337 3.528s-.142 1.1.956 0a30.66 30.66 0 0 1 1.9-1.738c1.242.858 2.58 1.806 3.156 2.3a1 1 0 0 0 .732.283.825.825 0 0 0 .7-.622S17.894 5.292 17.98 3.909c.008-.135.021-.217.021-.317a1.177 1.177 0 0 0-.032-.316Z\"></path></svg></a></li></ul></div><!-- 2nd block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Company</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">About us</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Diversity & Inclusion</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Blog</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Careers</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Financial statements</a></li></ul></div><!-- 3rd block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Resources</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Community</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Terms of service</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Collaboration features</a></li></ul></div><!-- 4th block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Legals</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Refund policy</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Terms & Conditions</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Privacy policy</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Brand Kit</a></li></ul></div></div></div></footer>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
var _ = templruntime.GeneratedTemplate
|
|
@ -1,21 +0,0 @@
|
|||||||
package blocks
|
|
||||||
|
|
||||||
templ Layout(title string, remote bool) {
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
@Alpine(remote)
|
|
||||||
@Htmx(remote)
|
|
||||||
@Styles(remote)
|
|
||||||
<meta charset="UTF-8"/>
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
||||||
<title>{ title }</title>
|
|
||||||
</head>
|
|
||||||
<body class="flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4">
|
|
||||||
<main class="flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3">
|
|
||||||
{ children... }
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
}
|
|
@ -1,77 +0,0 @@
|
|||||||
// Code generated by templ - DO NOT EDIT.
|
|
||||||
|
|
||||||
// templ: version: v0.2.778
|
|
||||||
package blocks
|
|
||||||
|
|
||||||
//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"
|
|
||||||
|
|
||||||
func Layout(title string, remote bool) 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_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("<!doctype html><html lang=\"en\"><head>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Err = Alpine(remote).Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Err = Htmx(remote).Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Err = Styles(remote).Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<meta charset=\"UTF-8\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
var templ_7745c5c3_Var2 string
|
|
||||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/layout.templ`, Line: 13, Col: 17}
|
|
||||||
}
|
|
||||||
_, 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("</title></head><body class=\"flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4\"><main class=\"flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3\">")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</main></body></html>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
var _ = templruntime.GeneratedTemplate
|
|
File diff suppressed because one or more lines are too long
@ -1,32 +0,0 @@
|
|||||||
package pages
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/labstack/echo/v4"
|
|
||||||
"github.com/onsonr/sonr/nebula/blocks"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Home(c echo.Context) error {
|
|
||||||
return echoResponse(c, homeView())
|
|
||||||
}
|
|
||||||
|
|
||||||
templ homeView() {
|
|
||||||
@blocks.Layout("Sonr.ID", true) {
|
|
||||||
@blocks.HeaderMarketingNav()
|
|
||||||
@blocks.SectionHero()
|
|
||||||
@blocks.Card("home-view", blocks.SizeLarge) {
|
|
||||||
@blocks.H1("Sonr.ID")
|
|
||||||
@blocks.Text("A Decentralized Web Node Client for the Sonr Network.")
|
|
||||||
@blocks.Spacer()
|
|
||||||
<div class="flex flex-col gap-3">
|
|
||||||
@blocks.Button(blocks.GET("/register", "#home-view"), blocks.PrimaryButtonStyle()) {
|
|
||||||
@blocks.Text("Get Started")
|
|
||||||
}
|
|
||||||
@blocks.Button(blocks.GET("/login", "#home-view")) {
|
|
||||||
@blocks.Text("Login")
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
@blocks.PoweredBySonr()
|
|
||||||
}
|
|
||||||
@blocks.FooterMarketingNav()
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,181 +0,0 @@
|
|||||||
// Code generated by templ - DO NOT EDIT.
|
|
||||||
|
|
||||||
// templ: version: v0.2.778
|
|
||||||
package pages
|
|
||||||
|
|
||||||
//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 (
|
|
||||||
"github.com/labstack/echo/v4"
|
|
||||||
"github.com/onsonr/sonr/nebula/blocks"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Home(c echo.Context) error {
|
|
||||||
return echoResponse(c, homeView())
|
|
||||||
}
|
|
||||||
|
|
||||||
func homeView() 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_Var1 := templ.GetChildren(ctx)
|
|
||||||
if templ_7745c5c3_Var1 == nil {
|
|
||||||
templ_7745c5c3_Var1 = templ.NopComponent
|
|
||||||
}
|
|
||||||
ctx = templ.ClearChildren(ctx)
|
|
||||||
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
||||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
||||||
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_Err = blocks.HeaderMarketingNav().Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Err = blocks.SectionHero().Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
||||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
||||||
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_Err = blocks.H1("Sonr.ID").Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Err = blocks.Text("A Decentralized Web Node Client for the Sonr Network.").Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <div class=\"flex flex-col gap-3\">")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
||||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
||||||
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_Err = blocks.Text("Get Started").Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
})
|
|
||||||
templ_7745c5c3_Err = blocks.Button(blocks.GET("/register", "#home-view"), blocks.PrimaryButtonStyle()).Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Var5 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
||||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
||||||
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_Err = blocks.Text("Login").Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
})
|
|
||||||
templ_7745c5c3_Err = blocks.Button(blocks.GET("/login", "#home-view")).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Err = blocks.PoweredBySonr().Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
})
|
|
||||||
templ_7745c5c3_Err = blocks.Card("home-view", blocks.SizeLarge).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
templ_7745c5c3_Err = blocks.FooterMarketingNav().Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
})
|
|
||||||
templ_7745c5c3_Err = blocks.Layout("Sonr.ID", true).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
var _ = templruntime.GeneratedTemplate
|
|
@ -56,7 +56,7 @@ func alertElement(attrs templ.Attributes, title, message string, icon templ.Comp
|
|||||||
var templ_7745c5c3_Var2 string
|
var templ_7745c5c3_Var2 string
|
||||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/alert.templ`, Line: 10, Col: 66}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/alert.templ`, Line: 10, Col: 66}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -69,7 +69,7 @@ func alertElement(attrs templ.Attributes, title, message string, icon templ.Comp
|
|||||||
var templ_7745c5c3_Var3 string
|
var templ_7745c5c3_Var3 string
|
||||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/alert.templ`, Line: 11, Col: 43}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/alert.templ`, Line: 11, Col: 43}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
@ -157,7 +157,7 @@ func renderHxGetButton(c *button, attrs templ.Attributes) templ.Component {
|
|||||||
var templ_7745c5c3_Var3 string
|
var templ_7745c5c3_Var3 string
|
||||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxGet)
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxGet)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/button.templ`, Line: 86, Col: 25}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/button.templ`, Line: 86, Col: 25}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -170,7 +170,7 @@ func renderHxGetButton(c *button, attrs templ.Attributes) templ.Component {
|
|||||||
var templ_7745c5c3_Var4 string
|
var templ_7745c5c3_Var4 string
|
||||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTarget)
|
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTarget)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/button.templ`, Line: 86, Col: 69}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/button.templ`, Line: 86, Col: 69}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -183,7 +183,7 @@ func renderHxGetButton(c *button, attrs templ.Attributes) templ.Component {
|
|||||||
var templ_7745c5c3_Var5 string
|
var templ_7745c5c3_Var5 string
|
||||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTrigger)
|
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTrigger)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/button.templ`, Line: 86, Col: 96}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/button.templ`, Line: 86, Col: 96}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -196,7 +196,7 @@ func renderHxGetButton(c *button, attrs templ.Attributes) templ.Component {
|
|||||||
var templ_7745c5c3_Var6 string
|
var templ_7745c5c3_Var6 string
|
||||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxSwap)
|
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxSwap)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/button.templ`, Line: 86, Col: 117}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/button.templ`, Line: 86, Col: 117}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -254,7 +254,7 @@ func renderHxPostButton(c *button, attrs templ.Attributes) templ.Component {
|
|||||||
var templ_7745c5c3_Var8 string
|
var templ_7745c5c3_Var8 string
|
||||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxPost)
|
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxPost)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/button.templ`, Line: 92, Col: 27}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/button.templ`, Line: 92, Col: 27}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -267,7 +267,7 @@ func renderHxPostButton(c *button, attrs templ.Attributes) templ.Component {
|
|||||||
var templ_7745c5c3_Var9 string
|
var templ_7745c5c3_Var9 string
|
||||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTarget)
|
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTarget)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/button.templ`, Line: 92, Col: 52}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/button.templ`, Line: 92, Col: 52}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -280,7 +280,7 @@ func renderHxPostButton(c *button, attrs templ.Attributes) templ.Component {
|
|||||||
var templ_7745c5c3_Var10 string
|
var templ_7745c5c3_Var10 string
|
||||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTrigger)
|
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTrigger)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/button.templ`, Line: 92, Col: 79}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/button.templ`, Line: 92, Col: 79}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -293,7 +293,7 @@ func renderHxPostButton(c *button, attrs templ.Attributes) templ.Component {
|
|||||||
var templ_7745c5c3_Var11 string
|
var templ_7745c5c3_Var11 string
|
||||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxSwap)
|
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxSwap)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/button.templ`, Line: 92, Col: 100}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/button.templ`, Line: 92, Col: 100}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
@ -40,7 +40,7 @@ func renderCard(id string, attrs templ.Attributes) templ.Component {
|
|||||||
var templ_7745c5c3_Var2 string
|
var templ_7745c5c3_Var2 string
|
||||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/card.templ`, Line: 8, Col: 13}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/card.templ`, Line: 8, Col: 13}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
@ -54,7 +54,7 @@ func renderText(level int, text string) templ.Component {
|
|||||||
var templ_7745c5c3_Var2 string
|
var templ_7745c5c3_Var2 string
|
||||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/fonts.templ`, Line: 23, Col: 10}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/fonts.templ`, Line: 23, Col: 10}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -72,7 +72,7 @@ func renderText(level int, text string) templ.Component {
|
|||||||
var templ_7745c5c3_Var3 string
|
var templ_7745c5c3_Var3 string
|
||||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/fonts.templ`, Line: 27, Col: 10}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/fonts.templ`, Line: 27, Col: 10}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -90,7 +90,7 @@ func renderText(level int, text string) templ.Component {
|
|||||||
var templ_7745c5c3_Var4 string
|
var templ_7745c5c3_Var4 string
|
||||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/fonts.templ`, Line: 31, Col: 10}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/fonts.templ`, Line: 31, Col: 10}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -108,7 +108,7 @@ func renderText(level int, text string) templ.Component {
|
|||||||
var templ_7745c5c3_Var5 string
|
var templ_7745c5c3_Var5 string
|
||||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/fonts.templ`, Line: 35, Col: 10}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/fonts.templ`, Line: 35, Col: 10}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -159,7 +159,7 @@ func renderLink(attrs templ.Attributes, text string) templ.Component {
|
|||||||
var templ_7745c5c3_Var7 string
|
var templ_7745c5c3_Var7 string
|
||||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/fonts.templ`, Line: 42, Col: 8}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/fonts.templ`, Line: 42, Col: 8}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -209,7 +209,7 @@ func renderStrong(attrs templ.Attributes, text string) templ.Component {
|
|||||||
var templ_7745c5c3_Var9 string
|
var templ_7745c5c3_Var9 string
|
||||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/fonts.templ`, Line: 48, Col: 8}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/fonts.templ`, Line: 48, Col: 8}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -259,7 +259,7 @@ func renderEmphasis(attrs templ.Attributes, text string) templ.Component {
|
|||||||
var templ_7745c5c3_Var11 string
|
var templ_7745c5c3_Var11 string
|
||||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/fonts.templ`, Line: 54, Col: 8}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/fonts.templ`, Line: 54, Col: 8}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -309,7 +309,7 @@ func renderCode(attrs templ.Attributes, text string) templ.Component {
|
|||||||
var templ_7745c5c3_Var13 string
|
var templ_7745c5c3_Var13 string
|
||||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/fonts.templ`, Line: 60, Col: 8}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/fonts.templ`, Line: 60, Col: 8}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
@ -46,7 +46,7 @@ func TextInput(state InputState, label string, placeholder string) templ.Compone
|
|||||||
var templ_7745c5c3_Var2 string
|
var templ_7745c5c3_Var2 string
|
||||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/inputs.templ`, Line: 15, Col: 128}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/inputs.templ`, Line: 15, Col: 128}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -64,7 +64,7 @@ func TextInput(state InputState, label string, placeholder string) templ.Compone
|
|||||||
var templ_7745c5c3_Var3 string
|
var templ_7745c5c3_Var3 string
|
||||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/inputs.templ`, Line: 20, Col: 128}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/inputs.templ`, Line: 20, Col: 128}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -82,7 +82,7 @@ func TextInput(state InputState, label string, placeholder string) templ.Compone
|
|||||||
var templ_7745c5c3_Var4 string
|
var templ_7745c5c3_Var4 string
|
||||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/inputs.templ`, Line: 25, Col: 128}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/inputs.templ`, Line: 25, Col: 128}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
45
pkg/nebula/components/blocks/layout.templ
Normal file
45
pkg/nebula/components/blocks/layout.templ
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
package blocks
|
||||||
|
|
||||||
|
templ Layout(title string, remote bool) {
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
@Alpine(remote)
|
||||||
|
@Htmx(remote)
|
||||||
|
@Styles(remote)
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>{ title }</title>
|
||||||
|
<!-- Sets the status bar style to transparent -->
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
||||||
|
</head>
|
||||||
|
<body class="flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4">
|
||||||
|
<main class="flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3">
|
||||||
|
{ children... }
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
}
|
||||||
|
|
||||||
|
templ LayoutNoBody(title string, remote bool) {
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
@Alpine(remote)
|
||||||
|
@Htmx(remote)
|
||||||
|
@Styles(remote)
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>{ title }</title>
|
||||||
|
<!-- Sets the status bar style to transparent -->
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
||||||
|
</head>
|
||||||
|
<main class="grow">
|
||||||
|
{ children... }
|
||||||
|
</main>
|
||||||
|
</html>
|
||||||
|
}
|
143
pkg/nebula/components/blocks/layout_templ.go
Normal file
143
pkg/nebula/components/blocks/layout_templ.go
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
// Code generated by templ - DO NOT EDIT.
|
||||||
|
|
||||||
|
// templ: version: v0.2.778
|
||||||
|
package blocks
|
||||||
|
|
||||||
|
//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"
|
||||||
|
|
||||||
|
func Layout(title string, remote bool) 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_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("<!doctype html><html lang=\"en\"><head>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = Alpine(remote).Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = Htmx(remote).Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = Styles(remote).Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<meta charset=\"UTF-8\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var2 string
|
||||||
|
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/layout.templ`, Line: 13, Col: 17}
|
||||||
|
}
|
||||||
|
_, 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("</title><!-- Sets the status bar style to transparent --><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"></head><body class=\"flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4\"><main class=\"flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3\">")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</main></body></html>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func LayoutNoBody(title string, remote bool) 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_Var3 := templ.GetChildren(ctx)
|
||||||
|
if templ_7745c5c3_Var3 == nil {
|
||||||
|
templ_7745c5c3_Var3 = templ.NopComponent
|
||||||
|
}
|
||||||
|
ctx = templ.ClearChildren(ctx)
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = Alpine(remote).Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = Htmx(remote).Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = Styles(remote).Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<meta charset=\"UTF-8\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var4 string
|
||||||
|
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/layout.templ`, Line: 36, Col: 17}
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><!-- Sets the status bar style to transparent --><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"></head><main class=\"grow\">")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = templ_7745c5c3_Var3.Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</main></html>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ = templruntime.GeneratedTemplate
|
@ -100,7 +100,7 @@ func breadcrumbItem(title string, active bool) templ.Component {
|
|||||||
var templ_7745c5c3_Var3 string
|
var templ_7745c5c3_Var3 string
|
||||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/panel.templ`, Line: 25, Col: 126}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/panel.templ`, Line: 25, Col: 126}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@ -118,7 +118,7 @@ func breadcrumbItem(title string, active bool) templ.Component {
|
|||||||
var templ_7745c5c3_Var4 string
|
var templ_7745c5c3_Var4 string
|
||||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `nebula/blocks/panel.templ`, Line: 27, Col: 118}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/panel.templ`, Line: 27, Col: 118}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
@ -1,4 +1,4 @@
|
|||||||
package blocks
|
package sections
|
||||||
|
|
||||||
templ FooterMarketingNav() {
|
templ FooterMarketingNav() {
|
||||||
<!-- Site footer -->
|
<!-- Site footer -->
|
||||||
@ -10,8 +10,8 @@ templ FooterMarketingNav() {
|
|||||||
<div class="sm:col-span-6 md:col-span-3 lg:col-span-6 max-sm:order-1 flex flex-col">
|
<div class="sm:col-span-6 md:col-span-3 lg:col-span-6 max-sm:order-1 flex flex-col">
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
<a class="flex items-center justify-center bg-white w-8 h-8 rounded shadow-sm shadow-zinc-950/20" href="index.html">
|
<a class="flex items-center justify-center bg-white w-8 h-8 rounded-full shadow-sm shadow-zinc-950/20" href="/">
|
||||||
<img src="./images/logo.png" width="24" height="24" alt="Logo"/>
|
<img src="https://cdn.sonr.id/logo-zinc.svg" width="24" height="24" alt="Logo"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="grow text-sm text-zinc-500">© Cruip.com. All rights reserved.</div>
|
<div class="grow text-sm text-zinc-500">© Cruip.com. All rights reserved.</div>
|
40
pkg/nebula/components/sections/footer_templ.go
Normal file
40
pkg/nebula/components/sections/footer_templ.go
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Code generated by templ - DO NOT EDIT.
|
||||||
|
|
||||||
|
// templ: version: v0.2.778
|
||||||
|
package sections
|
||||||
|
|
||||||
|
//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"
|
||||||
|
|
||||||
|
func FooterMarketingNav() 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_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("<!-- Site footer --><footer><div class=\"max-w-6xl mx-auto px-4 sm:px-6\"><!-- Top area: Blocks --><div class=\"grid sm:grid-cols-12 gap-8 py-8 md:py-12 border-t border-zinc-200\"><!-- 1st block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-6 max-sm:order-1 flex flex-col\"><div class=\"mb-4\"><!-- Logo --><a class=\"flex items-center justify-center bg-white w-8 h-8 rounded-full shadow-sm shadow-zinc-950/20\" href=\"/\"><img src=\"https://cdn.sonr.id/logo-zinc.svg\" width=\"24\" height=\"24\" alt=\"Logo\"></a></div><div class=\"grow text-sm text-zinc-500\">© Cruip.com. All rights reserved.</div><!-- Social links --><ul class=\"flex space-x-4 mt-4 mb-1\"><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Twitter\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"m7.063 3 3.495 4.475L14.601 3h2.454l-5.359 5.931L18 17h-4.938l-3.866-4.893L4.771 17H2.316l5.735-6.342L2 3h5.063Zm-.74 1.347H4.866l8.875 11.232h1.36L6.323 4.347Z\"></path></svg></a></li><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Medium\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M17 2H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1Zm-1.708 3.791-.858.823a.251.251 0 0 0-.1.241V12.9a.251.251 0 0 0 .1.241l.838.823v.181h-4.215v-.181l.868-.843c.085-.085.085-.11.085-.241V7.993L9.6 14.124h-.329l-2.81-6.13V12.1a.567.567 0 0 0 .156.472l1.129 1.37v.181h-3.2v-.181l1.129-1.37a.547.547 0 0 0 .146-.472V7.351A.416.416 0 0 0 5.683 7l-1-1.209V5.61H7.8l2.4 5.283 2.122-5.283h2.971l-.001.181Z\"></path></svg></a></li><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Telegram\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M17.968 3.276a.338.338 0 0 0-.232-.253 1.192 1.192 0 0 0-.63.045S3.087 8.106 2.286 8.664c-.172.121-.23.19-.259.272-.138.4.293.573.293.573l3.613 1.177a.388.388 0 0 0 .183-.011c.822-.519 8.27-5.222 8.7-5.38.068-.02.118 0 .1.049-.172.6-6.606 6.319-6.64 6.354a.138.138 0 0 0-.05.118l-.337 3.528s-.142 1.1.956 0a30.66 30.66 0 0 1 1.9-1.738c1.242.858 2.58 1.806 3.156 2.3a1 1 0 0 0 .732.283.825.825 0 0 0 .7-.622S17.894 5.292 17.98 3.909c.008-.135.021-.217.021-.317a1.177 1.177 0 0 0-.032-.316Z\"></path></svg></a></li></ul></div><!-- 2nd block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Company</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">About us</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Diversity & Inclusion</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Blog</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Careers</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Financial statements</a></li></ul></div><!-- 3rd block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Resources</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Community</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Terms of service</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Collaboration features</a></li></ul></div><!-- 4th block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Legals</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Refund policy</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Terms & Conditions</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Privacy policy</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Brand Kit</a></li></ul></div></div></div></footer>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ = templruntime.GeneratedTemplate
|
@ -1,4 +1,4 @@
|
|||||||
package blocks
|
package sections
|
||||||
|
|
||||||
templ HeaderMarketingNav() {
|
templ HeaderMarketingNav() {
|
||||||
<!-- Site header -->
|
<!-- Site header -->
|
||||||
@ -9,8 +9,8 @@ templ HeaderMarketingNav() {
|
|||||||
<!-- Site branding -->
|
<!-- Site branding -->
|
||||||
<div class="shrink-0 mr-4">
|
<div class="shrink-0 mr-4">
|
||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
<a class="flex items-center justify-center bg-white w-8 h-8 rounded shadow-sm shadow-zinc-950/20" href="index.html">
|
<a class="flex items-center justify-center bg-white w-8 h-8 rounded-full shadow-sm shadow-zinc-950/20" href="/">
|
||||||
<img src="./images/logo.png" width="24" height="24" alt="Logo"/>
|
<img src="https://cdn.sonr.id/logo-zinc.svg" width="24" height="24" alt="Logo"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- Desktop navigation -->
|
<!-- Desktop navigation -->
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by templ - DO NOT EDIT.
|
// Code generated by templ - DO NOT EDIT.
|
||||||
|
|
||||||
// templ: version: v0.2.778
|
// templ: version: v0.2.778
|
||||||
package blocks
|
package sections
|
||||||
|
|
||||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ func HeaderMarketingNav() templ.Component {
|
|||||||
templ_7745c5c3_Var1 = templ.NopComponent
|
templ_7745c5c3_Var1 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Site header --><header class=\"absolute top-2 md:top-6 w-full z-30\"><div class=\"px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto\"><div class=\"flex items-center justify-between h-14 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] rounded-lg px-3\"><!-- Site branding --><div class=\"shrink-0 mr-4\"><!-- Logo --><a class=\"flex items-center justify-center bg-white w-8 h-8 rounded shadow-sm shadow-zinc-950/20\" href=\"index.html\"><img src=\"./images/logo.png\" width=\"24\" height=\"24\" alt=\"Logo\"></a></div><!-- Desktop navigation --><nav class=\"flex grow\"><!-- Desktop sign in links --><ul class=\"flex grow justify-end flex-wrap items-center\"><li><a class=\"text-sm font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition\" href=\"login.html\">Log in</a></li><li class=\"ml-1\"><a class=\"btn-sm text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow\" href=\"request-demo.html\">Request Demo</a></li></ul></nav></div></div></div></header>")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Site header --><header class=\"absolute top-2 md:top-6 w-full z-30\"><div class=\"px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto\"><div class=\"flex items-center justify-between h-14 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] rounded-lg px-3\"><!-- Site branding --><div class=\"shrink-0 mr-4\"><!-- Logo --><a class=\"flex items-center justify-center bg-white w-8 h-8 rounded-full shadow-sm shadow-zinc-950/20\" href=\"/\"><img src=\"https://cdn.sonr.id/logo-zinc.svg\" width=\"24\" height=\"24\" alt=\"Logo\"></a></div><!-- Desktop navigation --><nav class=\"flex grow\"><!-- Desktop sign in links --><ul class=\"flex grow justify-end flex-wrap items-center\"><li><a class=\"text-sm font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition\" href=\"login.html\">Log in</a></li><li class=\"ml-1\"><a class=\"btn-sm text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow\" href=\"request-demo.html\">Request Demo</a></li></ul></nav></div></div></div></header>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
@ -1,6 +1,19 @@
|
|||||||
package blocks
|
package sections
|
||||||
|
|
||||||
templ SectionHero() {
|
type Hero struct {
|
||||||
|
TitleFirst string
|
||||||
|
TitleEmphasis string
|
||||||
|
TitleSecond string
|
||||||
|
Subtitle string
|
||||||
|
|
||||||
|
PrimaryButtonText string
|
||||||
|
PrimaryButtonLink string
|
||||||
|
|
||||||
|
SecondaryButtonText string
|
||||||
|
SecondaryButtonLink string
|
||||||
|
}
|
||||||
|
|
||||||
|
templ SectionHero(hero Hero) {
|
||||||
<!-- Hero -->
|
<!-- Hero -->
|
||||||
<section class="relative before:absolute before:inset-0 before:h-80 before:pointer-events-none before:bg-gradient-to-b before:from-zinc-100 before:-z-10">
|
<section class="relative before:absolute before:inset-0 before:h-80 before:pointer-events-none before:bg-gradient-to-b before:from-zinc-100 before:-z-10">
|
||||||
<div class="pt-32 pb-12 md:pt-40 md:pb-20">
|
<div class="pt-32 pb-12 md:pt-40 md:pb-20">
|
||||||
@ -9,24 +22,24 @@ templ SectionHero() {
|
|||||||
<div class="max-w-3xl mx-auto">
|
<div class="max-w-3xl mx-auto">
|
||||||
<div class="text-center pb-12 md:pb-16">
|
<div class="text-center pb-12 md:pb-16">
|
||||||
<h1 class="font-inter-tight text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-zinc-500 via-zinc-900 to-zinc-900 pb-4">
|
<h1 class="font-inter-tight text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-zinc-500 via-zinc-900 to-zinc-900 pb-4">
|
||||||
The creative
|
{ hero.TitleFirst }
|
||||||
<em class="italic relative inline-flex justify-center items-center text-zinc-900">
|
<em class="italic relative inline-flex justify-center items-center text-zinc-900">
|
||||||
platform
|
{ hero.TitleEmphasis }
|
||||||
<svg class="absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10" xmlns="http://www.w3.org/2000/svg" width="223" height="62" viewBox="0 0 223 62" aria-hidden="true" preserveAspectRatio="none">
|
<svg class="absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10" xmlns="http://www.w3.org/2000/svg" width="223" height="62" viewBox="0 0 223 62" aria-hidden="true" preserveAspectRatio="none">
|
||||||
<path d="M45.654 53.62c17.666 3.154 35.622 4.512 53.558 4.837 17.94.288 35.91-.468 53.702-2.54 8.89-1.062 17.742-2.442 26.455-4.352 8.684-1.945 17.338-4.3 25.303-7.905 3.94-1.81 7.79-3.962 10.634-6.777 1.38-1.41 2.424-2.994 2.758-4.561.358-1.563-.078-3.143-1.046-4.677-.986-1.524-2.43-2.96-4.114-4.175a37.926 37.926 0 0 0-5.422-3.32c-3.84-1.977-7.958-3.563-12.156-4.933-8.42-2.707-17.148-4.653-25.95-6.145-8.802-1.52-17.702-2.56-26.622-3.333-17.852-1.49-35.826-1.776-53.739-.978-8.953.433-17.898 1.125-26.79 2.22-8.887 1.095-17.738 2.541-26.428 4.616-4.342 1.037-8.648 2.226-12.853 3.676-4.197 1.455-8.314 3.16-12.104 5.363-1.862 1.13-3.706 2.333-5.218 3.829-1.52 1.47-2.79 3.193-3.285 5.113-.528 1.912-.127 3.965.951 5.743 1.07 1.785 2.632 3.335 4.348 4.68 2.135 1.652 3.2 2.672 2.986 3.083-.18.362-1.674.114-4.08-1.638-1.863-1.387-3.63-3.014-4.95-5.09C.94 35.316.424 34.148.171 32.89c-.275-1.253-.198-2.579.069-3.822.588-2.515 2.098-4.582 3.76-6.276 1.673-1.724 3.612-3.053 5.57-4.303 3.96-2.426 8.177-4.278 12.457-5.868 4.287-1.584 8.654-2.89 13.054-4.036 8.801-2.292 17.74-3.925 26.716-5.19C70.777 2.131 79.805 1.286 88.846.723c18.087-1.065 36.236-.974 54.325.397 9.041.717 18.07 1.714 27.042 3.225 8.972 1.485 17.895 3.444 26.649 6.253 4.37 1.426 8.697 3.083 12.878 5.243a42.11 42.11 0 0 1 6.094 3.762c1.954 1.44 3.823 3.2 5.283 5.485a12.515 12.515 0 0 1 1.63 3.88c.164.706.184 1.463.253 2.193-.063.73-.094 1.485-.247 2.195-.652 2.886-2.325 5.141-4.09 6.934-3.635 3.533-7.853 5.751-12.083 7.688-8.519 3.778-17.394 6.09-26.296 7.998-8.917 1.86-17.913 3.152-26.928 4.104-18.039 1.851-36.17 2.295-54.239 1.622-18.062-.713-36.112-2.535-53.824-6.23-5.941-1.31-5.217-2.91.361-1.852"></path>
|
<path d="M45.654 53.62c17.666 3.154 35.622 4.512 53.558 4.837 17.94.288 35.91-.468 53.702-2.54 8.89-1.062 17.742-2.442 26.455-4.352 8.684-1.945 17.338-4.3 25.303-7.905 3.94-1.81 7.79-3.962 10.634-6.777 1.38-1.41 2.424-2.994 2.758-4.561.358-1.563-.078-3.143-1.046-4.677-.986-1.524-2.43-2.96-4.114-4.175a37.926 37.926 0 0 0-5.422-3.32c-3.84-1.977-7.958-3.563-12.156-4.933-8.42-2.707-17.148-4.653-25.95-6.145-8.802-1.52-17.702-2.56-26.622-3.333-17.852-1.49-35.826-1.776-53.739-.978-8.953.433-17.898 1.125-26.79 2.22-8.887 1.095-17.738 2.541-26.428 4.616-4.342 1.037-8.648 2.226-12.853 3.676-4.197 1.455-8.314 3.16-12.104 5.363-1.862 1.13-3.706 2.333-5.218 3.829-1.52 1.47-2.79 3.193-3.285 5.113-.528 1.912-.127 3.965.951 5.743 1.07 1.785 2.632 3.335 4.348 4.68 2.135 1.652 3.2 2.672 2.986 3.083-.18.362-1.674.114-4.08-1.638-1.863-1.387-3.63-3.014-4.95-5.09C.94 35.316.424 34.148.171 32.89c-.275-1.253-.198-2.579.069-3.822.588-2.515 2.098-4.582 3.76-6.276 1.673-1.724 3.612-3.053 5.57-4.303 3.96-2.426 8.177-4.278 12.457-5.868 4.287-1.584 8.654-2.89 13.054-4.036 8.801-2.292 17.74-3.925 26.716-5.19C70.777 2.131 79.805 1.286 88.846.723c18.087-1.065 36.236-.974 54.325.397 9.041.717 18.07 1.714 27.042 3.225 8.972 1.485 17.895 3.444 26.649 6.253 4.37 1.426 8.697 3.083 12.878 5.243a42.11 42.11 0 0 1 6.094 3.762c1.954 1.44 3.823 3.2 5.283 5.485a12.515 12.515 0 0 1 1.63 3.88c.164.706.184 1.463.253 2.193-.063.73-.094 1.485-.247 2.195-.652 2.886-2.325 5.141-4.09 6.934-3.635 3.533-7.853 5.751-12.083 7.688-8.519 3.778-17.394 6.09-26.296 7.998-8.917 1.86-17.913 3.152-26.928 4.104-18.039 1.851-36.17 2.295-54.239 1.622-18.062-.713-36.112-2.535-53.824-6.23-5.941-1.31-5.217-2.91.361-1.852"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</em>
|
</em>
|
||||||
for cross-functional work
|
{ hero.TitleSecond }
|
||||||
</h1>
|
</h1>
|
||||||
<p class="text-lg text-zinc-500 mb-8">
|
<p class="text-lg text-zinc-500 mb-8">
|
||||||
Turbocharge your creative process with a powerful AI design platform that gives creatives the power of creating without limits.
|
{ hero.Subtitle }
|
||||||
</p>
|
</p>
|
||||||
<div class="max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4">
|
<div class="max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4">
|
||||||
<div>
|
<div>
|
||||||
<a class="btn text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" href="request-demo.html">Request Demo</a>
|
<a class="btn text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" href={ templ.SafeURL(hero.PrimaryButtonLink) }>{ hero.PrimaryButtonText }</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="btn text-zinc-600 bg-white hover:text-zinc-900 w-full shadow" href="#0">Try for Free</a>
|
<a class="btn text-zinc-600 bg-white hover:text-zinc-900 w-full shadow" href={ templ.SafeURL(hero.SecondaryButtonLink) }>{ hero.SecondaryButtonText }</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -34,7 +47,7 @@ templ SectionHero() {
|
|||||||
</div>
|
</div>
|
||||||
<!-- Image -->
|
<!-- Image -->
|
||||||
<div class="max-w-6xl mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10">
|
<div class="max-w-6xl mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10">
|
||||||
<img class="rounded-lg shadow-2xl" src="./images/hero-image.png" width="1104" height="620" alt="Hero"/>
|
<img class="rounded-lg shadow-2xl" src="https://cdn.sonr.id/img/hero-safe.svg" width="620" height="620" alt="Hero"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- Stats -->
|
<!-- Stats -->
|
||||||
<div class="max-w-6xl mx-auto px-4 sm:px-6">
|
<div class="max-w-6xl mx-auto px-4 sm:px-6">
|
||||||
@ -60,9 +73,14 @@ templ SectionHero() {
|
|||||||
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Animate counter functionality: https://github.com/alpinejs/alpine -->
|
@counterAnimation()
|
||||||
<script>
|
</div>
|
||||||
document.addEventListener('alpine:init', () => {
|
</div>
|
||||||
|
</section>
|
||||||
|
}
|
||||||
|
|
||||||
|
script counterAnimation() {
|
||||||
|
document.addEventListener('alpine:init', () => {
|
||||||
Alpine.data('counter', (target = 0, duration = 3000) => ({
|
Alpine.data('counter', (target = 0, duration = 3000) => ({
|
||||||
startTimestamp: null,
|
startTimestamp: null,
|
||||||
step: null,
|
step: null,
|
||||||
@ -110,8 +128,4 @@ templ SectionHero() {
|
|||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
}
|
}
|
214
pkg/nebula/components/sections/hero_templ.go
Normal file
214
pkg/nebula/components/sections/hero_templ.go
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
// Code generated by templ - DO NOT EDIT.
|
||||||
|
|
||||||
|
// templ: version: v0.2.778
|
||||||
|
package sections
|
||||||
|
|
||||||
|
//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"
|
||||||
|
|
||||||
|
type Hero struct {
|
||||||
|
TitleFirst string
|
||||||
|
TitleEmphasis string
|
||||||
|
TitleSecond string
|
||||||
|
Subtitle string
|
||||||
|
|
||||||
|
PrimaryButtonText string
|
||||||
|
PrimaryButtonLink string
|
||||||
|
|
||||||
|
SecondaryButtonText string
|
||||||
|
SecondaryButtonLink string
|
||||||
|
}
|
||||||
|
|
||||||
|
func SectionHero(hero Hero) 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_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("<!-- Hero --><section class=\"relative before:absolute before:inset-0 before:h-80 before:pointer-events-none before:bg-gradient-to-b before:from-zinc-100 before:-z-10\"><div class=\"pt-32 pb-12 md:pt-40 md:pb-20\"><!-- Section content --><div class=\"px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto\"><div class=\"text-center pb-12 md:pb-16\"><h1 class=\"font-inter-tight text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-zinc-500 via-zinc-900 to-zinc-900 pb-4\">")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var2 string
|
||||||
|
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleFirst)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/sections/hero.templ`, Line: 25, Col: 24}
|
||||||
|
}
|
||||||
|
_, 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(" <em class=\"italic relative inline-flex justify-center items-center text-zinc-900\">")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var3 string
|
||||||
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleEmphasis)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/sections/hero.templ`, Line: 27, Col: 28}
|
||||||
|
}
|
||||||
|
_, 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(" <svg class=\"absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10\" xmlns=\"http://www.w3.org/2000/svg\" width=\"223\" height=\"62\" viewBox=\"0 0 223 62\" aria-hidden=\"true\" preserveAspectRatio=\"none\"><path d=\"M45.654 53.62c17.666 3.154 35.622 4.512 53.558 4.837 17.94.288 35.91-.468 53.702-2.54 8.89-1.062 17.742-2.442 26.455-4.352 8.684-1.945 17.338-4.3 25.303-7.905 3.94-1.81 7.79-3.962 10.634-6.777 1.38-1.41 2.424-2.994 2.758-4.561.358-1.563-.078-3.143-1.046-4.677-.986-1.524-2.43-2.96-4.114-4.175a37.926 37.926 0 0 0-5.422-3.32c-3.84-1.977-7.958-3.563-12.156-4.933-8.42-2.707-17.148-4.653-25.95-6.145-8.802-1.52-17.702-2.56-26.622-3.333-17.852-1.49-35.826-1.776-53.739-.978-8.953.433-17.898 1.125-26.79 2.22-8.887 1.095-17.738 2.541-26.428 4.616-4.342 1.037-8.648 2.226-12.853 3.676-4.197 1.455-8.314 3.16-12.104 5.363-1.862 1.13-3.706 2.333-5.218 3.829-1.52 1.47-2.79 3.193-3.285 5.113-.528 1.912-.127 3.965.951 5.743 1.07 1.785 2.632 3.335 4.348 4.68 2.135 1.652 3.2 2.672 2.986 3.083-.18.362-1.674.114-4.08-1.638-1.863-1.387-3.63-3.014-4.95-5.09C.94 35.316.424 34.148.171 32.89c-.275-1.253-.198-2.579.069-3.822.588-2.515 2.098-4.582 3.76-6.276 1.673-1.724 3.612-3.053 5.57-4.303 3.96-2.426 8.177-4.278 12.457-5.868 4.287-1.584 8.654-2.89 13.054-4.036 8.801-2.292 17.74-3.925 26.716-5.19C70.777 2.131 79.805 1.286 88.846.723c18.087-1.065 36.236-.974 54.325.397 9.041.717 18.07 1.714 27.042 3.225 8.972 1.485 17.895 3.444 26.649 6.253 4.37 1.426 8.697 3.083 12.878 5.243a42.11 42.11 0 0 1 6.094 3.762c1.954 1.44 3.823 3.2 5.283 5.485a12.515 12.515 0 0 1 1.63 3.88c.164.706.184 1.463.253 2.193-.063.73-.094 1.485-.247 2.195-.652 2.886-2.325 5.141-4.09 6.934-3.635 3.533-7.853 5.751-12.083 7.688-8.519 3.778-17.394 6.09-26.296 7.998-8.917 1.86-17.913 3.152-26.928 4.104-18.039 1.851-36.17 2.295-54.239 1.622-18.062-.713-36.112-2.535-53.824-6.23-5.941-1.31-5.217-2.91.361-1.852\"></path></svg></em> ")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var4 string
|
||||||
|
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleSecond)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/sections/hero.templ`, Line: 32, Col: 25}
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1><p class=\"text-lg text-zinc-500 mb-8\">")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var5 string
|
||||||
|
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Subtitle)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/sections/hero.templ`, Line: 35, Col: 22}
|
||||||
|
}
|
||||||
|
_, 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("</p><div class=\"max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4\"><div><a class=\"btn text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow\" href=\"")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var6 templ.SafeURL = templ.SafeURL(hero.PrimaryButtonLink)
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var6)))
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var7 string
|
||||||
|
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(hero.PrimaryButtonText)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/sections/hero.templ`, Line: 39, Col: 152}
|
||||||
|
}
|
||||||
|
_, 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("</a></div><div><a class=\"btn text-zinc-600 bg-white hover:text-zinc-900 w-full shadow\" href=\"")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var8 templ.SafeURL = templ.SafeURL(hero.SecondaryButtonLink)
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var8)))
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var9 string
|
||||||
|
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hero.SecondaryButtonText)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/sections/hero.templ`, Line: 42, Col: 155}
|
||||||
|
}
|
||||||
|
_, 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("</a></div></div></div></div></div><!-- Image --><div class=\"max-w-6xl mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10\"><img class=\"rounded-lg shadow-2xl\" src=\"https://cdn.sonr.id/img/hero-safe.svg\" width=\"620\" height=\"620\" alt=\"Hero\"></div><!-- Stats --><div class=\"max-w-6xl mx-auto px-4 sm:px-6\"><div class=\"max-w-sm mx-auto grid gap-12 sm:grid-cols-2 md:grid-cols-4 md:-mx-5 md:gap-0 items-start md:max-w-none\"><!-- 1st item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(476)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 2nd item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(1.44)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 3rd item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(1.5)\" x-text=\"counterValue\">0</span>M+</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 4th item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(192)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div></div>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = counterAnimation().Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></section>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func counterAnimation() templ.ComponentScript {
|
||||||
|
return templ.ComponentScript{
|
||||||
|
Name: `__templ_counterAnimation_57a0`,
|
||||||
|
Function: `function __templ_counterAnimation_57a0(){document.addEventListener('alpine:init', () => {
|
||||||
|
Alpine.data('counter', (target = 0, duration = 3000) => ({
|
||||||
|
startTimestamp: null,
|
||||||
|
step: null,
|
||||||
|
rawValue: 0,
|
||||||
|
counterValue: 0,
|
||||||
|
target: target,
|
||||||
|
precision: (target % 1 === 0) ? 0 : (target.toString().split('.')[1] || []).length,
|
||||||
|
animationRequestId: null,
|
||||||
|
animationCompleted: false,
|
||||||
|
observer: null,
|
||||||
|
init() {
|
||||||
|
// Intersection observer to watch visibility
|
||||||
|
this.observer = new IntersectionObserver(entries => {
|
||||||
|
entries.forEach(entry => {
|
||||||
|
// Check if element is in view
|
||||||
|
if (entry.isIntersecting && !this.animationCompleted) {
|
||||||
|
this.startAnimation()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.observer.observe(this.$el)
|
||||||
|
},
|
||||||
|
startAnimation() {
|
||||||
|
this.step = (timestamp) => {
|
||||||
|
if (!this.startTimestamp) this.startTimestamp = timestamp
|
||||||
|
const progress = Math.min((timestamp - this.startTimestamp) / duration, 1)
|
||||||
|
const easedProgress = this.easeOut(progress)
|
||||||
|
this.rawValue = parseFloat((easedProgress * this.target).toFixed(this.precision))
|
||||||
|
this.counterValue = this.rawValue.toFixed(this.precision)
|
||||||
|
if (progress < 1) {
|
||||||
|
this.animationRequestId = window.requestAnimationFrame(this.step)
|
||||||
|
} else {
|
||||||
|
this.animationCompleted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.animationRequestId = window.requestAnimationFrame(this.step);
|
||||||
|
},
|
||||||
|
easeOut(t) {
|
||||||
|
return 1 - Math.pow(1 - t, 5)
|
||||||
|
},
|
||||||
|
destroy() {
|
||||||
|
// Detach the handler, avoiding memory and side-effect leakage
|
||||||
|
this.animationRequestId && window.cancelAnimationFrame(this.step)
|
||||||
|
this.observer && this.observer.disconnect()
|
||||||
|
},
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
}`,
|
||||||
|
Call: templ.SafeScript(`__templ_counterAnimation_57a0`),
|
||||||
|
CallInline: templ.SafeScriptInline(`__templ_counterAnimation_57a0`),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ = templruntime.GeneratedTemplate
|
29
pkg/nebula/pages/home.templ
Normal file
29
pkg/nebula/pages/home.templ
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package pages
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/labstack/echo/v4"
|
||||||
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||||
|
"github.com/onsonr/sonr/pkg/nebula/components/sections"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Home(c echo.Context) error {
|
||||||
|
hero := sections.Hero{
|
||||||
|
TitleFirst: "Sonr.ID",
|
||||||
|
TitleEmphasis: "platform",
|
||||||
|
TitleSecond: "for cross-functional work",
|
||||||
|
Subtitle: "Turbocharge your creative process with a powerful AI design platform that gives creatives the power of creating without limits.",
|
||||||
|
PrimaryButtonText: "Request Demo",
|
||||||
|
PrimaryButtonLink: "request-demo.html",
|
||||||
|
SecondaryButtonText: "Try for Free",
|
||||||
|
SecondaryButtonLink: "#0",
|
||||||
|
}
|
||||||
|
return echoResponse(c, homeView(hero))
|
||||||
|
}
|
||||||
|
|
||||||
|
templ homeView(hero sections.Hero) {
|
||||||
|
@blocks.LayoutNoBody("Sonr.ID", true) {
|
||||||
|
@sections.HeaderMarketingNav()
|
||||||
|
@sections.SectionHero(hero)
|
||||||
|
@sections.FooterMarketingNav()
|
||||||
|
}
|
||||||
|
}
|
94
pkg/nebula/pages/home_templ.go
Normal file
94
pkg/nebula/pages/home_templ.go
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
// Code generated by templ - DO NOT EDIT.
|
||||||
|
|
||||||
|
// templ: version: v0.2.778
|
||||||
|
package pages
|
||||||
|
|
||||||
|
//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 (
|
||||||
|
"github.com/labstack/echo/v4"
|
||||||
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||||
|
"github.com/onsonr/sonr/pkg/nebula/components/sections"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Home(c echo.Context) error {
|
||||||
|
hero := sections.Hero{
|
||||||
|
TitleFirst: "Sonr.ID",
|
||||||
|
TitleEmphasis: "platform",
|
||||||
|
TitleSecond: "for cross-functional work",
|
||||||
|
Subtitle: "Turbocharge your creative process with a powerful AI design platform that gives creatives the power of creating without limits.",
|
||||||
|
PrimaryButtonText: "Request Demo",
|
||||||
|
PrimaryButtonLink: "request-demo.html",
|
||||||
|
SecondaryButtonText: "Try for Free",
|
||||||
|
SecondaryButtonLink: "#0",
|
||||||
|
}
|
||||||
|
return echoResponse(c, homeView(hero))
|
||||||
|
}
|
||||||
|
|
||||||
|
func homeView(hero sections.Hero) 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_Var1 := templ.GetChildren(ctx)
|
||||||
|
if templ_7745c5c3_Var1 == nil {
|
||||||
|
templ_7745c5c3_Var1 = templ.NopComponent
|
||||||
|
}
|
||||||
|
ctx = templ.ClearChildren(ctx)
|
||||||
|
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||||
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
|
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_Err = sections.HeaderMarketingNav().Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = sections.SectionHero(hero).Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = sections.FooterMarketingNav().Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
})
|
||||||
|
templ_7745c5c3_Err = blocks.LayoutNoBody("Sonr.ID", true).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ = templruntime.GeneratedTemplate
|
@ -2,7 +2,7 @@ package pages
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/onsonr/sonr/nebula/blocks"
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Login(c echo.Context) error {
|
func Login(c echo.Context) error {
|
@ -10,7 +10,7 @@ import templruntime "github.com/a-h/templ/runtime"
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/onsonr/sonr/nebula/blocks"
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Login(c echo.Context) error {
|
func Login(c echo.Context) error {
|
@ -2,7 +2,7 @@ package pages
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/onsonr/sonr/nebula/blocks"
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Authorize(c echo.Context) error {
|
func Authorize(c echo.Context) error {
|
@ -10,7 +10,7 @@ import templruntime "github.com/a-h/templ/runtime"
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/onsonr/sonr/nebula/blocks"
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Authorize(c echo.Context) error {
|
func Authorize(c echo.Context) error {
|
@ -2,7 +2,7 @@ package pages
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/onsonr/sonr/nebula/blocks"
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Profile(c echo.Context) error {
|
func Profile(c echo.Context) error {
|
@ -10,7 +10,7 @@ import templruntime "github.com/a-h/templ/runtime"
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/onsonr/sonr/nebula/blocks"
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Profile(c echo.Context) error {
|
func Profile(c echo.Context) error {
|
@ -2,7 +2,7 @@ package pages
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/onsonr/sonr/nebula/blocks"
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FormState string
|
type FormState string
|
@ -10,7 +10,7 @@ import templruntime "github.com/a-h/templ/runtime"
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/onsonr/sonr/nebula/blocks"
|
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FormState string
|
type FormState string
|
@ -2,11 +2,11 @@
|
|||||||
package orm
|
package orm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/onsonr/sonr/x/did/types/orm/keyalgorithm"
|
"github.com/onsonr/sonr/pkg/orm/keyalgorithm"
|
||||||
"github.com/onsonr/sonr/x/did/types/orm/keycurve"
|
"github.com/onsonr/sonr/pkg/orm/keycurve"
|
||||||
"github.com/onsonr/sonr/x/did/types/orm/keyencoding"
|
"github.com/onsonr/sonr/pkg/orm/keyencoding"
|
||||||
"github.com/onsonr/sonr/x/did/types/orm/keyrole"
|
"github.com/onsonr/sonr/pkg/orm/keyrole"
|
||||||
"github.com/onsonr/sonr/x/did/types/orm/keytype"
|
"github.com/onsonr/sonr/pkg/orm/keytype"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PublicKey struct {
|
type PublicKey struct {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user