Compare commits

...
7 Commits
Author SHA1 Message Date
github-actions[bot] 5c6303486c bump: version 0.5.9 → 0.5.10 2024-10-07 01:22:13 +00:00
Prad Nukala 2ccd2cea22 feat(blocks): remove button component 2024-10-06 21:20:39 -04:00
Prad NukalaandGitHub d93c19c2ab feature/1107 integrate dexie db (#1128)
- **feat: remove grant page**
- **refactor: remove alert, input, radios, tabs, and video blocks**
- **feat: add JSON serialization to DWN config**
- **feat: add new Highway gateway component**
- **refactor: remove unused chains.yaml and devbox.json**
- **refactor: Separate request and response headers into protected and
non-protected structs**
- **feat: Update the UseSession echo middleware to bind the correct
headers and provide methods for updating HTMX context from Go**
- **refactor: remove unused headers from session**
- **feat: add authorize endpoint**
- **feat: create marketing pages**
2024-10-06 20:07:24 -04:00
github-actions[bot] 4e98504813 bump: version 0.5.8 → 0.5.9 2024-10-06 16:17:52 +00:00
Prad Nukala ab0bd3a5e1 fix: Update source directory for asset publishing 2024-10-06 12:16:37 -04:00
Prad Nukala 62628ed0d8 feat: add Motr support 2024-10-06 11:39:23 -04:00
Prad Nukala b1e5464843 feat: update UIUX PKL to utilize optional fields 2024-10-05 12:41:47 -04:00
58 changed files with 194 additions and 2187 deletions
+1 -1
View File
@@ -2,6 +2,6 @@
name = "cz_conventional_commits" name = "cz_conventional_commits"
tag_format = "v$version" tag_format = "v$version"
version_scheme = "semver" version_scheme = "semver"
version = "0.5.8" version = "0.5.10"
update_changelog_on_bump = true update_changelog_on_bump = true
major_version_zero = true major_version_zero = true
+1 -1
View File
@@ -37,7 +37,7 @@ jobs:
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: pkljar r2-bucket: pkljar
source-dir: deploy/config source-dir: pkl
destination-dir: . destination-dir: .
upload_nebula_cdn: upload_nebula_cdn:
+2 -2
View File
@@ -109,7 +109,7 @@ dockers:
image_templates: image_templates:
- "onsonr/sonrd:latest" - "onsonr/sonrd:latest"
- "onsonr/sonrd:{{ .Tag }}" - "onsonr/sonrd:{{ .Tag }}"
dockerfile: "./deploy/release/sonrd.Dockerfile" dockerfile: "./deploy/sonrd.Dockerfile"
build_flag_templates: build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=sonrd" - "--label=org.opencontainers.image.title=sonrd"
@@ -125,7 +125,7 @@ dockers:
image_templates: image_templates:
- "onsonr/hway:latest" - "onsonr/hway:latest"
- "onsonr/hway:{{ .Tag }}" - "onsonr/hway:{{ .Tag }}"
dockerfile: "./deploy/release/hway.Dockerfile" dockerfile: "./deploy/hway.Dockerfile"
build_flag_templates: build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=hway" - "--label=org.opencontainers.image.title=hway"
+17
View File
@@ -1,3 +1,20 @@
## v0.5.10 (2024-10-07)
### Feat
- **blocks**: remove button component
## v0.5.9 (2024-10-06)
### Feat
- add Motr support
- update UIUX PKL to utilize optional fields
### Fix
- Update source directory for asset publishing
## v0.5.8 (2024-10-04) ## v0.5.8 (2024-10-04)
### Refactor ### Refactor
+5 -4
View File
@@ -299,6 +299,7 @@ sh-testnet: mod-tidy
hway: hway:
@echo "(motr) Building Highway gateway" @echo "(motr) Building Highway gateway"
templ generate
go build -o ./build/hway ./cmd/hway go build -o ./build/hway ./cmd/hway
motr: motr:
@@ -315,10 +316,10 @@ nebula:
pkl: pkl:
@echo "(pkl) Building PKL" @echo "(pkl) Building PKL"
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./deploy/config/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 ./deploy/config/ORM.pkl go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/ORM.pkl
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./deploy/config/Txns.pkl go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/Txns.pkl
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./deploy/config/UIUX.pkl go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/UIUX.pkl
start-caddy: start-caddy:
@echo "(start-caddy) Starting caddy" @echo "(start-caddy) Starting caddy"
+3 -3
View File
@@ -12,7 +12,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/onsonr/sonr/pkg/nebula" "github.com/onsonr/sonr/pkg/nebula"
"github.com/onsonr/sonr/pkg/nebula/pages" "github.com/onsonr/sonr/pkg/nebula/router"
) )
func NewProxyCmd() *cobra.Command { func NewProxyCmd() *cobra.Command {
@@ -29,8 +29,8 @@ func NewProxyCmd() *cobra.Command {
e.Logger.Fatal(err) e.Logger.Fatal(err)
} }
e.GET("/", pages.Home) e.GET("/", router.Home)
e.GET("/allocate", pages.Profile) e.GET("/allocate", router.Profile)
// Start server // Start server
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt) ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
+6 -6
View File
@@ -8,7 +8,7 @@ import (
"github.com/onsonr/sonr/internal/session" "github.com/onsonr/sonr/internal/session"
"github.com/onsonr/sonr/pkg/nebula" "github.com/onsonr/sonr/pkg/nebula"
"github.com/onsonr/sonr/pkg/nebula/pages" "github.com/onsonr/sonr/pkg/nebula/router"
) )
type Server struct { type Server struct {
@@ -25,11 +25,11 @@ func New() *Server {
s.Logger.Fatal(err) s.Logger.Fatal(err)
} }
s.GET("/", pages.Home) s.GET("/", router.Home)
s.GET("/login", pages.Login) s.GET("/login", router.Login)
s.GET("/register", pages.Register) s.GET("/register", router.Register)
s.GET("/profile", pages.Profile) s.GET("/profile", router.Profile)
s.GET("/authorize", router.Authorize)
return s return s
} }
-49
View File
@@ -1,49 +0,0 @@
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"
[build]
delay = 1000
cmd = "devbox run build:motr"
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = true
follow_symlink = false
full_bin = "devbox run start"
include_dir = ["cmd/dwn", "cmd/motr", "internal", "models", "pkl"]
include_ext = ["go", "templ", "html", "pkl", "js", "mjs", "proto"]
include_file = [
"Dockerfile",
".goreleaser.yaml",
"go.mod",
"devbox.json",
".air.toml",
]
kill_delay = "10s"
log = "build-errors.log"
poll = false
poll_interval = 0
post_cmd = ["devbox run stop"]
pre_cmd = ["templ generate"]
rerun = false
rerun_delay = 1000
send_interrupt = true
stop_on_error = false
[color]
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
[log]
main_only = true
time = true
[misc]
clean_on_exit = true
[screen]
clear_on_rebuild = true
keep_scroll = true
-49
View File
@@ -1,49 +0,0 @@
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"
[build]
delay = 1000
cmd = "devbox run build:motr"
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = true
follow_symlink = false
full_bin = "devbox run start"
include_dir = ["cmd/dwn", "cmd/motr", "internal", "models", "pkl"]
include_ext = ["go", "templ", "html", "pkl", "js", "mjs", "proto"]
include_file = [
"Dockerfile",
".goreleaser.yaml",
"go.mod",
"devbox.json",
".air.toml",
]
kill_delay = "10s"
log = "build-errors.log"
poll = false
poll_interval = 0
post_cmd = ["devbox run stop"]
pre_cmd = ["templ generate"]
rerun = false
rerun_delay = 1000
send_interrupt = true
stop_on_error = false
[color]
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
[log]
main_only = true
time = true
[misc]
clean_on_exit = true
[screen]
clear_on_rebuild = true
keep_scroll = true
@@ -13,6 +13,7 @@ processes:
namespace: testnet namespace: testnet
command: "devbox run start:testnet" command: "devbox run start:testnet"
restart: on_failure restart: on_failure
env:
max_restarts: 1 max_restarts: 1
depends: depends:
- ipfs - ipfs
@@ -31,5 +32,3 @@ processes:
command: "cloudflared tunnel run --token $TUNNEL_TOKEN" command: "cloudflared tunnel run --token $TUNNEL_TOKEN"
restart: on_failure restart: on_failure
max_restarts: 1 max_restarts: 1
depends:
- caddy
-37
View File
@@ -1,37 +0,0 @@
# This file is used to create docker images using the heighliner binary.
# see: https://github.com/strangelove-ventures/heighliner
# Sonr Node - Identity
- name: sonr
github-organization: onsonr
github-repo: sonr
dockerfile: cosmos
build-target: make install
binaries:
- /go/bin/sonrd
build-env:
- LEDGER_ENABLED=false
- BUILD_TAGS=muslc
# Ethereum Node - Web3
- name: evmos
github-organization: tharsis
github-repo: evmos
dockerfile: cosmos
build-target: make install
binaries:
- /go/bin/evmosd
# Bitcoin Node - Gold
- name: nomic
github-organization: nomic-io
github-repo: nomic
dockerfile: cargo
build-target: |
TOOLCHAIN=$(cat rust-toolchain.toml | grep channel | awk '{print $3}' | tr -d '"')
rustup component add rust-src --toolchain ${TOOLCHAIN}-$(uname -m)-unknown-linux-gnu
cargo install --locked --path . -Zbuild-std
binaries:
- /build/nomic/target/${ARCH}-unknown-linux-gnu/release/nomic
platforms:
- linux/amd64
-92
View File
@@ -1,92 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
"packages": [
"go@1.22",
"air@latest",
"bun@latest",
"ipfs@latest",
"skate@latest",
"cloudflared@latest",
"process-compose@latest"
],
"env": {
"GOPATH": "$HOME/go",
"PATH": "$HOME/go/bin:$PATH",
"CHAIN_ID": "sonr-testnet-1",
"DENOM": "usnr",
"KEYRING": "test",
"MONIKER": "florence",
"BINARY": "sonrd",
"ACC0_NAME": "acc0",
"ACC1_NAME": "acc1",
"ACC0_ADDRESS": "idx1efd63aw40lxf3n4mhf7dzhjkr453axur9vjt6y",
"ACC1_ADDRESS": "idx1hj5fveer5cjtn4wd6wstzugjfdxzl0xpecp0nd",
"ACC0_MNEMONIC": "$(skate get ACC0_MNEMONIC)",
"ACC1_MNEMONIC": "$(skate get ACC1_MNEMONIC)",
"TUNNEL_TOKEN": "$(skate get CLOUDFLARE_TUNNEL_TOKEN)",
"TEMPL_EXPERIMENT": "rawgo"
},
"shell": {
"scripts": {
"dev": [
"air"
],
"build:docker": [
"make local-image"
],
"build:motr": [
"make nebula",
"make motr"
],
"build:nebula": [
"make nebula"
],
"build:sonrd": [
"make dwn",
"make build"
],
"build": [
"make dwn",
"make build",
"make motr"
],
"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"
],
"start": [
"process-compose up -d"
],
"stop": [
"process-compose down"
],
"test:e2e": [
"make templ",
"make test-e2e"
],
"test:unit": [
"make templ",
"make test-unit"
],
"test": [
"make templ",
"make test"
]
}
}
}
-30
View File
@@ -1,30 +0,0 @@
version: "3"
services:
sonr-node:
build:
context: .
dockerfile: Dockerfile
volumes:
- /home/prad/.scnr:/root/.sonr
ports:
- "26657:26657"
- "1317:1317"
- "9090:9090"
environment:
- CHAIN_ID=local-1
- MONIKER=localvalidator
- KEYRING=test
- KEY=user1
- KEY2=user2
- DENOM=usnr
- CLEAN=true
- BLOCK_TIME=5s
command: "start --pruning=nothing"
restart: always
networks:
- sonr-network
networks:
sonr-network:
name: sonr-network
-36
View File
@@ -1,36 +0,0 @@
version: "0.6"
processes:
ipfs:
namespace: testnet
command: "sh scripts/setup_ipfs.sh"
background: true
availability:
restart: on_failure
max_restarts: 0
sonr:
namespace: testnet
command: "devbox run start:testnet"
restart: on_failure
env:
max_restarts: 1
depends:
- ipfs
hway:
namespace: testnet
command: "hway start"
restart: on_failure
max_restarts: 1
depends:
- ipfs
- sonr
tunnel:
namespace: public
command: "cloudflared tunnel run --token $TUNNEL_TOKEN"
restart: on_failure
max_restarts: 1
depends:
- caddy
+12 -25
View File
@@ -6,6 +6,7 @@
"bun@latest", "bun@latest",
"gum@latest", "gum@latest",
"ipfs@latest", "ipfs@latest",
"mprocs@latest",
"skate@latest", "skate@latest",
"templ@latest", "templ@latest",
"cloudflared@latest", "cloudflared@latest",
@@ -30,9 +31,6 @@
}, },
"shell": { "shell": {
"scripts": { "scripts": {
"dev": [
"air"
],
"build:docker": [ "build:docker": [
"make local-image" "make local-image"
], ],
@@ -43,6 +41,9 @@
"build:nebula": [ "build:nebula": [
"make nebula" "make nebula"
], ],
"build:motr": [
"make motr"
],
"build:sonrd": [ "build:sonrd": [
"make motr", "make motr",
"make build" "make build"
@@ -61,33 +62,19 @@
"gen:templ": [ "gen:templ": [
"make templ" "make templ"
], ],
"start:hway": [
"make templ",
"make hway",
"make start-hway"
],
"start:testnet": [
"make templ",
"make install",
"make sh-testnet"
],
"start": [ "start": [
"process-compose up -f ./deploy/testnet/process-compose.yaml" "process-compose up -f ./deploy/process-compose.yaml"
], ],
"stop": [ "stop": [
"process-compose down -f ./deploy/testnet/process-compose.yaml" "process-compose down -f ./deploy/process-compose.yaml"
], ],
"test:e2e": [ "start:testnet": [
"make templ", "make sh-testnet"
"make test-e2e"
], ],
"test:unit": [ "start:hway": [
"make templ", "make nebula",
"make test-unit" "make hway",
], "./build/hway start"
"test": [
"make templ",
"make test"
] ]
} }
} }
+48
View File
@@ -247,6 +247,54 @@
"source": "devbox-search", "source": "devbox-search",
"version": "0.17.0" "version": "0.17.0"
}, },
"mprocs@latest": {
"last_modified": "2024-09-10T15:01:03Z",
"resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#mprocs",
"source": "devbox-search",
"version": "0.7.1",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/sri1rv6phxhcvgwknd3zv98km6s1740b-mprocs-0.7.1",
"default": true
}
],
"store_path": "/nix/store/sri1rv6phxhcvgwknd3zv98km6s1740b-mprocs-0.7.1"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/7q84qjs24xd9jf2wvn7f39gvxsn5n33q-mprocs-0.7.1",
"default": true
}
],
"store_path": "/nix/store/7q84qjs24xd9jf2wvn7f39gvxsn5n33q-mprocs-0.7.1"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/47j50bgr6mxlvdjddh0li810wkld34qb-mprocs-0.7.1",
"default": true
}
],
"store_path": "/nix/store/47j50bgr6mxlvdjddh0li810wkld34qb-mprocs-0.7.1"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/6vrvg4jhv2yg8y326dmrxsz3yddkqgzq-mprocs-0.7.1",
"default": true
}
],
"store_path": "/nix/store/6vrvg4jhv2yg8y326dmrxsz3yddkqgzq-mprocs-0.7.1"
}
}
},
"process-compose@latest": { "process-compose@latest": {
"last_modified": "2024-09-15T21:49:16Z", "last_modified": "2024-09-15T21:49:16Z",
"resolved": "github:NixOS/nixpkgs/039b72d0c738c934e2e36d7fc5520d1b425287a6#process-compose", "resolved": "github:NixOS/nixpkgs/039b72d0c738c934e2e36d7fc5520d1b425287a6#process-compose",
+17 -14
View File
@@ -1,20 +1,14 @@
package headers package headers
type RequestHeaders struct { type RequestHeaders struct {
Authorization *string `header:"Authorization"` CacheControl *string `header:"Cache-Control"`
CacheControl *string `header:"Cache-Control"` DeviceMemory *string `header:"Device-Memory"`
DeviceMemory *string `header:"Device-Memory"` From *string `header:"From"`
Forwarded *string `header:"Forwarded"` Host *string `header:"Host"`
From *string `header:"From"` Referer *string `header:"Referer"`
Host *string `header:"Host"` UserAgent *string `header:"User-Agent"`
Link *string `header:"Link"` ViewportWidth *string `header:"Viewport-Width"`
PermissionsPolicy *string `header:"Permissions-Policy"` Width *string `header:"Width"`
ProxyAuthorization *string `header:"Proxy-Authorization"`
Referer *string `header:"Referer"`
UserAgent *string `header:"User-Agent"`
ViewportWidth *string `header:"Viewport-Width"`
Width *string `header:"Width"`
WWWAuthenticate *string `header:"WWW-Authenticate"`
// HTMX Specific // HTMX Specific
HXBoosted *string `header:"HX-Boosted"` HXBoosted *string `header:"HX-Boosted"`
@@ -26,3 +20,12 @@ type RequestHeaders struct {
HXTriggerName *string `header:"HX-Trigger-Name"` HXTriggerName *string `header:"HX-Trigger-Name"`
HXTrigger *string `header:"HX-Trigger"` HXTrigger *string `header:"HX-Trigger"`
} }
type ProtectedRequestHeaders struct {
Authorization *string `header:"Authorization"`
Forwarded *string `header:"Forwarded"`
Link *string `header:"Link"`
PermissionsPolicy *string `header:"Permissions-Policy"`
ProxyAuthorization *string `header:"Proxy-Authorization"`
WWWAuthenticate *string `header:"WWW-Authenticate"`
}
+14 -12
View File
@@ -1,18 +1,6 @@
package headers package headers
type ResponseHeaders struct { type ResponseHeaders struct {
AcceptCH *string `header:"Accept-CH"`
AccessControlAllowCredentials *string `header:"Access-Control-Allow-Credentials"`
AccessControlAllowHeaders *string `header:"Access-Control-Allow-Headers"`
AccessControlAllowMethods *string `header:"Access-Control-Allow-Methods"`
AccessControlExposeHeaders *string `header:"Access-Control-Expose-Headers"`
AccessControlRequestHeaders *string `header:"Access-Control-Request-Headers"`
ContentSecurityPolicy *string `header:"Content-Security-Policy"`
CrossOriginEmbedderPolicy *string `header:"Cross-Origin-Embedder-Policy"`
PermissionsPolicy *string `header:"Permissions-Policy"`
ProxyAuthorization *string `header:"Proxy-Authorization"`
WWWAuthenticate *string `header:"WWW-Authenticate"`
// HTMX Specific // HTMX Specific
HXLocation *string `header:"HX-Location"` HXLocation *string `header:"HX-Location"`
HXPushURL *string `header:"HX-Push-Url"` HXPushURL *string `header:"HX-Push-Url"`
@@ -26,3 +14,17 @@ type ResponseHeaders struct {
HXTriggerAfterSettle *string `header:"HX-Trigger-After-Settle"` HXTriggerAfterSettle *string `header:"HX-Trigger-After-Settle"`
HXTriggerAfterSwap *string `header:"HX-Trigger-After-Swap"` HXTriggerAfterSwap *string `header:"HX-Trigger-After-Swap"`
} }
type ProtectedResponseHeaders struct {
AcceptCH *string `header:"Accept-CH"`
AccessControlAllowCredentials *string `header:"Access-Control-Allow-Credentials"`
AccessControlAllowHeaders *string `header:"Access-Control-Allow-Headers"`
AccessControlAllowMethods *string `header:"Access-Control-Allow-Methods"`
AccessControlExposeHeaders *string `header:"Access-Control-Expose-Headers"`
AccessControlRequestHeaders *string `header:"Access-Control-Request-Headers"`
ContentSecurityPolicy *string `header:"Content-Security-Policy"`
CrossOriginEmbedderPolicy *string `header:"Cross-Origin-Embedder-Policy"`
PermissionsPolicy *string `header:"Permissions-Policy"`
ProxyAuthorization *string `header:"Proxy-Authorization"`
WWWAuthenticate *string `header:"WWW-Authenticate"`
}
+5 -5
View File
@@ -2,13 +2,13 @@
package dwn package dwn
type Config struct { type Config struct {
Ipfs *IPFS `pkl:"ipfs" json:"ipfs,omitempty"` Ipfs *IPFS `pkl:"ipfs"`
Sonr *Sonr `pkl:"sonr" json:"sonr,omitempty"` Sonr *Sonr `pkl:"sonr"`
Motr *Motr `pkl:"motr" json:"motr,omitempty"` Motr *Motr `pkl:"motr"`
Schema *Schema `pkl:"schema" json:"schema,omitempty"` Schema *Schema `pkl:"schema"`
ProxyUrl string `pkl:"proxyUrl" json:"proxyUrl,omitempty"` ProxyUrl string `pkl:"proxyUrl"`
} }
+2 -2
View File
@@ -2,7 +2,7 @@
package dwn package dwn
type IPFS struct { type IPFS struct {
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"` ApiUrl string `pkl:"apiUrl"`
GatewayUrl string `pkl:"gatewayUrl" json:"gatewayUrl,omitempty"` GatewayUrl string `pkl:"gatewayUrl"`
} }
+3 -3
View File
@@ -2,9 +2,9 @@
package dwn package dwn
type Motr struct { type Motr struct {
Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"` Keyshare string `pkl:"keyshare"`
Address string `pkl:"address" json:"address,omitempty"` Address string `pkl:"address"`
Origin string `pkl:"origin" json:"origin,omitempty"` Origin string `pkl:"origin"`
} }
+8 -8
View File
@@ -4,19 +4,19 @@ package dwn
type Schema struct { type Schema struct {
Version int `pkl:"version"` Version int `pkl:"version"`
Account string `pkl:"account" json:"account,omitempty"` Account string `pkl:"account"`
Asset string `pkl:"asset" json:"asset,omitempty"` Asset string `pkl:"asset"`
Chain string `pkl:"chain" json:"chain,omitempty"` Chain string `pkl:"chain"`
Credential string `pkl:"credential" json:"credential,omitempty"` Credential string `pkl:"credential"`
Jwk string `pkl:"jwk" json:"jwk,omitempty"` Jwk string `pkl:"jwk"`
Grant string `pkl:"grant" json:"grant,omitempty"` Grant string `pkl:"grant"`
Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"` Keyshare string `pkl:"keyshare"`
Profile string `pkl:"profile" json:"profile,omitempty"` Profile string `pkl:"profile"`
} }
+5 -5
View File
@@ -2,13 +2,13 @@
package dwn package dwn
type Sonr struct { type Sonr struct {
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"` ApiUrl string `pkl:"apiUrl"`
GrpcUrl string `pkl:"grpcUrl" json:"grpcUrl,omitempty"` GrpcUrl string `pkl:"grpcUrl"`
RpcUrl string `pkl:"rpcUrl" json:"rpcUrl,omitempty"` RpcUrl string `pkl:"rpcUrl"`
WebSocketUrl string `pkl:"webSocketUrl" json:"webSocketUrl,omitempty"` WebSocketUrl string `pkl:"webSocketUrl"`
ChainId string `pkl:"chainId" json:"chainId,omitempty"` ChainId string `pkl:"chainId"`
} }
-539
View File
@@ -968,10 +968,6 @@ select{
} }
} }
.invisible{
visibility: hidden;
}
.fixed{ .fixed{
position: fixed; position: fixed;
} }
@@ -1057,16 +1053,6 @@ select{
margin-right: -1.5rem; margin-right: -1.5rem;
} }
.mx-0{
margin-left: 0px;
margin-right: 0px;
}
.mx-3{
margin-left: 0.75rem;
margin-right: 0.75rem;
}
.mx-6{ .mx-6{
margin-left: 1.5rem; margin-left: 1.5rem;
margin-right: 1.5rem; margin-right: 1.5rem;
@@ -1109,10 +1095,6 @@ select{
margin-left: 0.5rem; margin-left: 0.5rem;
} }
.mr-0\.5{
margin-right: 0.125rem;
}
.mr-1{ .mr-1{
margin-right: 0.25rem; margin-right: 0.25rem;
} }
@@ -1137,10 +1119,6 @@ select{
margin-right: 1.75rem; margin-right: 1.75rem;
} }
.mt-0\.5{
margin-top: 0.125rem;
}
.mt-1{ .mt-1{
margin-top: 0.25rem; margin-top: 0.25rem;
} }
@@ -1181,10 +1159,6 @@ select{
display: block; display: block;
} }
.inline-block{
display: inline-block;
}
.flex{ .flex{
display: flex; display: flex;
} }
@@ -1193,50 +1167,22 @@ select{
display: inline-flex; display: inline-flex;
} }
.table{
display: table;
}
.grid{ .grid{
display: grid; display: grid;
} }
.inline-grid{
display: inline-grid;
}
.hidden{ .hidden{
display: none; display: none;
} }
.aspect-video{
aspect-ratio: 16 / 9;
}
.h-0\.5{ .h-0\.5{
height: 0.125rem; height: 0.125rem;
} }
.h-1{
height: 0.25rem;
}
.h-1\.5{
height: 0.375rem;
}
.h-1\/4{
height: 25%;
}
.h-10{ .h-10{
height: 2.5rem; height: 2.5rem;
} }
.h-12{
height: 3rem;
}
.h-14{ .h-14{
height: 3.5rem; height: 3.5rem;
} }
@@ -1245,10 +1191,6 @@ select{
height: 5rem; height: 5rem;
} }
.h-24{
height: 6rem;
}
.h-3{ .h-3{
height: 0.75rem; height: 0.75rem;
} }
@@ -1277,18 +1219,10 @@ select{
height: 2.25rem; height: 2.25rem;
} }
.h-\[18px\]{
height: 18px;
}
.h-\[280px\]{ .h-\[280px\]{
height: 280px; height: 280px;
} }
.h-\[360px\]{
height: 360px;
}
.h-auto{ .h-auto{
height: auto; height: auto;
} }
@@ -1309,22 +1243,10 @@ select{
width: 0px; width: 0px;
} }
.w-1\/2{
width: 50%;
}
.w-1\/3{ .w-1\/3{
width: 33.333333%; width: 33.333333%;
} }
.w-10{
width: 2.5rem;
}
.w-12{
width: 3rem;
}
.w-14{ .w-14{
width: 3.5rem; width: 3.5rem;
} }
@@ -1337,10 +1259,6 @@ select{
width: 5rem; width: 5rem;
} }
.w-24{
width: 6rem;
}
.w-3{ .w-3{
width: 0.75rem; width: 0.75rem;
} }
@@ -1361,10 +1279,6 @@ select{
width: 2rem; width: 2rem;
} }
.w-\[18px\]{
width: 18px;
}
.w-\[22rem\]{ .w-\[22rem\]{
width: 22rem; width: 22rem;
} }
@@ -1398,14 +1312,6 @@ select{
width: 100vw; width: 100vw;
} }
.min-w-\[640px\]{
min-width: 640px;
}
.min-w-full{
min-width: 100%;
}
.max-w-2xl{ .max-w-2xl{
max-width: 42rem; max-width: 42rem;
} }
@@ -1506,16 +1412,6 @@ select{
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.-translate-y-8{
--tw-translate-y: -2rem;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.-translate-y-full{
--tw-translate-y: -100%;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.-translate-y-px{ .-translate-y-px{
--tw-translate-y: -1px; --tw-translate-y: -1px;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -1526,21 +1422,11 @@ select{
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.translate-x-0\.5{
--tw-translate-x: 0.125rem;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.translate-x-8{ .translate-x-8{
--tw-translate-x: 2rem; --tw-translate-x: 2rem;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.translate-x-px{
--tw-translate-x: 1px;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.translate-y-0{ .translate-y-0{
--tw-translate-y: 0px; --tw-translate-y: 0px;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -1571,11 +1457,6 @@ select{
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.translate-y-px{
--tw-translate-y: 1px;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.rotate-1{ .rotate-1{
--tw-rotate: 1deg; --tw-rotate: 1deg;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -1587,18 +1468,6 @@ select{
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.scale-50{
--tw-scale-x: .5;
--tw-scale-y: .5;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.scale-75{
--tw-scale-x: .75;
--tw-scale-y: .75;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.scale-90{ .scale-90{
--tw-scale-x: .9; --tw-scale-x: .9;
--tw-scale-y: .9; --tw-scale-y: .9;
@@ -1645,26 +1514,10 @@ select{
cursor: pointer; cursor: pointer;
} }
.select-none{
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.appearance-none{
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.grid-cols-2{ .grid-cols-2{
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
.grid-cols-3{
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.flex-row{ .flex-row{
flex-direction: row; flex-direction: row;
} }
@@ -1780,12 +1633,6 @@ select{
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
} }
.space-y-3 > :not([hidden]) ~ :not([hidden]){
--tw-space-y-reverse: 0;
margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
}
.space-y-4 > :not([hidden]) ~ :not([hidden]){ .space-y-4 > :not([hidden]) ~ :not([hidden]){
--tw-space-y-reverse: 0; --tw-space-y-reverse: 0;
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
@@ -1798,29 +1645,10 @@ select{
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
} }
.divide-y > :not([hidden]) ~ :not([hidden]){
--tw-divide-y-reverse: 0;
border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
border-bottom-width: calc(1px * var(--tw-divide-y-reverse));
}
.divide-neutral-200 > :not([hidden]) ~ :not([hidden]){
--tw-divide-opacity: 1;
border-color: rgb(229 229 229 / var(--tw-divide-opacity));
}
.overflow-hidden{ .overflow-hidden{
overflow: hidden; overflow: hidden;
} }
.overflow-x-auto{
overflow-x: auto;
}
.whitespace-nowrap{
white-space: nowrap;
}
.rounded{ .rounded{
border-radius: 0.25rem; border-radius: 0.25rem;
} }
@@ -1867,15 +1695,6 @@ select{
border-color: rgb(37 99 235 / var(--tw-border-opacity)); border-color: rgb(37 99 235 / var(--tw-border-opacity));
} }
.border-gray-100{
--tw-border-opacity: 1;
border-color: rgb(243 244 246 / var(--tw-border-opacity));
}
.border-gray-200\/70{
border-color: rgb(229 231 235 / 0.7);
}
.border-green-600{ .border-green-600{
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(22 163 74 / var(--tw-border-opacity)); border-color: rgb(22 163 74 / var(--tw-border-opacity));
@@ -1933,11 +1752,6 @@ select{
border-color: rgb(212 212 216 / var(--tw-border-opacity)); border-color: rgb(212 212 216 / var(--tw-border-opacity));
} }
.bg-black{
--tw-bg-opacity: 1;
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
}
.bg-blue-50{ .bg-blue-50{
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(239 246 255 / var(--tw-bg-opacity)); background-color: rgb(239 246 255 / var(--tw-bg-opacity));
@@ -1948,21 +1762,11 @@ select{
background-color: rgb(37 99 235 / var(--tw-bg-opacity)); background-color: rgb(37 99 235 / var(--tw-bg-opacity));
} }
.bg-gray-100{
--tw-bg-opacity: 1;
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
}
.bg-green-50{ .bg-green-50{
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(240 253 244 / var(--tw-bg-opacity)); background-color: rgb(240 253 244 / var(--tw-bg-opacity));
} }
.bg-green-500{
--tw-bg-opacity: 1;
background-color: rgb(34 197 94 / var(--tw-bg-opacity));
}
.bg-green-600{ .bg-green-600{
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(22 163 74 / var(--tw-bg-opacity)); background-color: rgb(22 163 74 / var(--tw-bg-opacity));
@@ -2007,11 +1811,6 @@ select{
background-color: rgb(254 252 232 / var(--tw-bg-opacity)); background-color: rgb(254 252 232 / var(--tw-bg-opacity));
} }
.bg-yellow-500{
--tw-bg-opacity: 1;
background-color: rgb(234 179 8 / var(--tw-bg-opacity));
}
.bg-yellow-600{ .bg-yellow-600{
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(202 138 4 / var(--tw-bg-opacity)); background-color: rgb(202 138 4 / var(--tw-bg-opacity));
@@ -2037,30 +1836,14 @@ select{
background-color: rgb(24 24 27 / var(--tw-bg-opacity)); background-color: rgb(24 24 27 / var(--tw-bg-opacity));
} }
.bg-opacity-0{
--tw-bg-opacity: 0;
}
.bg-opacity-20{
--tw-bg-opacity: 0.2;
}
.bg-opacity-50{ .bg-opacity-50{
--tw-bg-opacity: 0.5; --tw-bg-opacity: 0.5;
} }
.bg-opacity-80{
--tw-bg-opacity: 0.8;
}
.bg-opacity-90{ .bg-opacity-90{
--tw-bg-opacity: 0.9; --tw-bg-opacity: 0.9;
} }
.bg-gradient-to-b{
background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
}
.bg-gradient-to-r{ .bg-gradient-to-r{
background-image: linear-gradient(to right, var(--tw-gradient-stops)); background-image: linear-gradient(to right, var(--tw-gradient-stops));
} }
@@ -2075,12 +1858,6 @@ select{
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
} }
.from-transparent{
--tw-gradient-from: transparent var(--tw-gradient-from-position);
--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.from-zinc-100{ .from-zinc-100{
--tw-gradient-from: #f4f4f5 var(--tw-gradient-from-position); --tw-gradient-from: #f4f4f5 var(--tw-gradient-from-position);
--tw-gradient-to: rgb(244 244 245 / 0) var(--tw-gradient-to-position); --tw-gradient-to: rgb(244 244 245 / 0) var(--tw-gradient-to-position);
@@ -2098,14 +1875,6 @@ select{
--tw-gradient-stops: var(--tw-gradient-from), #18181b var(--tw-gradient-via-position), var(--tw-gradient-to); --tw-gradient-stops: var(--tw-gradient-from), #18181b var(--tw-gradient-via-position), var(--tw-gradient-to);
} }
.to-black{
--tw-gradient-to: #000 var(--tw-gradient-to-position);
}
.to-transparent{
--tw-gradient-to: transparent var(--tw-gradient-to-position);
}
.to-white{ .to-white{
--tw-gradient-to: #fff var(--tw-gradient-to-position); --tw-gradient-to: #fff var(--tw-gradient-to-position);
} }
@@ -2235,11 +2004,6 @@ select{
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
} }
.py-3{
padding-top: 0.75rem;
padding-bottom: 0.75rem;
}
.py-4{ .py-4{
padding-top: 1rem; padding-top: 1rem;
padding-bottom: 1rem; padding-bottom: 1rem;
@@ -2337,10 +2101,6 @@ select{
text-align: center; text-align: center;
} }
.text-right{
text-align: right;
}
.align-top{ .align-top{
vertical-align: top; vertical-align: top;
} }
@@ -2353,10 +2113,6 @@ select{
font-family: Inter Tight, sans-serif; font-family: Inter Tight, sans-serif;
} }
.font-mono{
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.font-sans{ .font-sans{
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
} }
@@ -2489,16 +2245,6 @@ select{
color: rgb(75 85 99 / var(--tw-text-opacity)); color: rgb(75 85 99 / var(--tw-text-opacity));
} }
.text-gray-700{
--tw-text-opacity: 1;
color: rgb(55 65 81 / var(--tw-text-opacity));
}
.text-gray-900{
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity));
}
.text-green-500{ .text-green-500{
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(34 197 94 / var(--tw-text-opacity)); color: rgb(34 197 94 / var(--tw-text-opacity));
@@ -2623,14 +2369,6 @@ select{
opacity: 1; opacity: 1;
} }
.opacity-20{
opacity: 0.2;
}
.opacity-50{
opacity: 0.5;
}
.opacity-60{ .opacity-60{
opacity: 0.6; opacity: 0.6;
} }
@@ -2639,10 +2377,6 @@ select{
opacity: 0.7; opacity: 0.7;
} }
.opacity-80{
opacity: 0.8;
}
.opacity-90{ .opacity-90{
opacity: 0.9; opacity: 0.9;
} }
@@ -2699,34 +2433,16 @@ select{
transition-duration: 150ms; transition-duration: 150ms;
} }
.transition-all{
transition-property: all;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
}
.transition-colors{ .transition-colors{
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms; transition-duration: 150ms;
} }
.delay-200{
transition-delay: 200ms;
}
.duration-100{ .duration-100{
transition-duration: 100ms; transition-duration: 100ms;
} }
.duration-1000{
transition-duration: 1000ms;
}
.duration-150{
transition-duration: 150ms;
}
.duration-200{ .duration-200{
transition-duration: 200ms; transition-duration: 200ms;
} }
@@ -3168,16 +2884,6 @@ input[type="search"]::-webkit-search-results-decoration {
/* Firefox */ /* Firefox */
} }
.placeholder\:text-neutral-400::-moz-placeholder{
--tw-text-opacity: 1;
color: rgb(163 163 163 / var(--tw-text-opacity));
}
.placeholder\:text-neutral-400::placeholder{
--tw-text-opacity: 1;
color: rgb(163 163 163 / var(--tw-text-opacity));
}
.placeholder\:text-neutral-500::-moz-placeholder{ .placeholder\:text-neutral-500::-moz-placeholder{
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(115 115 115 / var(--tw-text-opacity)); color: rgb(115 115 115 / var(--tw-text-opacity));
@@ -3386,12 +3092,6 @@ input[type="search"]::-webkit-search-results-decoration {
display: none; display: none;
} }
.hover\:scale-100:hover{
--tw-scale-x: 1;
--tw-scale-y: 1;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.hover\:bg-blue-100:hover{ .hover\:bg-blue-100:hover{
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(219 234 254 / var(--tw-bg-opacity)); background-color: rgb(219 234 254 / var(--tw-bg-opacity));
@@ -3407,11 +3107,6 @@ input[type="search"]::-webkit-search-results-decoration {
background-color: rgb(29 78 216 / var(--tw-bg-opacity)); background-color: rgb(29 78 216 / var(--tw-bg-opacity));
} }
.hover\:bg-gray-50:hover{
--tw-bg-opacity: 1;
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
}
.hover\:bg-green-100:hover{ .hover\:bg-green-100:hover{
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(220 252 231 / var(--tw-bg-opacity)); background-color: rgb(220 252 231 / var(--tw-bg-opacity));
@@ -3487,11 +3182,6 @@ input[type="search"]::-webkit-search-results-decoration {
color: rgb(37 99 235 / var(--tw-text-opacity)); color: rgb(37 99 235 / var(--tw-text-opacity));
} }
.hover\:text-blue-700:hover{
--tw-text-opacity: 1;
color: rgb(29 78 216 / var(--tw-text-opacity));
}
.hover\:text-green-600:hover{ .hover\:text-green-600:hover{
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(22 163 74 / var(--tw-text-opacity)); color: rgb(22 163 74 / var(--tw-text-opacity));
@@ -3590,11 +3280,6 @@ input[type="search"]::-webkit-search-results-decoration {
--tw-ring-color: rgb(29 78 216 / var(--tw-ring-opacity)); --tw-ring-color: rgb(29 78 216 / var(--tw-ring-opacity));
} }
.focus\:ring-gray-700:focus{
--tw-ring-opacity: 1;
--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity));
}
.focus\:ring-green-100:focus{ .focus\:ring-green-100:focus{
--tw-ring-opacity: 1; --tw-ring-opacity: 1;
--tw-ring-color: rgb(220 252 231 / var(--tw-ring-opacity)); --tw-ring-color: rgb(220 252 231 / var(--tw-ring-opacity));
@@ -3680,19 +3365,6 @@ input[type="search"]::-webkit-search-results-decoration {
opacity: 0.5; opacity: 0.5;
} }
.group:hover .group-hover\:visible{
visibility: visible;
}
.group:hover .group-hover\:mx-1{
margin-left: 0.25rem;
margin-right: 0.25rem;
}
.group:hover .group-hover\:w-12{
width: 3rem;
}
.group:hover .group-hover\:w-full{ .group:hover .group-hover\:w-full{
width: 100%; width: 100%;
} }
@@ -3702,12 +3374,6 @@ input[type="search"]::-webkit-search-results-decoration {
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.group:hover .group-hover\:scale-110{
--tw-scale-x: 1.1;
--tw-scale-y: 1.1;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.group:hover .group-hover\:scale-150{ .group:hover .group-hover\:scale-150{
--tw-scale-x: 1.5; --tw-scale-x: 1.5;
--tw-scale-y: 1.5; --tw-scale-y: 1.5;
@@ -4062,216 +3728,11 @@ input[type="search"]::-webkit-search-results-decoration {
} }
} }
.\[\&\:\:-moz-range-progress\]\:rounded-full::-moz-range-progress{
border-radius: 9999px;
}
.\[\&\:\:-moz-range-progress\]\:bg-blue-600::-moz-range-progress{
--tw-bg-opacity: 1;
background-color: rgb(37 99 235 / var(--tw-bg-opacity));
}
.\[\&\:\:-moz-range-progress\]\:bg-white::-moz-range-progress{
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.\[\&\:\:-moz-range-progress\]\:bg-opacity-80::-moz-range-progress{
--tw-bg-opacity: 0.8;
}
.\[\&\:\:-moz-range-thumb\]\:h-1\.5::-moz-range-thumb{
height: 0.375rem;
}
.\[\&\:\:-moz-range-thumb\]\:h-2::-moz-range-thumb{
height: 0.5rem;
}
.\[\&\:\:-moz-range-thumb\]\:w-1\.5::-moz-range-thumb{
width: 0.375rem;
}
.\[\&\:\:-moz-range-thumb\]\:w-2::-moz-range-thumb{
width: 0.5rem;
}
.\[\&\:\:-moz-range-thumb\]\:appearance-none::-moz-range-thumb{
-moz-appearance: none;
appearance: none;
}
.\[\&\:\:-moz-range-thumb\]\:rounded-full::-moz-range-thumb{
border-radius: 9999px;
}
.\[\&\:\:-moz-range-thumb\]\:border-0::-moz-range-thumb{
border-width: 0px;
}
.\[\&\:\:-moz-range-thumb\]\:bg-white::-moz-range-thumb{
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.\[\&\:\:-moz-range-track\]\:rounded-full::-moz-range-track{
border-radius: 9999px;
}
.\[\&\:\:-moz-range-track\]\:bg-neutral-200::-moz-range-track{
--tw-bg-opacity: 1;
background-color: rgb(229 229 229 / var(--tw-bg-opacity));
}
.\[\&\:\:-ms-fill-lower\]\:rounded-full::-ms-fill-lower{
border-radius: 9999px;
}
.\[\&\:\:-ms-fill-lower\]\:bg-blue-600::-ms-fill-lower{
--tw-bg-opacity: 1;
background-color: rgb(37 99 235 / var(--tw-bg-opacity));
}
.\[\&\:\:-ms-fill-lower\]\:bg-white::-ms-fill-lower{
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.\[\&\:\:-ms-fill-lower\]\:bg-opacity-80::-ms-fill-lower{
--tw-bg-opacity: 0.8;
}
.\[\&\:\:-ms-thumb\]\:h-1\.5::-ms-thumb{
height: 0.375rem;
}
.\[\&\:\:-ms-thumb\]\:h-2::-ms-thumb{
height: 0.5rem;
}
.\[\&\:\:-ms-thumb\]\:w-1\.5::-ms-thumb{
width: 0.375rem;
}
.\[\&\:\:-ms-thumb\]\:w-2::-ms-thumb{
width: 0.5rem;
}
.\[\&\:\:-ms-thumb\]\:appearance-none::-ms-thumb{
appearance: none;
}
.\[\&\:\:-ms-thumb\]\:rounded-full::-ms-thumb{
border-radius: 9999px;
}
.\[\&\:\:-ms-thumb\]\:border-0::-ms-thumb{
border-width: 0px;
}
.\[\&\:\:-ms-thumb\]\:bg-white::-ms-thumb{
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.\[\&\:\:-ms-track\]\:rounded-full::-ms-track{
border-radius: 9999px;
}
.\[\&\:\:-ms-track\]\:bg-neutral-200::-ms-track{
--tw-bg-opacity: 1;
background-color: rgb(229 229 229 / var(--tw-bg-opacity));
}
.\[\&\:\:-webkit-slider-runnable-track\]\:overflow-hidden::-webkit-slider-runnable-track{
overflow: hidden;
}
.\[\&\:\:-webkit-slider-runnable-track\]\:rounded-full::-webkit-slider-runnable-track{
border-radius: 9999px;
}
.\[\&\:\:-webkit-slider-runnable-track\]\:bg-white::-webkit-slider-runnable-track{
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.\[\&\:\:-webkit-slider-runnable-track\]\:bg-opacity-30::-webkit-slider-runnable-track{
--tw-bg-opacity: 0.3;
}
.\[\&\:\:-webkit-slider-thumb\]\:h-1\.5::-webkit-slider-thumb{
height: 0.375rem;
}
.\[\&\:\:-webkit-slider-thumb\]\:h-2::-webkit-slider-thumb{
height: 0.5rem;
}
.\[\&\:\:-webkit-slider-thumb\]\:w-1\.5::-webkit-slider-thumb{
width: 0.375rem;
}
.\[\&\:\:-webkit-slider-thumb\]\:w-2::-webkit-slider-thumb{
width: 0.5rem;
}
.\[\&\:\:-webkit-slider-thumb\]\:appearance-none::-webkit-slider-thumb{
-webkit-appearance: none;
appearance: none;
}
.\[\&\:\:-webkit-slider-thumb\]\:rounded-full::-webkit-slider-thumb{
border-radius: 9999px;
}
.\[\&\:\:-webkit-slider-thumb\]\:border-0::-webkit-slider-thumb{
border-width: 0px;
}
.\[\&\:\:-webkit-slider-thumb\]\:bg-white::-webkit-slider-thumb{
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.\[\&\:\:-webkit-slider-thumb\]\:shadow-\[-995px_0px_0px_990px_\#2463eb\]::-webkit-slider-thumb{
--tw-shadow: -995px 0px 0px 990px #2463eb;
--tw-shadow-colored: -995px 0px 0px 990px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.\[\&\:\:-webkit-slider-thumb\]\:shadow-\[-995px_0px_0px_990px_rgba\(255\2c _255\2c _255\2c _0\.8\)\]::-webkit-slider-thumb{
--tw-shadow: -995px 0px 0px 990px rgba(255, 255, 255, 0.8);
--tw-shadow-colored: -995px 0px 0px 990px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.\[\&\:has\(svg\)\]\:pl-11:has(svg){
padding-left: 2.75rem;
}
.\[\&\>div\]\:mx-3>div{ .\[\&\>div\]\:mx-3>div{
margin-left: 0.75rem; margin-left: 0.75rem;
margin-right: 0.75rem; margin-right: 0.75rem;
} }
.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{
--tw-translate-y: -3px;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.\[\&\>svg\]\:absolute>svg{
position: absolute;
}
.\[\&\>svg\]\:left-4>svg{
left: 1rem;
}
.\[\&\>svg\]\:top-4>svg{
top: 1rem;
}
.\[\&_\.active-breadcrumb\]\:font-medium .active-breadcrumb{ .\[\&_\.active-breadcrumb\]\:font-medium .active-breadcrumb{
font-weight: 500; font-weight: 500;
} }
Binary file not shown.
-67
View File
@@ -1,67 +0,0 @@
package blocks
func Alert(variant Variant, icon Icon, title, message string) templ.Component {
return alertElement(variant.Attributes(), title, message, icon.Render())
}
templ alertElement(attrs templ.Attributes, title, message string, icon templ.Component) {
<div { attrs... }>
@icon
<h5 class="mb-1 font-medium leading-none tracking-tight">{ title }</h5>
<div class="text-sm opacity-70">{ message }</div>
</div>
}
type AlertVariant int
const (
AlertVariant_Default AlertVariant = iota
AlertVariant_Info
AlertVariant_Error
AlertVariant_Success
AlertVariant_Warning
AlertVariant_Subtle_Info
AlertVariant_Subtle_Error
AlertVariant_Subtle_Success
AlertVariant_Subtle_Warning
)
func (v AlertVariant) Attributes() templ.Attributes {
switch v {
case AlertVariant_Info:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-blue-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
}
case AlertVariant_Error:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-red-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
}
case AlertVariant_Success:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-green-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
}
case AlertVariant_Warning:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-yellow-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
}
case AlertVariant_Subtle_Info:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-blue-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-blue-600",
}
case AlertVariant_Subtle_Error:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-red-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-red-600",
}
case AlertVariant_Subtle_Success:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-green-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-green-600",
}
case AlertVariant_Subtle_Warning:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-yellow-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-yellow-600",
}
}
return templ.Attributes{
"class": "relative w-full rounded-lg border bg-white p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-neutral-900",
}
}
-140
View File
@@ -1,140 +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 Alert(variant Variant, icon Icon, title, message string) templ.Component {
return alertElement(variant.Attributes(), title, message, icon.Render())
}
func alertElement(attrs templ.Attributes, title, message string, icon templ.Component) 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("<div")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templ.RenderAttributes(ctx, templ_7745c5c3_Buffer, attrs)
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 = icon.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h5 class=\"mb-1 font-medium leading-none tracking-tight\">")
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/alert.templ`, Line: 10, Col: 66}
}
_, 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("</h5><div class=\"text-sm opacity-70\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(message)
if templ_7745c5c3_Err != nil {
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))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
type AlertVariant int
const (
AlertVariant_Default AlertVariant = iota
AlertVariant_Info
AlertVariant_Error
AlertVariant_Success
AlertVariant_Warning
AlertVariant_Subtle_Info
AlertVariant_Subtle_Error
AlertVariant_Subtle_Success
AlertVariant_Subtle_Warning
)
func (v AlertVariant) Attributes() templ.Attributes {
switch v {
case AlertVariant_Info:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-blue-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
}
case AlertVariant_Error:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-red-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
}
case AlertVariant_Success:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-green-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
}
case AlertVariant_Warning:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-yellow-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
}
case AlertVariant_Subtle_Info:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-blue-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-blue-600",
}
case AlertVariant_Subtle_Error:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-red-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-red-600",
}
case AlertVariant_Subtle_Success:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-green-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-green-600",
}
case AlertVariant_Subtle_Warning:
return templ.Attributes{
"class": "relative w-full rounded-lg border border-transparent bg-yellow-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-yellow-600",
}
}
return templ.Attributes{
"class": "relative w-full rounded-lg border bg-white p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-neutral-900",
}
}
var _ = templruntime.GeneratedTemplate
-29
View File
@@ -1,29 +0,0 @@
package blocks
type InputState int
const (
InputStateDefault InputState = iota
InputStateError
InputStateSuccess
)
templ TextInput(state InputState, label string, placeholder string) {
switch (state) {
case InputStateDefault:
<div class="flex flex-col space-y-1.5 p-6">
<label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">{ label }</label>
<input type="text" placeholder="{label}" id="name" value="{value}" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/>
</div>
case InputStateError:
<div class="flex flex-col space-y-1.5 p-6">
<label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">{ label }</label>
<input type="text" placeholder="{label}" id="name" value="{value}" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/>
</div>
case InputStateSuccess:
<div class="flex flex-col space-y-1.5 p-6">
<label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">{ label }</label>
<input type="text" placeholder="{label}" id="name" value="{value}" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/>
</div>
}
}
@@ -1,100 +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"
type InputState int
const (
InputStateDefault InputState = iota
InputStateError
InputStateSuccess
)
func TextInput(state InputState, label string, placeholder string) 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)
switch state {
case InputStateDefault:
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col space-y-1.5 p-6\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(label)
if templ_7745c5c3_Err != nil {
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))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</label> <input type=\"text\" placeholder=\"{label}\" id=\"name\" value=\"{value}\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
case InputStateError:
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col space-y-1.5 p-6\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(label)
if templ_7745c5c3_Err != nil {
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))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</label> <input type=\"text\" placeholder=\"{label}\" id=\"name\" value=\"{value}\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
case InputStateSuccess:
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col space-y-1.5 p-6\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(label)
if templ_7745c5c3_Err != nil {
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))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</label> <input type=\"text\" placeholder=\"{label}\" id=\"name\" value=\"{value}\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate
-37
View File
@@ -1,37 +0,0 @@
package blocks
templ RadioGroup() {
<div
x-data="{
radioGroupSelectedValue: null,
radioGroupOptions: [
{
title: 'Email Address',
description: 'Get a login code to your email address.',
value: 'email'
},
{
title: 'Phone Number',
description: 'Get a login code to your phone number.',
value: 'phone'
},
{
title: 'Passkey',
description: 'Sign in with your passkey.',
value: 'passkey'
}
]
}"
class="space-y-3"
>
<template x-for="(option, index) in radioGroupOptions" :key="index">
<label @click="radioGroupSelectedValue=option.value" class="flex items-start p-5 space-x-3 bg-white border rounded-md shadow-sm hover:bg-gray-50 border-neutral-200/70">
<input type="radio" name="radio-group" :value="option.value" class="text-gray-900 translate-y-px focus:ring-gray-700"/>
<span class="relative flex flex-col text-left space-y-1.5 leading-none">
<span x-text="option.title" class="font-semibold"></span>
<span x-text="option.description" class="text-sm opacity-50"></span>
</span>
</label>
</template>
</div>
}
@@ -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 RadioGroup() 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("<div x-data=\"{\n radioGroupSelectedValue: null,\n radioGroupOptions: [\n {\n title: &#39;Email Address&#39;,\n description: &#39;Get a login code to your email address.&#39;,\n value: &#39;email&#39;\n },\n {\n title: &#39;Phone Number&#39;,\n description: &#39;Get a login code to your phone number.&#39;,\n value: &#39;phone&#39;\n },\n {\n title: &#39;Passkey&#39;,\n description: &#39;Sign in with your passkey.&#39;,\n value: &#39;passkey&#39;\n }\n ]\n}\" class=\"space-y-3\"><template x-for=\"(option, index) in radioGroupOptions\" :key=\"index\"><label @click=\"radioGroupSelectedValue=option.value\" class=\"flex items-start p-5 space-x-3 bg-white border rounded-md shadow-sm hover:bg-gray-50 border-neutral-200/70\"><input type=\"radio\" name=\"radio-group\" :value=\"option.value\" class=\"text-gray-900 translate-y-px focus:ring-gray-700\"> <span class=\"relative flex flex-col text-left space-y-1.5 leading-none\"><span x-text=\"option.title\" class=\"font-semibold\"></span> <span x-text=\"option.description\" class=\"text-sm opacity-50\"></span></span></label></template></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate
-109
View File
@@ -1,109 +0,0 @@
package blocks
templ Tabs() {
<div
x-data="{
tabSelected: 1,
tabId: $id('tabs'),
tabButtonClicked(tabButton){
this.tabSelected = tabButton.id.replace(this.tabId + '-', '');
this.tabRepositionMarker(tabButton);
},
tabRepositionMarker(tabButton){
this.$refs.tabMarker.style.width=tabButton.offsetWidth + 'px';
this.$refs.tabMarker.style.height=tabButton.offsetHeight + 'px';
this.$refs.tabMarker.style.left=tabButton.offsetLeft + 'px';
},
tabContentActive(tabContent){
return this.tabSelected == tabContent.id.replace(this.tabId + '-content-', '');
},
tabButtonActive(tabContent){
const tabId = tabContent.id.split('-').slice(-1);
return this.tabSelected == tabId;
}
}"
x-init="tabRepositionMarker($refs.tabButtons.firstElementChild);"
class="relative w-full max-w-sm"
>
<div x-ref="tabButtons" class="relative inline-grid items-center justify-center w-full h-10 grid-cols-3 p-1 text-gray-500 bg-white border border-gray-100 rounded-lg select-none">
<button :id="$id(tabId)" @click="tabButtonClicked($el);" type="button" :class="{ 'bg-gray-100 text-gray-700' : tabButtonActive($el) }" class="relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap">Tab1</button>
<button :id="$id(tabId)" @click="tabButtonClicked($el);" type="button" :class="{ 'bg-gray-100 text-gray-700' : tabButtonActive($el) }" class="relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap">Tab2</button>
<button :id="$id(tabId)" @click="tabButtonClicked($el);" type="button" :class="{ 'bg-gray-100 text-gray-700' : tabButtonActive($el) }" class="relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap">Tab3</button>
<div x-ref="tabMarker" class="absolute left-0 z-10 w-1/2 h-full duration-300 ease-out" x-cloak><div class="w-full h-full bg-gray-100 rounded-md shadow-sm"></div></div>
</div>
<div class="relative flex items-center justify-center w-full p-5 mt-2 text-xs text-gray-400 border rounded-md content border-gray-200/70">
<div :id="$id(tabId + '-content')" x-show="tabContentActive($el)" class="relative">
@Table()
</div>
<div :id="$id(tabId + '-content')" x-show="tabContentActive($el)" class="relative" x-cloak>
And, this is the content for Tab2
</div>
<div :id="$id(tabId + '-content')" x-show="tabContentActive($el)" class="relative" x-cloak>
Finally, this is the content for Tab3
</div>
</div>
</div>
}
templ Table() {
<div class="flex flex-col">
<div class="overflow-x-auto">
<div class="inline-block min-w-full">
<div class="overflow-hidden">
<table class="min-w-full divide-y divide-neutral-200">
<thead>
<tr class="text-neutral-500">
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Name</th>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Age</th>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Address</th>
<th class="px-5 py-3 text-xs font-medium text-right uppercase">Action</th>
</tr>
</thead>
<tbody class="divide-y divide-neutral-200">
<tr class="text-neutral-800">
<td class="px-5 py-4 text-sm font-medium whitespace-nowrap">Richard Hendricks</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">30</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">Pied Piper HQ, Palo Alto</td>
<td class="px-5 py-4 text-sm font-medium text-right whitespace-nowrap">
<a class="text-blue-600 hover:text-blue-700" href="#">Edit</a>
</td>
</tr>
<tr class="text-neutral-800">
<td class="px-5 py-4 text-sm font-medium whitespace-nowrap">Erlich Bachman</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">40</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">5230 Penfield Ave, Woodland Hills</td>
<td class="px-5 py-4 text-sm font-medium text-right whitespace-nowrap">
<a class="text-blue-600 hover:text-blue-700" href="#">Edit</a>
</td>
</tr>
<tr class="text-neutral-800">
<td class="px-5 py-4 text-sm font-medium whitespace-nowrap">Monica Hall</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">35</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">2030 Stewart Drive, Sunnyvale</td>
<td class="px-5 py-4 text-sm font-medium text-right whitespace-nowrap">
<a class="text-blue-600 hover:text-blue-700" href="#">Edit</a>
</td>
</tr>
<tr class="text-neutral-800">
<td class="px-5 py-4 text-sm font-medium whitespace-nowrap">Dinesh Chugtai</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">28</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">Pied Piper HQ, Palo Alto</td>
<td class="px-5 py-4 text-sm font-medium text-right whitespace-nowrap">
<a class="text-blue-600 hover:text-blue-700" href="#">Edit</a>
</td>
</tr>
<tr class="text-neutral-800">
<td class="px-5 py-4 text-sm font-medium whitespace-nowrap">Gilfoyle</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">32</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">Pied Piper HQ, Palo Alto</td>
<td class="px-5 py-4 text-sm font-medium text-right whitespace-nowrap">
<a class="text-blue-600 hover:text-blue-700" href="#">Edit</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
}
@@ -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 Tabs() 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("<div x-data=\"{\n tabSelected: 1,\n tabId: $id(&#39;tabs&#39;),\n tabButtonClicked(tabButton){\n this.tabSelected = tabButton.id.replace(this.tabId + &#39;-&#39;, &#39;&#39;);\n this.tabRepositionMarker(tabButton);\n },\n tabRepositionMarker(tabButton){\n this.$refs.tabMarker.style.width=tabButton.offsetWidth + &#39;px&#39;;\n this.$refs.tabMarker.style.height=tabButton.offsetHeight + &#39;px&#39;;\n this.$refs.tabMarker.style.left=tabButton.offsetLeft + &#39;px&#39;;\n },\n tabContentActive(tabContent){\n return this.tabSelected == tabContent.id.replace(this.tabId + &#39;-content-&#39;, &#39;&#39;);\n },\n tabButtonActive(tabContent){\n const tabId = tabContent.id.split(&#39;-&#39;).slice(-1);\n return this.tabSelected == tabId;\n }\n }\" x-init=\"tabRepositionMarker($refs.tabButtons.firstElementChild);\" class=\"relative w-full max-w-sm\"><div x-ref=\"tabButtons\" class=\"relative inline-grid items-center justify-center w-full h-10 grid-cols-3 p-1 text-gray-500 bg-white border border-gray-100 rounded-lg select-none\"><button :id=\"$id(tabId)\" @click=\"tabButtonClicked($el);\" type=\"button\" :class=\"{ &#39;bg-gray-100 text-gray-700&#39; : tabButtonActive($el) }\" class=\"relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap\">Tab1</button> <button :id=\"$id(tabId)\" @click=\"tabButtonClicked($el);\" type=\"button\" :class=\"{ &#39;bg-gray-100 text-gray-700&#39; : tabButtonActive($el) }\" class=\"relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap\">Tab2</button> <button :id=\"$id(tabId)\" @click=\"tabButtonClicked($el);\" type=\"button\" :class=\"{ &#39;bg-gray-100 text-gray-700&#39; : tabButtonActive($el) }\" class=\"relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap\">Tab3</button><div x-ref=\"tabMarker\" class=\"absolute left-0 z-10 w-1/2 h-full duration-300 ease-out\" x-cloak><div class=\"w-full h-full bg-gray-100 rounded-md shadow-sm\"></div></div></div><div class=\"relative flex items-center justify-center w-full p-5 mt-2 text-xs text-gray-400 border rounded-md content border-gray-200/70\"><div :id=\"$id(tabId + &#39;-content&#39;)\" x-show=\"tabContentActive($el)\" class=\"relative\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = Table().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div :id=\"$id(tabId + &#39;-content&#39;)\" x-show=\"tabContentActive($el)\" class=\"relative\" x-cloak>And, this is the content for Tab2</div><div :id=\"$id(tabId + &#39;-content&#39;)\" x-show=\"tabContentActive($el)\" class=\"relative\" x-cloak>Finally, this is the content for Tab3</div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
func Table() 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_Var2 := templ.GetChildren(ctx)
if templ_7745c5c3_Var2 == nil {
templ_7745c5c3_Var2 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col\"><div class=\"overflow-x-auto\"><div class=\"inline-block min-w-full\"><div class=\"overflow-hidden\"><table class=\"min-w-full divide-y divide-neutral-200\"><thead><tr class=\"text-neutral-500\"><th class=\"px-5 py-3 text-xs font-medium text-left uppercase\">Name</th><th class=\"px-5 py-3 text-xs font-medium text-left uppercase\">Age</th><th class=\"px-5 py-3 text-xs font-medium text-left uppercase\">Address</th><th class=\"px-5 py-3 text-xs font-medium text-right uppercase\">Action</th></tr></thead> <tbody class=\"divide-y divide-neutral-200\"><tr class=\"text-neutral-800\"><td class=\"px-5 py-4 text-sm font-medium whitespace-nowrap\">Richard Hendricks</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">30</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">Pied Piper HQ, Palo Alto</td><td class=\"px-5 py-4 text-sm font-medium text-right whitespace-nowrap\"><a class=\"text-blue-600 hover:text-blue-700\" href=\"#\">Edit</a></td></tr><tr class=\"text-neutral-800\"><td class=\"px-5 py-4 text-sm font-medium whitespace-nowrap\">Erlich Bachman</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">40</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">5230 Penfield Ave, Woodland Hills</td><td class=\"px-5 py-4 text-sm font-medium text-right whitespace-nowrap\"><a class=\"text-blue-600 hover:text-blue-700\" href=\"#\">Edit</a></td></tr><tr class=\"text-neutral-800\"><td class=\"px-5 py-4 text-sm font-medium whitespace-nowrap\">Monica Hall</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">35</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">2030 Stewart Drive, Sunnyvale</td><td class=\"px-5 py-4 text-sm font-medium text-right whitespace-nowrap\"><a class=\"text-blue-600 hover:text-blue-700\" href=\"#\">Edit</a></td></tr><tr class=\"text-neutral-800\"><td class=\"px-5 py-4 text-sm font-medium whitespace-nowrap\">Dinesh Chugtai</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">28</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">Pied Piper HQ, Palo Alto</td><td class=\"px-5 py-4 text-sm font-medium text-right whitespace-nowrap\"><a class=\"text-blue-600 hover:text-blue-700\" href=\"#\">Edit</a></td></tr><tr class=\"text-neutral-800\"><td class=\"px-5 py-4 text-sm font-medium whitespace-nowrap\">Gilfoyle</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">32</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">Pied Piper HQ, Palo Alto</td><td class=\"px-5 py-4 text-sm font-medium text-right whitespace-nowrap\"><a class=\"text-blue-600 hover:text-blue-700\" href=\"#\">Edit</a></td></tr></tbody></table></div></div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate
-317
View File
@@ -1,317 +0,0 @@
package blocks
templ Video() {
<div
x-data="{
sources: {
mp4: 'https://cdn.devdojo.com/pines/videos/coast.mp4',
webm: 'https://cdn.devdojo.com/pines/videos/coast.webm',
ogg: 'https://cdn.devdojo.com/pines/videos/coast.ogg'
},
playing: false,
controls: true,
muted: false,
muteForced: false,
fullscreen: false,
ended: false,
mouseleave: false,
autoHideControlsDelay: 3000,
controlsHideTimeout: null,
poster: null,
videoDuration: 0,
timeDurationString: '00:00',
timeElapsedString: '00:00',
showTime: false,
volume: 1,
volumeBeforeMute: 1,
videoPlayerReady: false,
timelineSeek(e) {
time = this.formatTime(Math.round(e.target.value));
this.timeElapsedString = `${time.minutes}:${time.seconds}`;
},
metaDataLoaded(event) {
this.videoDuration = event.target.duration;
this.$refs.videoProgress.setAttribute('max', this.videoDuration);
time = this.formatTime(Math.round(this.videoDuration));
this.timeDurationString = `${time.minutes}:${time.seconds}`;
this.showTime = true;
this.videoPlayerReady = true;
},
togglePlay(e) {
if (this.$refs.player.paused || this.$refs.player.ended) {
this.playing = true;
this.$refs.player.play();
} else {
this.$refs.player.pause();
this.playing = false;
}
},
toggleMute(){
this.muted = !this.muted;
this.$refs.player.muted = this.muted;
if(this.muted){
this.volumeBeforeMute = this.volume;
this.volume = 0;
} else {
this.volume = this.volumeBeforeMute;
}
},
timeUpdatedInterval() {
if (!this.$refs.videoProgress.getAttribute('max'))
this.$refs.videoProgress.setAttribute('max', $refs.player.duration);
this.$refs.videoProgress.value = this.$refs.player.currentTime;
time = this.formatTime(Math.round(this.$refs.player.currentTime));
this.timeElapsedString = `${time.minutes}:${time.seconds}`;
},
updateVolume(e) {
this.volume = e.target.value;
this.$refs.player.volume = this.volume;
if(this.volume == 0){
this.muted = true;
}
if(this.muted && this.volume > 0){
this.muted = false;
}
},
timelineClicked(e) {
rect = this.$refs.videoProgress.getBoundingClientRect();
pos = (e.pageX - rect.left) / this.$refs.videoProgress.offsetWidth;
this.$refs.player.currentTime = pos * this.$refs.player.duration;
},
handleFullscreen() {
if (document.fullscreenElement !== null) {
// The document is in fullscreen mode
document.exitFullscreen();
} else {
// The document is not in fullscreen mode
this.$refs.videoContainer.requestFullscreen();
}
},
mousemoveVideo() {
if(this.playing){
this.resetControlsTimeout();
} else {
this.controls=true;
clearTimeout(this.controlsHideTimeout);
}
},
videoEnded() {
this.ended = true;
this.playing = false;
this.$refs.player.currentTime = 0;
},
resetControlsTimeout() {
this.controls = true;
clearTimeout(this.controlsHideTimeout);
let that = this;
this.controlsHideTimeout = setTimeout(function(){
that.controls=false
}, this.autoHideControlsDelay);
},
formatTime(timeInSeconds) {
result = new Date(timeInSeconds * 1000).toISOString().substring(11, 19);
return {
minutes: result.substring(3, 5),
seconds: result.substring(6, 8),
};
}
}"
x-init="
supportsVideo = document.createElement('video').canPlayType;
if (!supportsVideo) {
alert('This browser does not support the video element');
}
$refs.player.load();
// Hide the default player controls
$refs.player.controls = false;
$watch('playing', (value) => {
if (value) {
ended = false;
controlsHideTimeout = setTimeout(() => {
controls = false;
}, autoHideControlsDelay);
} else {
clearTimeout(controlsHideTimeout);
controls = true;
}
});
if (!document?.fullscreenEnabled) {
$refs.fullscreenButton.style.display = 'none';
}
document.addEventListener('fullscreenchange', (e) => {
fullscreen = !!document.fullscreenElement;
});
"
x-ref="videoContainer"
@mouseleave="mouseleave=true"
@mousemove="mousemoveVideo"
class="relative h-[360px] min-w-[640px] overflow-hidden rounded-md aspect-video"
>
<video
x-ref="player"
@loadedmetadata="metaDataLoaded"
@timeupdate="timeUpdatedInterval"
@ended="videoEnded"
preload="metadata"
:poster="poster"
class="relative z-10 object-cover w-full h-full bg-black"
crossorigin="anonymous"
>
<source :src="sources.mp4" type="video/mp4"/>
<source :src="sources.webm" type="video/webm"/>
<source :src="sources.ogg" type="video/ogg"/>
</video>
<div x-show="videoPlayerReady" class="absolute inset-0 w-full h-full">
<div x-ref="videoBackground" @click="togglePlay()" class="absolute inset-0 z-30 flex items-center justify-center w-full h-full bg-black bg-opacity-0 cursor-pointer group">
<div
x-show="playing"
x-transition:enter="transition ease-out duration-1000"
x-transition:enter-start="scale-50 opacity-100"
x-transition:enter-end="scale-100 opacity-0"
class="absolute z-20 flex items-center justify-center w-24 h-24 bg-blue-600 rounded-full opacity-0 bg-opacity-20"
x-cloak
>
<svg class="w-10 h-10 translate-x-0.5 text-white" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.42737 3.41611C6.46665 2.24586 4.00008 3.67188 4.00007 5.9427L4 18.0572C3.99999 20.329 6.46837 21.7549 8.42907 20.5828L18.5698 14.5207C20.4775 13.3802 20.4766 10.6076 18.568 9.46853L8.42737 3.41611Z" fill="currentColor"></path></svg>
</div>
<div
x-show="!playing && !ended"
x-transition:enter="transition ease-out duration-1000"
x-transition:enter-start="scale-50 opacity-100"
x-transition:enter-end="scale-100 opacity-0"
class="absolute z-20 flex items-center justify-center w-24 h-24 bg-blue-600 rounded-full opacity-0 bg-opacity-20"
x-cloak
>
<svg class="w-10 h-10 text-white" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 3C8.55228 3 9 3.44772 9 4L9 20C9 20.5523 8.55228 21 8 21C7.44772 21 7 20.5523 7 20L7 4C7 3.44772 7.44772 3 8 3ZM16 3C16.5523 3 17 3.44772 17 4V20C17 20.5523 16.5523 21 16 21C15.4477 21 15 20.5523 15 20V4C15 3.44772 15.4477 3 16 3Z" fill="currentColor"></path></svg>
</div>
<div class="absolute z-10 duration-300 ease-out group-hover:scale-110">
<button
x-show="!playing"
x-transition:enter="transition ease-in delay-200 duration-300"
x-transition:enter-start="opacity-0 scale-75"
x-transition:enter-end="opacity-100 scale-100"
x-transition:leave="transition ease-out duration-300"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
class="flex items-center justify-center w-12 h-12 text-white duration-150 ease-out bg-blue-600 rounded-full cursor-pointer bg-opacity-80"
type="button"
>
<svg class="w-5 h-5 translate-x-px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.42737 3.41611C6.46665 2.24586 4.00008 3.67188 4.00007 5.9427L4 18.0572C3.99999 20.329 6.46837 21.7549 8.42907 20.5828L18.5698 14.5207C20.4775 13.3802 20.4766 10.6076 18.568 9.46853L8.42737 3.41611Z" fill="currentColor" x-cloak></path></svg>
</button>
</div>
</div>
<div
x-show="controls"
x-transition:enter="transition ease-out duration-300"
x-transition:enter-start="-translate-y-full"
x-transition:enter-end="translate-y-0"
x-transition:leave="transition ease-in duration-300"
x-transition:leave-start="translate-y-0"
x-transition:leave-end="-translate-y-full"
class="absolute top-0 left-0 z-20 w-full h-1/4 opacity-20 bg-gradient-to-b from-black to-transparent"
x-cloak
></div>
<div
x-show="controls"
x-transition:enter="transition ease-out duration-300"
x-transition:enter-start="translate-y-full"
x-transition:enter-end="translate-y-0"
x-transition:leave="transition ease-in duration-300"
x-transition:leave-start="translate-y-0"
x-transition:leave-end="translate-y-full"
class="absolute bottom-0 left-0 z-20 w-full h-1/4 opacity-20 bg-gradient-to-b from-transparent to-black"
x-cloak
></div>
<div
x-show="controls"
@click="resetControlsTimeout"
x-transition:enter="transition ease-out duration-300"
x-transition:enter-start="-translate-y-full"
x-transition:enter-end="translate-y-0"
x-transition:leave="transition ease-in duration-300"
x-transition:leave-start="translate-y-0"
x-transition:leave-end="-translate-y-full"
class="absolute top-0 left-0 z-40 flex items-center w-full h-12 text-white"
x-cloak
>
<div class="absolute right-0 top-0 mr-0.5 mt-0.5 flex items-center">
<div class="flex items-center h-auto group">
<button @click="toggleMute()" type="button" class="flex items-center justify-center w-6 h-auto duration-150 ease-out opacity-80 hover:opacity-100">
<svg x-show="!muted" class="w-[18px] h-[18px]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" x-cloak><path d="M13.5 4.06c0-1.336-1.616-2.005-2.56-1.06l-4.5 4.5H4.508c-1.141 0-2.318.664-2.66 1.905A9.76 9.76 0 001.5 12c0 .898.121 1.768.35 2.595.341 1.24 1.518 1.905 2.659 1.905h1.93l4.5 4.5c.945.945 2.561.276 2.561-1.06V4.06zM18.584 5.106a.75.75 0 011.06 0c3.808 3.807 3.808 9.98 0 13.788a.75.75 0 11-1.06-1.06 8.25 8.25 0 000-11.668.75.75 0 010-1.06z"></path><path d="M15.932 7.757a.75.75 0 011.061 0 6 6 0 010 8.486.75.75 0 01-1.06-1.061 4.5 4.5 0 000-6.364.75.75 0 010-1.06z"></path></svg>
<svg x-show="muted" class="w-[18px] h-[18px]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" x-cloak><path d="M13.5 4.06c0-1.336-1.616-2.005-2.56-1.06l-4.5 4.5H4.508c-1.141 0-2.318.664-2.66 1.905A9.76 9.76 0 001.5 12c0 .898.121 1.768.35 2.595.341 1.24 1.518 1.905 2.659 1.905h1.93l4.5 4.5c.945.945 2.561.276 2.561-1.06V4.06zM17.78 9.22a.75.75 0 10-1.06 1.06L18.44 12l-1.72 1.72a.75.75 0 001.06 1.06l1.72-1.72 1.72 1.72a.75.75 0 101.06-1.06L20.56 12l1.72-1.72a.75.75 0 00-1.06-1.06l-1.72 1.72-1.72-1.72z"></path></svg>
</button>
<div class="relative h-1.5 mx-0 group-hover:mx-1 rounded-full group-hover:w-12 invisible group-hover:visible w-0 ease-out duration-300">
<input
x-ref="volume"
@input="updateVolume(event)"
type="range"
min="0"
max="1"
:value="volume"
step="0.01"
class="w-full h-full appearance-none flex items-center cursor-pointer bg-transparent z-30
[&::-webkit-slider-thumb]:bg-white [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-0 [&::-webkit-slider-thumb]:w-2 [&::-webkit-slider-thumb]:h-2 [&::-webkit-slider-thumb]:appearance-none
[&::-moz-range-thumb]:bg-white [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:w-2 [&::-moz-range-thumb]:h-2 [&::-moz-range-thumb]:appearance-none
[&::-ms-thumb]:bg-white [&::-ms-thumb]:rounded-full [&::-ms-thumb]:border-0 [&::-ms-thumb]:w-2 [&::-ms-thumb]:h-2 [&::-ms-thumb]:appearance-none
[&::-webkit-slider-runnable-track]:bg-white [&::-webkit-slider-runnable-track]:bg-opacity-30 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:overflow-hidden [&::-moz-range-track]:bg-neutral-200 [&::-moz-range-track]:rounded-full [&::-ms-track]:bg-neutral-200 [&::-ms-track]:rounded-full
[&::-moz-range-progress]:bg-white [&::-moz-range-progress]:bg-opacity-80 [&::-moz-range-progress]:rounded-full [&::-ms-fill-lower]:bg-white [&::-ms-fill-lower]:bg-opacity-80 [&::-ms-fill-lower]:rounded-full [&::-webkit-slider-thumb]:shadow-[-995px_0px_0px_990px_rgba(255,_255,_255,_0.8)]
"
/>
</div>
</div>
<button x-ref="fullscreenButton" @click="handleFullscreen" class="flex items-center justify-center w-10 h-10 duration-150 ease-out scale-90 opacity-80 hover:opacity-100 hover:scale-100" type="button">
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.72685 5C5.77328 5 5 5.77318 5 6.72727V9C5 9.55228 4.55228 10 4 10C3.44772 10 3 9.55228 3 9V6.72727C3 4.6689 4.66842 3 6.72685 3H9C9.55228 3 10 3.44772 10 4C10 4.55228 9.55228 5 9 5H6.72685ZM14 4C14 3.44772 14.4477 3 15 3H17.2727C19.3312 3 21 4.66876 21 6.72727V9C21 9.55228 20.5523 10 20 10C19.4477 10 19 9.55228 19 9V6.72727C19 5.77333 18.2267 5 17.2727 5H15C14.4477 5 14 4.55228 14 4ZM4 14C4.55228 14 5 14.4477 5 15V17.2727C5 18.2268 5.77328 19 6.72685 19H9C9.55228 19 10 19.4477 10 20C10 20.5523 9.55228 21 9 21H6.72685C4.66842 21 3 19.3311 3 17.2727V15C3 14.4477 3.44772 14 4 14ZM20 14C20.5523 14 21 14.4477 21 15V17.2727C21 19.3312 19.3312 21 17.2727 21H15C14.4477 21 14 20.5523 14 20C14 19.4477 14.4477 19 15 19H17.2727C18.2267 19 19 18.2267 19 17.2727V15C19 14.4477 19.4477 14 20 14Z" fill="currentColor"></path></svg>
</button>
</div>
</div>
<div
x-show="controls"
@click="resetControlsTimeout"
x-transition:enter="transition ease-out duration-300"
x-transition:enter-start="translate-y-full"
x-transition:enter-end="translate-y-0"
x-transition:leave="transition ease-in duration-300"
x-transition:leave-start="translate-y-0"
x-transition:leave-end="translate-y-full"
class="absolute bottom-0 left-0 z-40 w-full h-12"
x-cloak
>
<div class="absolute bottom-0 z-30 w-full px-2.5 -translate-y-8">
<div class="relative w-full h-1 rounded-full">
<input
x-ref="videoProgress"
@click="timelineClicked"
@input="timelineSeek(event)"
type="range"
min="0"
max="100"
value="0"
step="any"
class="w-full h-full appearance-none flex items-center cursor-pointer bg-transparent z-30
[&::-webkit-slider-thumb]:bg-white [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-0 [&::-webkit-slider-thumb]:w-1.5 [&::-webkit-slider-thumb]:h-1.5 [&::-webkit-slider-thumb]:appearance-none
[&::-moz-range-thumb]:bg-white [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:w-1.5 [&::-moz-range-thumb]:h-1.5 [&::-moz-range-thumb]:appearance-none
[&::-ms-thumb]:bg-white [&::-ms-thumb]:rounded-full [&::-ms-thumb]:border-0 [&::-ms-thumb]:w-1.5 [&::-ms-thumb]:h-1.5 [&::-ms-thumb]:appearance-none
[&::-webkit-slider-runnable-track]:bg-white [&::-webkit-slider-runnable-track]:bg-opacity-30 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:overflow-hidden [&::-moz-range-track]:bg-neutral-200 [&::-moz-range-track]:rounded-full [&::-ms-track]:bg-neutral-200 [&::-ms-track]:rounded-full
[&::-moz-range-progress]:bg-blue-600 [&::-moz-range-progress]:rounded-full [&::-ms-fill-lower]:bg-blue-600 [&::-ms-fill-lower]:rounded-full [&::-webkit-slider-thumb]:shadow-[-995px_0px_0px_990px_#2463eb]
"
/>
</div>
</div>
<div class="absolute bottom-0 left-0 z-20 flex items-center w-full h-8 text-white">
<div x-show="showTime" class="flex items-center justify-between w-full mx-3 font-mono text-xs opacity-80 hover:opacity-100" x-cloak>
<time x-ref="timeElapsed" x-text="timeElapsedString">00:00</time>
<time x-ref="timeDuration" x-text="timeDurationString">00:00</time>
</div>
</div>
</div>
</div>
</div>
}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -18,7 +18,7 @@ templ Header() {
<!-- Desktop sign in links --> <!-- Desktop sign in links -->
<ul class="flex grow justify-end flex-wrap items-center"> <ul class="flex grow justify-end flex-wrap items-center">
<li> <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">Log in</a> <div class="text-sm cursor-pointer font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition" hx-swap="afterend" hx-get="/login">Log in</div>
</li> </li>
<li class="ml-1"> <li class="ml-1">
<div class="btn-sm text-zinc-100 cursor-pointer bg-zinc-900 hover:bg-zinc-800 w-full shadow" hx-swap="afterend" hx-get="/register">Register</div> <div class="btn-sm text-zinc-100 cursor-pointer bg-zinc-900 hover:bg-zinc-800 w-full shadow" hx-swap="afterend" hx-get="/register">Register</div>
+1 -1
View File
@@ -29,7 +29,7 @@ func Header() 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=\"/\"><img src=\"https://cdn.sonr.id/img/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\">Log in</a></li><li class=\"ml-1\"><div class=\"btn-sm text-zinc-100 cursor-pointer bg-zinc-900 hover:bg-zinc-800 w-full shadow\" hx-swap=\"afterend\" hx-get=\"/register\">Register</div></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 shadow-sm shadow-zinc-950/20\" href=\"/\"><img src=\"https://cdn.sonr.id/img/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><div class=\"text-sm cursor-pointer font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition\" hx-swap=\"afterend\" hx-get=\"/login\">Log in</div></li><li class=\"ml-1\"><div class=\"btn-sm text-zinc-100 cursor-pointer bg-zinc-900 hover:bg-zinc-800 w-full shadow\" hx-swap=\"afterend\" hx-get=\"/register\">Register</div></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
View File
@@ -16,7 +16,6 @@ templ Modal(c echo.Context) {
" "
@keydown.escape="fullscreenModal=false" @keydown.escape="fullscreenModal=false"
> >
<button @click="fullscreenModal=true" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors bg-white border rounded-md hover:bg-neutral-100 active:bg-white focus:bg-white focus:outline-none focus:ring-2 focus:ring-neutral-200/60 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none">Preview</button>
<template x-teleport="body"> <template x-teleport="body">
<div <div
x-show="fullscreenModal" x-show="fullscreenModal"
File diff suppressed because one or more lines are too long
-1
View File
@@ -11,7 +11,6 @@ templ View(c echo.Context) {
@blocks.H1("Sonr.ID") @blocks.H1("Sonr.ID")
@blocks.Text("Neo-tree is a file manager for NeoFS.") @blocks.Text("Neo-tree is a file manager for NeoFS.")
@blocks.Spacer() @blocks.Spacer()
@blocks.RadioGroup()
@blocks.Spacer() @blocks.Spacer()
@blocks.Button(blocks.GET("/", "#login-view")) { @blocks.Button(blocks.GET("/", "#login-view")) {
@blocks.Text("Cancel") @blocks.Text("Cancel")
@@ -82,14 +82,6 @@ func View(c echo.Context) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = blocks.RadioGroup().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) templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
-1
View File
@@ -9,7 +9,6 @@ templ View(c echo.Context) {
@blocks.Layout("Sonr.ID", true) { @blocks.Layout("Sonr.ID", true) {
@blocks.Card("profile-view", blocks.SizeLarge) { @blocks.Card("profile-view", blocks.SizeLarge) {
@blocks.ProfileCard() @blocks.ProfileCard()
@blocks.Tabs()
} }
} }
} }
@@ -62,14 +62,6 @@ func View(c echo.Context) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = blocks.Tabs().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err return templ_7745c5c3_Err
}) })
templ_7745c5c3_Err = blocks.Card("profile-view", blocks.SizeLarge).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) templ_7745c5c3_Err = blocks.Card("profile-view", blocks.SizeLarge).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
+1 -1
View File
@@ -8,7 +8,7 @@ import (
templ Modal(c echo.Context) { templ Modal(c echo.Context) {
<div <div
x-data="{ modalOpen: true }" x-data="{ modalOpen: true }"
@keydown.escape.window="modalOpen = false" @keydown.escape="modalOpen=false"
:class="{ 'z-40': modalOpen }" :class="{ 'z-40': modalOpen }"
class="relative w-auto h-auto" class="relative w-auto h-auto"
> >
@@ -34,7 +34,7 @@ func Modal(c echo.Context) 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("<div x-data=\"{ modalOpen: true }\" @keydown.escape.window=\"modalOpen = false\" :class=\"{ &#39;z-40&#39;: modalOpen }\" class=\"relative w-auto h-auto\"><template x-teleport=\"body\"><div x-show=\"modalOpen\" class=\"fixed top-0 left-0 z-[99] flex items-center justify-center w-screen h-screen\" x-cloak><div x-show=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0\" x-transition:enter-end=\"opacity-100\" x-transition:leave=\"ease-in duration-300\" x-transition:leave-start=\"opacity-100\" x-transition:leave-end=\"opacity-0\" @click=\"modalOpen=false\" class=\"absolute inset-0 w-full h-full bg-zinc-900 bg-opacity-50 backdrop-blur-sm\"></div><div x-show=\"modalOpen\" x-trap.inert.noscroll=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0 scale-90\" x-transition:enter-end=\"opacity-100 scale-100\" x-transition:leave=\"ease-in duration-200\" x-transition:leave-start=\"opacity-100 scale-100\" x-transition:leave-end=\"opacity-0 scale-90\" class=\"relative w-full py-6 bg-white shadow-md px-7 bg-opacity-90 drop-shadow-md backdrop-blur-sm sm:max-w-lg sm:rounded-lg\"><div class=\"flex items-center justify-between pb-3\"><h3 class=\"text-lg font-semibold\">Account Registration</h3><button @click=\"modalOpen=false\" class=\"absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5 text-zinc-600 rounded-full hover:text-zinc-800 hover:bg-zinc-50\"><svg class=\"w-5 h-5\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\"></path></svg></button></div><div class=\"relative w-auto pb-8\"><p>Enter your account information below to create your account.</p></div>") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div x-data=\"{ modalOpen: true }\" @keydown.escape=\"modalOpen=false\" :class=\"{ &#39;z-40&#39;: modalOpen }\" class=\"relative w-auto h-auto\"><template x-teleport=\"body\"><div x-show=\"modalOpen\" class=\"fixed top-0 left-0 z-[99] flex items-center justify-center w-screen h-screen\" x-cloak><div x-show=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0\" x-transition:enter-end=\"opacity-100\" x-transition:leave=\"ease-in duration-300\" x-transition:leave-start=\"opacity-100\" x-transition:leave-end=\"opacity-0\" @click=\"modalOpen=false\" class=\"absolute inset-0 w-full h-full bg-zinc-900 bg-opacity-50 backdrop-blur-sm\"></div><div x-show=\"modalOpen\" x-trap.inert.noscroll=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0 scale-90\" x-transition:enter-end=\"opacity-100 scale-100\" x-transition:leave=\"ease-in duration-200\" x-transition:leave-start=\"opacity-100 scale-100\" x-transition:leave-end=\"opacity-0 scale-90\" class=\"relative w-full py-6 bg-white shadow-md px-7 bg-opacity-90 drop-shadow-md backdrop-blur-sm sm:max-w-lg sm:rounded-lg\"><div class=\"flex items-center justify-between pb-3\"><h3 class=\"text-lg font-semibold\">Account Registration</h3><button @click=\"modalOpen=false\" class=\"absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5 text-zinc-600 rounded-full hover:text-zinc-800 hover:bg-zinc-50\"><svg class=\"w-5 h-5\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\"></path></svg></button></div><div class=\"relative w-auto pb-8\"><p>Enter your account information below to create your account.</p></div>")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
+1 -1
View File
@@ -6,7 +6,7 @@ type Feature struct {
Description string `pkl:"description"` Description string `pkl:"description"`
Icon string `pkl:"icon"` Icon *string `pkl:"icon"`
Image *Image `pkl:"image"` Image *Image `pkl:"image"`
} }
+1 -1
View File
@@ -6,5 +6,5 @@ type Highlights struct {
Subheading string `pkl:"subheading"` Subheading string `pkl:"subheading"`
Highlights []*Highlight `pkl:"highlights"` Highlights []*Feature `pkl:"highlights"`
} }
-12
View File
@@ -3,16 +3,4 @@ package models
type Home struct { type Home struct {
Hero *Hero `pkl:"hero"` Hero *Hero `pkl:"hero"`
Highlights []*Highlight `pkl:"highlights"`
Features []*Features `pkl:"features"`
Bento *Bento `pkl:"bento"`
Lowlights []*Lowlights `pkl:"lowlights"`
CallToAction *CallToAction `pkl:"callToAction"`
Footer *Footer `pkl:"footer"`
} }
+2 -8
View File
@@ -10,15 +10,9 @@ func init() {
pkl.RegisterMapping("models#Button", Button{}) pkl.RegisterMapping("models#Button", Button{})
pkl.RegisterMapping("models#Image", Image{}) pkl.RegisterMapping("models#Image", Image{})
pkl.RegisterMapping("models#Stat", Stat{}) pkl.RegisterMapping("models#Stat", Stat{})
pkl.RegisterMapping("models#Highlight", Highlight{})
pkl.RegisterMapping("models#Features", Features{})
pkl.RegisterMapping("models#Bento", Bento{})
pkl.RegisterMapping("models#Lowlights", Lowlights{})
pkl.RegisterMapping("models#CallToAction", CallToAction{})
pkl.RegisterMapping("models#Footer", Footer{})
pkl.RegisterMapping("models#SocialLink", SocialLink{})
pkl.RegisterMapping("models#Link", Link{})
pkl.RegisterMapping("models#Input", Input{}) pkl.RegisterMapping("models#Input", Input{})
pkl.RegisterMapping("models#Link", Link{})
pkl.RegisterMapping("models#SocialLink", SocialLink{})
pkl.RegisterMapping("models#Feature", Feature{}) pkl.RegisterMapping("models#Feature", Feature{})
pkl.RegisterMapping("models#Highlights", Highlights{}) pkl.RegisterMapping("models#Highlights", Highlights{})
} }
-196
View File
@@ -1,8 +1,6 @@
amends "https://pkl.sh/UIUX.pkl"; amends "https://pkl.sh/UIUX.pkl";
home = new Home { home = new Home {
// Hero
hero = new Hero { hero = new Hero {
titleFirst = "Simplified"; titleFirst = "Simplified";
titleEmphasis = "self-custody"; titleEmphasis = "self-custody";
@@ -36,198 +34,4 @@ home = new Home {
} }
}; };
}; };
// Highlights
highlights {
new Highlight {
title = "Simplified";
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
image = new Image {
src = "https://cdn.sonr.id/img/highlight-1.svg";
width = "500";
height = "500";
};
};
new Highlight {
title = "Simplified";
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
image = new Image {
src = "https://cdn.sonr.id/img/highlight-2.svg";
width = "500";
height = "500";
};
};
};
// Features
features {
new Features {
title = "Simplified";
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
image = new Image {
src = "https://cdn.sonr.id/img/feature-1.svg";
width = "500";
height = "500";
};
};
new Features {
title = "Simplified";
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
image = new Image {
src = "https://cdn.sonr.id/img/feature-2.svg";
width = "500";
height = "500";
};
};
new Features {
title = "Simplified";
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
image = new Image {
src = "https://cdn.sonr.id/img/feature-3.svg";
width = "500";
height = "500";
};
};
};
// Bento
bento = new Bento {
title = "Simplified";
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
primaryButton = new Button {
text = "Get Started";
href = "/register";
};
secondaryButton = new Button {
text = "Learn More";
href = "/about";
};
};
// Lowlights
lowlights {
new Lowlights {
title = "Simplified";
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
image = new Image {
src = "https://cdn.sonr.id/img/lowlight-1.svg";
width = "500";
height = "500";
};
};
new Lowlights {
title = "Simplified";
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
image = new Image {
src = "https://cdn.sonr.id/img/lowlight-2.svg";
width = "500";
height = "500";
};
};
};
// Call to Action
callToAction = new CallToAction {
title = "Simplified";
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
primaryButton = new Button {
text = "Get Started";
href = "/register";
};
secondaryButton = new Button {
text = "Learn More";
href = "/about";
};
};
// Footer
footer = new Footer {
logo = new Image {
src = "https://cdn.sonr.id/img/logo.svg";
width = "500";
height = "500";
};
mediumLink = new SocialLink {
link = new Link {
text = "Medium";
href = "https://medium.com/sonr-io";
};
icon = "https://cdn.sonr.id/img/medium.svg";
};
twitterLink = new SocialLink {
link = new Link {
text = "Twitter";
href = "https://twitter.com/sonr";
};
icon = "https://cdn.sonr.id/img/twitter.svg";
};
discordLink = new SocialLink {
link = new Link {
text = "Discord";
href = "https://discord.com/invite/sonr";
};
icon = "https://cdn.sonr.id/img/discord.svg";
};
githubLink = new SocialLink {
link = new Link {
text = "GitHub";
href = "https://github.com/sonr-io";
};
icon = "https://cdn.sonr.id/img/github.svg";
};
companyLinks {
new Link {
text = "About";
href = "https://sonr.io/about";
};
new Link {
text = "Careers";
href = "https://sonr.io/careers";
};
new Link {
text = "Partners";
href = "https://sonr.io/partners";
};
new Link {
text = "Investors";
href = "https://sonr.io/investors";
};
new Link {
text = "Newsroom";
href = "https://sonr.io/newsroom";
};
new Link {
text = "Blog";
href = "https://sonr.io/blog";
};
};
resourcesLinks {
new Link {
text = "Docs";
href = "https://docs.sonr.io";
};
new Link {
text = "Whitepaper";
href = "https://sonr.io/whitepaper";
};
new Link {
text = "FAQ";
href = "https://sonr.io/faq";
};
new Link {
text = "Terms of Service";
href = "https://sonr.io/terms";
};
new Link {
text = "Privacy Policy";
href = "https://sonr.io/privacy";
};
};
}
}; };
@@ -1,4 +1,4 @@
package pages package router
import ( import (
"bytes" "bytes"
@@ -14,35 +14,42 @@ import (
"github.com/onsonr/sonr/pkg/nebula/models" "github.com/onsonr/sonr/pkg/nebula/models"
) )
func Authorize(c echo.Context) error { // ╭───────────────────────────────────────────────────────────╮
return echoResponse(c, grant.View(c)) // │ Marketing Pages │
} // ╰───────────────────────────────────────────────────────────╯
func Home(c echo.Context) error { func Home(c echo.Context) error {
mdls, err := models.GetModels() mdls, err := models.GetModels()
if err != nil { if err != nil {
return err return err
} }
return echoResponse(c, home.View(mdls.Home)) return render(c, home.View(mdls.Home))
}
func Login(c echo.Context) error {
return echoResponse(c, login.Modal(c))
} }
func Profile(c echo.Context) error { func Profile(c echo.Context) error {
return echoResponse(c, profile.View(c)) return render(c, profile.View(c))
}
// ╭───────────────────────────────────────────────────────────╮
// │ Authentication Views │
// ╰───────────────────────────────────────────────────────────╯
func Authorize(c echo.Context) error {
return render(c, grant.View(c))
}
func Login(c echo.Context) error {
return render(c, login.Modal(c))
} }
func Register(c echo.Context) error { func Register(c echo.Context) error {
return echoResponse(c, register.Modal(c)) return render(c, register.Modal(c))
} }
// ╭───────────────────────────────────────────────────────────╮ // ╭───────────────────────────────────────────────────────────╮
// │ Helper Methods │ // │ Helper Methods │
// ╰───────────────────────────────────────────────────────────╯ // ╰───────────────────────────────────────────────────────────╯
func echoResponse(c echo.Context, cmp templ.Component) error { func render(c echo.Context, cmp templ.Component) error {
// Create a buffer to store the rendered HTML // Create a buffer to store the rendered HTML
buf := &bytes.Buffer{} buf := &bytes.Buffer{}
// Render the component to the buffer // Render the component to the buffer
+13
View File
@@ -0,0 +1,13 @@
package router
type Status string
const (
StatusOK Status = "ok"
StatusError Status = "error"
StatusNotFound Status = "not-found"
StatusUnauthorized Status = "unauthorized"
StatusForbidden Status = "forbidden"
StatusInternalServerError Status = "internal-server-error"
StatusBadRequest Status = "bad-request"
)
+3 -52
View File
@@ -54,14 +54,8 @@ class SocialLink {
class Feature { class Feature {
title: String title: String
description: String description: String
icon: String icon: String?
image: Image image: Image?
}
class Highlight {
title: String
description: String
image: Image
} }
class Stat { class Stat {
@@ -87,53 +81,10 @@ class Hero {
class Highlights { class Highlights {
heading: String heading: String
subheading: String subheading: String
highlights: Listing<Highlight> highlights: Listing<Feature>
} }
class Features {
title: String
description: String
image: Image
}
class Bento {
title: String
description: String
primaryButton: Button
secondaryButton: Button
}
class Lowlights {
title: String
description: String
image: Image
}
class CallToAction {
title: String
description: String
primaryButton: Button
secondaryButton: Button
}
class Footer {
logo: Image
mediumLink: SocialLink
twitterLink: SocialLink
discordLink: SocialLink
githubLink: SocialLink
companyLinks: Listing<Link>
resourcesLinks: Listing<Link>
}
class Home { class Home {
hero: Hero hero: Hero
highlights: Listing<Highlight>
features: Listing<Features>
bento: Bento
lowlights: Listing<Lowlights>
callToAction: CallToAction
footer: Footer
} }
home : Home home : Home