mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feature/1129 integrate webauthn controller (#1135)
* **refactor: remove nebula static file serving** * **feat: Add login, register, and authorize sections** * **feat: implement registration form UI** * **refactor: abstract template rendering to ctx module** * **feat: add deployment target for Highway gateway** * **feat: migrate Highway gateway to Cloudflare Workers** * **feat: refactor nebula routes to components** * **chore(deps): remove unused dependencies** * **chore(deps): remove unused dependencies** * **feat: add user and relaying party entities** * **refactor: remove unused imports** * * **feat: add motion scale-in and opacity-in animations** * **refactor: move dwn and orm packages to internal** * **refactor: update imports to use relative paths** * **refactor: rename build targets for clarity** * **feat: add RelayingPartyEntity model** * **refactor: rename creds templates to credentials** * **refactor: remove unused entity model** * **refactor: move models to internal package** * **refactor: move models package to internal/orm** * **feat: implement broadcast channel context** * **feat: remove config upload step** * **feat: remove unused configuration files** * **feat: migrate authentication logic to workers** * **feat: remove cloudflared dependency** * **refactor: move client related routes to 'routes/client.go'** * **feat: implement macaroon middleware** * **refactor: move fetch package to cmd/motr** * **feat: remove auth and grant endpoints** * **docs: add conceptual descriptions to did module** <sub><a href="https://huly.app/guest/sonrhq?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsaW5rSWQiOiI2NzA4MTIyNmM3ZDZhNTZhOGY4ZGFjOTciLCJndWVzdCI6InRydWUiLCJlbWFpbCI6IiNndWVzdEBoYy5lbmdpbmVlcmluZyIsIndvcmtzcGFjZSI6InctcHJhZC1zb25yaHEtNjVlZjcyZDQtY2UyOGQ0ODJjNi00ZWY4ZDAifQ.j-w5jk5Ji-0vCkaxVaK8pDMIOhRsXmG7o6oZictoHYE">Huly®: <b>ENG-1057</b></a></sub>
This commit is contained in:
Binary file not shown.
@@ -1,64 +0,0 @@
|
||||
package dwn
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
_ "embed"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/ipfs/boxo/files"
|
||||
"github.com/onsonr/sonr/pkg/dwn/gen"
|
||||
"github.com/onsonr/sonr/pkg/nebula/routes"
|
||||
)
|
||||
|
||||
//go:embed app.wasm
|
||||
var dwnWasmData []byte
|
||||
|
||||
//go:embed sw.js
|
||||
var swJSData []byte
|
||||
|
||||
var (
|
||||
dwnWasmFile = files.NewBytesFile(dwnWasmData)
|
||||
swJSFile = files.NewBytesFile(swJSData)
|
||||
)
|
||||
|
||||
// NewVaultDirectory creates a new directory with the default files
|
||||
func NewVaultDirectory(cnfg *gen.Config) (files.Node, error) {
|
||||
dwnJSON, err := json.Marshal(cnfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
w := bytes.NewBuffer(nil)
|
||||
err = routes.IndexFile().Render(context.Background(), w)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fileMap := map[string]files.Node{
|
||||
"config.json": files.NewBytesFile(dwnJSON),
|
||||
"sw.js": swJSFile,
|
||||
"app.wasm": dwnWasmFile,
|
||||
"index.html": files.NewBytesFile(w.Bytes()),
|
||||
}
|
||||
return files.NewMapDirectory(fileMap), nil
|
||||
}
|
||||
|
||||
// Use IndexHTML template to generate the index file
|
||||
func IndexHTMLFile() (files.Node, error) {
|
||||
w := bytes.NewBuffer(nil)
|
||||
err := routes.IndexFile().Render(context.Background(), w)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
indexData := w.Bytes()
|
||||
return files.NewBytesFile(indexData), nil
|
||||
}
|
||||
|
||||
// MarshalConfigFile uses the config template to generate the dwn config file
|
||||
func MarshalConfigFile(c *gen.Config) (files.Node, error) {
|
||||
dwnConfigData, err := json.Marshal(c)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return files.NewBytesFile(dwnConfigData), nil
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// Code generated from Pkl module `dwngen`. DO NOT EDIT.
|
||||
package gen
|
||||
|
||||
type Config struct {
|
||||
Ipfs *IPFS `pkl:"ipfs" json:"ipfs,omitempty"`
|
||||
|
||||
Sonr *Sonr `pkl:"sonr" json:"sonr,omitempty"`
|
||||
|
||||
Motr *Motr `pkl:"motr" json:"motr,omitempty"`
|
||||
|
||||
Schema *Schema `pkl:"schema" json:"schema,omitempty"`
|
||||
|
||||
ProxyUrl string `pkl:"proxyUrl" json:"proxyUrl,omitempty"`
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
// Code generated from Pkl module `dwngen`. DO NOT EDIT.
|
||||
package gen
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/apple/pkl-go/pkl"
|
||||
)
|
||||
|
||||
type Dwngen struct {
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Dwngen
|
||||
func LoadFromPath(ctx context.Context, path string) (ret *Dwngen, err error) {
|
||||
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
cerr := evaluator.Close()
|
||||
if err == nil {
|
||||
err = cerr
|
||||
}
|
||||
}()
|
||||
ret, err = Load(ctx, evaluator, pkl.FileSource(path))
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Dwngen
|
||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Dwngen, error) {
|
||||
var ret Dwngen
|
||||
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ret, nil
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// Code generated from Pkl module `dwngen`. DO NOT EDIT.
|
||||
package gen
|
||||
|
||||
type IPFS struct {
|
||||
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"`
|
||||
|
||||
GatewayUrl string `pkl:"gatewayUrl" json:"gatewayUrl,omitempty"`
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// Code generated from Pkl module `dwngen`. DO NOT EDIT.
|
||||
package gen
|
||||
|
||||
type Motr struct {
|
||||
Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"`
|
||||
|
||||
Address string `pkl:"address" json:"address,omitempty"`
|
||||
|
||||
Origin string `pkl:"origin" json:"origin,omitempty"`
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
// Code generated from Pkl module `dwngen`. DO NOT EDIT.
|
||||
package gen
|
||||
|
||||
type Schema struct {
|
||||
Version int `pkl:"version"`
|
||||
|
||||
Account string `pkl:"account" json:"account,omitempty"`
|
||||
|
||||
Asset string `pkl:"asset" json:"asset,omitempty"`
|
||||
|
||||
Chain string `pkl:"chain" json:"chain,omitempty"`
|
||||
|
||||
Credential string `pkl:"credential" json:"credential,omitempty"`
|
||||
|
||||
Jwk string `pkl:"jwk" json:"jwk,omitempty"`
|
||||
|
||||
Grant string `pkl:"grant" json:"grant,omitempty"`
|
||||
|
||||
Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"`
|
||||
|
||||
Profile string `pkl:"profile" json:"profile,omitempty"`
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// Code generated from Pkl module `dwngen`. DO NOT EDIT.
|
||||
package gen
|
||||
|
||||
type Sonr struct {
|
||||
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"`
|
||||
|
||||
GrpcUrl string `pkl:"grpcUrl" json:"grpcUrl,omitempty"`
|
||||
|
||||
RpcUrl string `pkl:"rpcUrl" json:"rpcUrl,omitempty"`
|
||||
|
||||
WebSocketUrl string `pkl:"webSocketUrl" json:"webSocketUrl,omitempty"`
|
||||
|
||||
ChainId string `pkl:"chainId" json:"chainId,omitempty"`
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// Code generated from Pkl module `dwngen`. DO NOT EDIT.
|
||||
package gen
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
func init() {
|
||||
pkl.RegisterMapping("dwngen", Dwngen{})
|
||||
pkl.RegisterMapping("dwngen#Config", Config{})
|
||||
pkl.RegisterMapping("dwngen#IPFS", IPFS{})
|
||||
pkl.RegisterMapping("dwngen#Sonr", Sonr{})
|
||||
pkl.RegisterMapping("dwngen#Motr", Motr{})
|
||||
pkl.RegisterMapping("dwngen#Schema", Schema{})
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
importScripts(
|
||||
"https://cdn.jsdelivr.net/gh/golang/go@go1.22.5/misc/wasm/wasm_exec.js",
|
||||
"https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@v1.1.0/sw.js",
|
||||
);
|
||||
|
||||
registerWasmHTTPListener("/app.wasm");
|
||||
|
||||
// Skip installed stage and jump to activating stage
|
||||
self.addEventListener("install", (event) => {
|
||||
event.waitUntil(skipWaiting());
|
||||
});
|
||||
|
||||
// Start controlling clients as soon as the SW is activated
|
||||
self.addEventListener("activate", (event) => {
|
||||
event.waitUntil(clients.claim());
|
||||
});
|
||||
|
||||
self.addEventListener("canmakepayment", function (e) {
|
||||
e.respondWith(new Promise(function (resolve, reject) {
|
||||
resolve(true);
|
||||
}));
|
||||
});
|
||||
@@ -1,44 +0,0 @@
|
||||
// deps.mjs
|
||||
import { mkdir, writeFile } from "fs/promises";
|
||||
import fetch from "node-fetch";
|
||||
import path from "path";
|
||||
|
||||
async function fetchAndSave(url, outputPath) {
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to fetch ${url}: ${response.statusText}`);
|
||||
}
|
||||
const data = await response.text();
|
||||
await writeFile(outputPath, data, "utf8");
|
||||
console.log(`Fetched and saved: ${outputPath}`);
|
||||
} catch (error) {
|
||||
console.error(`Error fetching ${url}:`, error);
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
// Ensure the assets directories exist
|
||||
await mkdir("./assets/js", { recursive: true });
|
||||
await mkdir("./assets/css", { recursive: true });
|
||||
|
||||
// Fetch htmx.min.js
|
||||
await fetchAndSave(
|
||||
"https://cdnjs.cloudflare.com/ajax/libs/htmx/2.0.2/htmx.min.js",
|
||||
"./assets/js/htmx.min.js",
|
||||
);
|
||||
|
||||
// Fetch alpine.min.js
|
||||
await fetchAndSave(
|
||||
"https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.14.1/cdn.min.js",
|
||||
"./assets/js/alpine.min.js",
|
||||
);
|
||||
|
||||
// Fetch dexie.min.js
|
||||
await fetchAndSave(
|
||||
"https://cdnjs.cloudflare.com/ajax/libs/dexie/4.0.8/dexie.min.js",
|
||||
"./assets/js/dexie.min.js",
|
||||
);
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -1,49 +0,0 @@
|
||||
# Nebula
|
||||
|
||||
A Templ component library for the Sonr DWN (Decentralized Web Node) client.
|
||||
|
||||
## Overview
|
||||
|
||||
### 3rd Party
|
||||
|
||||
- [htmx](https://htmx.org/)
|
||||
- [tailwindcss](https://tailwindcss.com/)
|
||||
- [templ](https://templ.dev/)
|
||||
- [alpinejs](https://alpinejs.dev/)
|
||||
|
||||
### Components
|
||||
|
||||
- Navbar
|
||||
- Footer
|
||||
- Login
|
||||
- Register
|
||||
- Profile
|
||||
- Authorize
|
||||
|
||||
## Usage
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/nebula"
|
||||
"github.com/onsonr/sonr/nebula/components"
|
||||
"github.com/onsonr/sonr/nebula/pages"
|
||||
)
|
||||
|
||||
func main() {
|
||||
e := echo.New()
|
||||
e.Use(nebula.UseAssets)
|
||||
e.GET("/", pages.Home)
|
||||
e.GET("/login", pages.Login)
|
||||
e.GET("/register", pages.Register)
|
||||
e.GET("/profile", pages.Profile)
|
||||
e.GET("/authorize", pages.Authorize)
|
||||
e.GET("/components", components.Home)
|
||||
e.Logger.Fatal(e.Start(":1323"))
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
File diff suppressed because it is too large
Load Diff
Vendored
-5
File diff suppressed because one or more lines are too long
Vendored
-2
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
@@ -1,22 +0,0 @@
|
||||
importScripts(
|
||||
"https://cdn.jsdelivr.net/gh/golang/go@go1.22.5/misc/wasm/wasm_exec.js",
|
||||
"https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@v1.1.0/sw.js",
|
||||
);
|
||||
|
||||
registerWasmHTTPListener("/app.wasm");
|
||||
|
||||
// Skip installed stage and jump to activating stage
|
||||
self.addEventListener("install", (event) => {
|
||||
event.waitUntil(skipWaiting());
|
||||
});
|
||||
|
||||
// Start controlling clients as soon as the SW is activated
|
||||
self.addEventListener("activate", (event) => {
|
||||
event.waitUntil(clients.claim());
|
||||
});
|
||||
|
||||
self.addEventListener("canmakepayment", function (e) {
|
||||
e.respondWith(new Promise(function (resolve, reject) {
|
||||
resolve(true);
|
||||
}));
|
||||
});
|
||||
Binary file not shown.
@@ -1,11 +0,0 @@
|
||||
package forms
|
||||
|
||||
templ PrivacyConsentForm() {
|
||||
<div class="border rounded-lg shadow-sm bg-card text-zinc-900">
|
||||
<div class="flex flex-col space-y-1.5 p-6"></div>
|
||||
<div class="p-6 pt-0 space-y-2">
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">Name</label><input type="text" id="name" placeholder="Adam Wathan" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="username">Handle</label><input type="text" id="handle" placeholder="angelo.snr" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package forms
|
||||
|
||||
//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 PrivacyConsentForm() 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 class=\"border rounded-lg shadow-sm bg-card text-zinc-900\"><div class=\"flex flex-col space-y-1.5 p-6\"></div><div class=\"p-6 pt-0 space-y-2\"><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">Name</label><input type=\"text\" id=\"name\" placeholder=\"Adam Wathan\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"username\">Handle</label><input type=\"text\" id=\"handle\" placeholder=\"angelo.snr\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,11 +0,0 @@
|
||||
package forms
|
||||
|
||||
templ AssertCredentialForm() {
|
||||
<div class="border rounded-lg shadow-sm bg-card text-zinc-900">
|
||||
<div class="flex flex-col space-y-1.5 p-6"></div>
|
||||
<div class="p-6 pt-0 space-y-2">
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">Name</label><input type="text" id="name" placeholder="Adam Wathan" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="username">Handle</label><input type="text" id="handle" placeholder="angelo.snr" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package forms
|
||||
|
||||
//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 AssertCredentialForm() 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 class=\"border rounded-lg shadow-sm bg-card text-zinc-900\"><div class=\"flex flex-col space-y-1.5 p-6\"></div><div class=\"p-6 pt-0 space-y-2\"><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">Name</label><input type=\"text\" id=\"name\" placeholder=\"Adam Wathan\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"username\">Handle</label><input type=\"text\" id=\"handle\" placeholder=\"angelo.snr\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,11 +0,0 @@
|
||||
package forms
|
||||
|
||||
templ RegisterCredentialForm() {
|
||||
<div class="border rounded-lg shadow-sm bg-card text-zinc-900">
|
||||
<div class="flex flex-col space-y-1.5 p-6"></div>
|
||||
<div class="p-6 pt-0 space-y-2">
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">Name</label><input type="text" id="name" placeholder="Adam Wathan" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="username">Handle</label><input type="text" id="handle" placeholder="angelo.snr" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package forms
|
||||
|
||||
//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 RegisterCredentialForm() 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 class=\"border rounded-lg shadow-sm bg-card text-zinc-900\"><div class=\"flex flex-col space-y-1.5 p-6\"></div><div class=\"p-6 pt-0 space-y-2\"><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">Name</label><input type=\"text\" id=\"name\" placeholder=\"Adam Wathan\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"username\">Handle</label><input type=\"text\" id=\"handle\" placeholder=\"angelo.snr\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,11 +0,0 @@
|
||||
package forms
|
||||
|
||||
templ BasicDetailsForm() {
|
||||
<div class="border rounded-lg shadow-sm bg-card text-zinc-900">
|
||||
<div class="flex flex-col space-y-1.5 p-6"></div>
|
||||
<div class="p-6 pt-0 space-y-2">
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">Name</label><input type="text" id="name" placeholder="Adam Wathan" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="username">Handle</label><input type="text" id="handle" placeholder="angelo.snr" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package forms
|
||||
|
||||
//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 BasicDetailsForm() 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 class=\"border rounded-lg shadow-sm bg-card text-zinc-900\"><div class=\"flex flex-col space-y-1.5 p-6\"></div><div class=\"p-6 pt-0 space-y-2\"><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">Name</label><input type=\"text\" id=\"name\" placeholder=\"Adam Wathan\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"username\">Handle</label><input type=\"text\" id=\"handle\" placeholder=\"angelo.snr\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,21 +0,0 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/ui"
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/auth/forms"
|
||||
)
|
||||
|
||||
templ Modal(c echo.Context) {
|
||||
@styles.OpenModal("Account Registration", "Enter your account information below to create your account.") {
|
||||
@ui.Breadcrumbs()
|
||||
@forms.BasicDetailsForm()
|
||||
@styles.Spacer()
|
||||
<div class="flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2">
|
||||
<button @click="modalOpen=false" type="button" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2">Cancel</button>
|
||||
<button @click="modalOpen=false" type="button" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900">Next</button>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package auth
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/auth/forms"
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/ui"
|
||||
)
|
||||
|
||||
func Modal(c echo.Context) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Err = ui.Breadcrumbs().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 = forms.BasicDetailsForm().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 = styles.Spacer().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <div class=\"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2\"><button @click=\"modalOpen=false\" type=\"button\" class=\"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2\">Cancel</button> <button @click=\"modalOpen=false\" type=\"button\" class=\"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900\">Next</button></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
templ_7745c5c3_Err = styles.OpenModal("Account Registration", "Enter your account information below to create your account.").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,18 +0,0 @@
|
||||
package dash
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/home/sections"
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
)
|
||||
|
||||
templ View() {
|
||||
@styles.LayoutNoBody("Sonr.ID", true) {
|
||||
@sections.Header()
|
||||
@sections.Highlights()
|
||||
@sections.Features()
|
||||
@sections.Bento()
|
||||
@sections.Lowlights()
|
||||
@sections.CallToAction()
|
||||
@sections.Footer()
|
||||
}
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package dash
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/home/sections"
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
)
|
||||
|
||||
func View() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Err = sections.Header().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.Highlights().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.Features().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.Bento().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.Lowlights().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.CallToAction().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.Footer().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
templ_7745c5c3_Err = styles.LayoutNoBody("Sonr.ID", true).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,39 +0,0 @@
|
||||
package home
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/home/sections"
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
|
||||
var hero = models.Hero{
|
||||
TitleFirst: "Simplified",
|
||||
TitleEmphasis: "self-custody",
|
||||
TitleSecond: "for everyone",
|
||||
Subtitle: "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: &models.Button{Text: "Get Started", Href: "/register"},
|
||||
SecondaryButton: &models.Button{Text: "Learn More", Href: "/about"},
|
||||
Image: &models.Image{
|
||||
Src: "https://cdn.sonr.id/img/hero-clipped.svg",
|
||||
Width: "500",
|
||||
Height: "500",
|
||||
},
|
||||
Stats: []*models.Stat{
|
||||
{Value: "476K", Label: "Assets packed with power beyond your imagination."},
|
||||
{Value: "1.44K", Label: "Assets packed with power beyond your imagination."},
|
||||
{Value: "1.5M+", Label: "Assets packed with power beyond your imagination."},
|
||||
},
|
||||
}
|
||||
|
||||
templ View() {
|
||||
@styles.LayoutNoBody("Sonr.ID", true) {
|
||||
@sections.Header()
|
||||
@sections.SectionHero(&hero)
|
||||
@sections.Highlights()
|
||||
@sections.Features()
|
||||
@sections.Bento()
|
||||
@sections.Lowlights()
|
||||
@sections.CallToAction()
|
||||
@sections.Footer()
|
||||
}
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package home
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/home/sections"
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
|
||||
var hero = models.Hero{
|
||||
TitleFirst: "Simplified",
|
||||
TitleEmphasis: "self-custody",
|
||||
TitleSecond: "for everyone",
|
||||
Subtitle: "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: &models.Button{Text: "Get Started", Href: "/register"},
|
||||
SecondaryButton: &models.Button{Text: "Learn More", Href: "/about"},
|
||||
Image: &models.Image{
|
||||
Src: "https://cdn.sonr.id/img/hero-clipped.svg",
|
||||
Width: "500",
|
||||
Height: "500",
|
||||
},
|
||||
Stats: []*models.Stat{
|
||||
{Value: "476K", Label: "Assets packed with power beyond your imagination."},
|
||||
{Value: "1.44K", Label: "Assets packed with power beyond your imagination."},
|
||||
{Value: "1.5M+", Label: "Assets packed with power beyond your imagination."},
|
||||
},
|
||||
}
|
||||
|
||||
func View() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Err = sections.Header().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.SectionHero(&hero).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.Highlights().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.Features().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.Bento().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.Lowlights().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.CallToAction().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = sections.Footer().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
templ_7745c5c3_Err = styles.LayoutNoBody("Sonr.ID", true).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,197 +0,0 @@
|
||||
package sections
|
||||
|
||||
templ Bento() {
|
||||
<!-- Features #2 -->
|
||||
<section>
|
||||
<div class="py-12 md:py-20">
|
||||
<div class="max-w-5xl mx-auto px-4 sm:px-6">
|
||||
<div
|
||||
class="relative max-w-3xl mx-auto text-center pb-12 md:pb-20"
|
||||
>
|
||||
<h2
|
||||
class="font-inter-tight text-3xl md:text-4xl font-bold text-zinc-900 mb-4"
|
||||
>
|
||||
Onchain Security with Offchain Privacy
|
||||
</h2>
|
||||
<p class="text-lg text-zinc-500">
|
||||
Whenever you are ready, just hit publish to turn your site
|
||||
sketches into an actual designs. No creating, no skills, no
|
||||
reshaping.
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
class="max-w-xs mx-auto sm:max-w-none grid sm:grid-cols-2 md:grid-cols-3 gap-8 sm:gap-4 lg:gap-8"
|
||||
>
|
||||
<article
|
||||
class="sm:col-span-2 flex flex-col border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg"
|
||||
>
|
||||
<div class="grow flex flex-col p-5 pt-6">
|
||||
<div class="flex items-center space-x-3 mb-1">
|
||||
<svg
|
||||
class="inline-flex fill-zinc-400"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
>
|
||||
<path
|
||||
d="M17 9c.6 0 1 .4 1 1v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h6c.6 0 1 .4 1 1s-.4 1-1 1H4v12h12v-6c0-.6.4-1 1-1Zm-.7-6.7c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-8 8c-.2.2-.4.3-.7.3-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l8-8Z"
|
||||
></path>
|
||||
</svg>
|
||||
<h3 class="font-inter-tight font-semibold text-zinc-900">
|
||||
Decentralized Identity
|
||||
</h3>
|
||||
</div>
|
||||
<p class="grow max-w-md text-sm text-zinc-500">
|
||||
Create teams and organize your designs into folders using
|
||||
project specs and insights.
|
||||
</p>
|
||||
</div>
|
||||
<figure>
|
||||
<img
|
||||
class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto"
|
||||
src="./images/feature-post-01.png"
|
||||
width="721"
|
||||
height="280"
|
||||
alt="Feature Post 01"
|
||||
/>
|
||||
</figure>
|
||||
</article>
|
||||
<article
|
||||
class="flex flex-col border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg"
|
||||
>
|
||||
<div class="grow flex flex-col p-5 pt-6">
|
||||
<div class="flex items-center space-x-3 mb-1">
|
||||
<svg
|
||||
class="inline-flex fill-zinc-400"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
>
|
||||
<path
|
||||
d="m6.035 17.335-4-14c-.2-.8.5-1.5 1.3-1.3l14 4c.9.3 1 1.5.1 1.9l-6.6 2.9-2.8 6.6c-.5.9-1.7.8-2-.1Zm-1.5-12.8 2.7 9.5 1.9-4.4c.1-.2.3-.4.5-.5l4.4-1.9-9.5-2.7Z"
|
||||
></path>
|
||||
</svg>
|
||||
<h3 class="font-inter-tight font-semibold text-zinc-900">
|
||||
IPFS Vaults
|
||||
</h3>
|
||||
</div>
|
||||
<p class="grow max-w-md text-sm text-zinc-500">
|
||||
Generate images and explore new ways of presenting your
|
||||
designs with AI.
|
||||
</p>
|
||||
</div>
|
||||
<figure>
|
||||
<img
|
||||
class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto"
|
||||
src="./images/feature-post-02.png"
|
||||
width="342"
|
||||
height="280"
|
||||
alt="Feature Post 02"
|
||||
/>
|
||||
</figure>
|
||||
</article>
|
||||
<article
|
||||
class="flex flex-col border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg"
|
||||
>
|
||||
<div class="grow flex flex-col p-5 pt-6">
|
||||
<div class="flex items-center space-x-3 mb-1">
|
||||
<svg
|
||||
class="inline-flex fill-zinc-400"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
>
|
||||
<path
|
||||
d="M8.974 16c-.3 0-.7-.2-.9-.5l-2.2-3.7-2.1 2.8c-.3.4-1 .5-1.4.2-.4-.3-.5-1-.2-1.4l3-4c.2-.3.5-.4.9-.4.3 0 .6.2.8.5l2 3.3 3.3-8.1c0-.4.4-.7.8-.7s.8.2.9.6l4 8c.2.5 0 1.1-.4 1.3-.5.2-1.1 0-1.3-.4l-3-6-3.2 7.9c-.2.4-.6.6-1 .6Z"
|
||||
></path>
|
||||
</svg>
|
||||
<h3 class="font-inter-tight font-semibold text-zinc-900">
|
||||
Service Records
|
||||
</h3>
|
||||
</div>
|
||||
<p class="grow max-w-md text-sm text-zinc-500">
|
||||
Get your scenes inside your projects using simple embed
|
||||
code/snippets.
|
||||
</p>
|
||||
</div>
|
||||
<figure>
|
||||
<img
|
||||
class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto"
|
||||
src="./images/feature-post-03.png"
|
||||
width="342"
|
||||
height="280"
|
||||
alt="Feature Post 03"
|
||||
/>
|
||||
</figure>
|
||||
</article>
|
||||
<article
|
||||
class="flex flex-col border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg"
|
||||
>
|
||||
<div class="grow flex flex-col p-5 pt-6">
|
||||
<div class="flex items-center space-x-3 mb-1">
|
||||
<svg
|
||||
class="inline-flex fill-zinc-400"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
>
|
||||
<path
|
||||
d="M9.3 11.7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0ZM9.3 17.7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0ZM2.3 12.7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0Z"
|
||||
></path>
|
||||
</svg>
|
||||
<h3 class="font-inter-tight font-semibold text-zinc-900">
|
||||
Authentication & Authorization
|
||||
</h3>
|
||||
</div>
|
||||
<p class="grow max-w-md text-sm text-zinc-500">
|
||||
Easily make drag and drop interactions without coding.
|
||||
</p>
|
||||
</div>
|
||||
<figure>
|
||||
<img
|
||||
class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto"
|
||||
src="./images/feature-post-04.png"
|
||||
width="342"
|
||||
height="280"
|
||||
alt="Feature Post 04"
|
||||
/>
|
||||
</figure>
|
||||
</article>
|
||||
<article
|
||||
class="flex flex-col border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg"
|
||||
>
|
||||
<div class="grow flex flex-col p-5 pt-6">
|
||||
<div class="flex items-center space-x-3 mb-1">
|
||||
<svg
|
||||
class="inline-flex fill-zinc-400"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
>
|
||||
<path
|
||||
d="M16 2H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h8.667l3.733 2.8A1 1 0 0 0 18 17V4a2 2 0 0 0-2-2Zm0 13-2.4-1.8a1 1 0 0 0-.6-.2H4V4h12v11Z"
|
||||
></path>
|
||||
</svg>
|
||||
<h3 class="font-inter-tight font-semibold text-zinc-900">
|
||||
Decentralized Exchange
|
||||
</h3>
|
||||
</div>
|
||||
<p class="grow max-w-md text-sm text-zinc-500">
|
||||
Create tasks, projects, issues and more in just seconds.
|
||||
</p>
|
||||
</div>
|
||||
<figure>
|
||||
<img
|
||||
class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto"
|
||||
src="./images/feature-post-05.png"
|
||||
width="342"
|
||||
height="280"
|
||||
alt="Feature Post 05"
|
||||
/>
|
||||
</figure>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,71 +0,0 @@
|
||||
package sections
|
||||
|
||||
|
||||
templ CallToAction() {
|
||||
<section>
|
||||
<div class="py-12 md:py-20">
|
||||
<div class="max-w-5xl mx-auto px-4 sm:px-6">
|
||||
<div class="relative max-w-3xl mx-auto text-center pb-12 md:pb-16">
|
||||
<div class="inline-flex items-center justify-center w-20 h-20 bg-white rounded-xl shadow-md mb-8 relative before:absolute before:-top-12 before:w-52 before:h-52 before:bg-zinc-900 before:opacity-[.08] before:rounded-full before:blur-3xl before:-z-10">
|
||||
<a href="index.html">
|
||||
<img src="https://cdn.sonr.id/logo-zinc.svg" width="60" height="60" alt="Logo"/>
|
||||
</a>
|
||||
</div>
|
||||
<h2 class="font-inter-tight text-3xl md:text-4xl font-bold text-zinc-900 mb-4">
|
||||
Take control of your Identity
|
||||
<em class="relative not-italic inline-flex justify-center items-end">
|
||||
today
|
||||
<svg class="absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10" xmlns="http://www.w3.org/2000/svg" width="120" height="10" viewBox="0 0 120 10" aria-hidden="true" preserveAspectRatio="none">
|
||||
<path d="M118.273 6.09C79.243 4.558 40.297 5.459 1.305 9.034c-1.507.13-1.742-1.521-.199-1.81C39.81-.228 79.647-1.568 118.443 4.2c1.63.233 1.377 1.943-.17 1.89Z"></path>
|
||||
</svg>
|
||||
</em>
|
||||
</h2>
|
||||
<p class="text-lg text-zinc-500 mb-8">Sonr removes creative distances by connecting beginners, pros, and every team in between. Are you ready to start your journey?</p>
|
||||
<div class="max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4">
|
||||
<div>
|
||||
<a class="btn text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" href="request-demo.html">Register</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="btn text-zinc-600 bg-white hover:text-zinc-900 w-full shadow" href="#0">Log in</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Clients -->
|
||||
<div class="text-center">
|
||||
<ul class="inline-flex flex-wrap items-center justify-center -m-2 [mask-image:linear-gradient(to_right,transparent_8px,_theme(colors.white/.7)_64px,_theme(colors.white)_50%,_theme(colors.white/.7)_calc(100%-64px),_transparent_calc(100%-8px))]">
|
||||
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
|
||||
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Adobe">
|
||||
<path d="m21.966 31-1.69-4.231h-4.154l3.892-9.037L25.676 31h-3.71Zm-5.082-21H8v21l8.884-21ZM32 10h-8.884L32 31V10Z"></path>
|
||||
</svg>
|
||||
</li>
|
||||
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
|
||||
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Unsplash">
|
||||
<path d="M16.119 9h8.762v6.571h-8.762zM24.881 18.857H32V32H9V18.857h7.119v6.572h8.762z"></path>
|
||||
</svg>
|
||||
</li>
|
||||
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
|
||||
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Google">
|
||||
<path d="M8.407 26.488a13.458 13.458 0 0 1 0-11.98A13.48 13.48 0 0 1 29.63 10.57l-4.012 3.821a7.934 7.934 0 0 0-5.12-1.87 7.986 7.986 0 0 0-7.568 5.473 7.94 7.94 0 0 0-.408 2.504A7.94 7.94 0 0 0 12.93 23a7.986 7.986 0 0 0 7.567 5.472 8.577 8.577 0 0 0 4.566-1.127l4.489 3.459a13.415 13.415 0 0 1-9.055 3.19 13.512 13.512 0 0 1-12.09-7.507Zm25.036-8.444c.664 6.002-1.021 10.188-3.89 12.762l-4.488-3.46a6.581 6.581 0 0 0 2.795-3.78h-7.301v-5.522h12.884Z"></path>
|
||||
</svg>
|
||||
</li>
|
||||
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
|
||||
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="WordPress">
|
||||
<path d="M8.061 20.5c0-1.804.387-3.516 1.077-5.063l5.934 16.257c-4.15-2.016-7.01-6.271-7.01-11.194Zm20.836-.628c0 1.065-.41 2.3-.946 4.021L26.71 28.04l-4.496-13.371c.749-.04 1.424-.119 1.424-.119.67-.079.591-1.064-.08-1.025 0 0-2.014.158-3.315.158-1.222 0-3.276-.158-3.276-.158-.67-.039-.75.986-.079 1.025 0 0 .635.08 1.305.119l1.938 5.31-2.723 8.163-4.53-13.473c.75-.04 1.424-.119 1.424-.119.67-.079.591-1.064-.08-1.025 0 0-2.014.158-3.314.158-.234 0-.509-.005-.801-.015A12.425 12.425 0 0 1 20.5 8.061c3.238 0 6.187 1.238 8.4 3.266-.054-.004-.106-.01-.162-.01-1.221 0-2.088 1.064-2.088 2.207 0 1.025.591 1.893 1.221 2.918.474.828 1.026 1.892 1.026 3.43Zm-8.179 1.716 3.824 10.475c.025.061.056.118.089.171a12.434 12.434 0 0 1-7.645.198l3.732-10.844Zm10.697-7.056a12.378 12.378 0 0 1 1.524 5.968c0 4.589-2.487 8.595-6.185 10.751l3.799-10.985c.71-1.774.946-3.193.946-4.455 0-.458-.03-.883-.084-1.279ZM20.5 6C28.495 6 35 12.504 35 20.5 35 28.495 28.495 35 20.5 35S6 28.495 6 20.5C6 12.504 12.505 6 20.5 6Zm0 28.335c7.628 0 13.835-6.207 13.835-13.835 0-7.629-6.207-13.835-13.835-13.835-7.629 0-13.835 6.206-13.835 13.835 0 7.628 6.206 13.835 13.835 13.835Z"></path>
|
||||
</svg>
|
||||
</li>
|
||||
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
|
||||
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Windows">
|
||||
<path d="m8 11.408 9.808-1.335.004 9.46-9.803.056L8 11.41Zm9.803 9.215.008 9.47-9.803-1.348-.001-8.185 9.796.063Zm1.19-10.725L31.996 8v11.413l-13.005.103V9.898ZM32 20.712l-.003 11.362-13.005-1.835-.018-9.548L32 20.712Z"></path>
|
||||
</svg>
|
||||
</li>
|
||||
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
|
||||
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Pinterest">
|
||||
<path d="M19.482 6.455c-7.757 0-14.045 6.288-14.045 14.045 0 5.95 3.702 11.032 8.926 13.079-.123-1.112-.233-2.816.05-4.03.254-1.095 1.646-6.98 1.646-6.98s-.42-.842-.42-2.086c0-1.953 1.132-3.41 2.541-3.41 1.198 0 1.777.899 1.777 1.978 0 1.205-.767 3.006-1.163 4.676-.33 1.398.701 2.538 2.08 2.538 2.496 0 4.415-2.632 4.415-6.431 0-3.363-2.416-5.714-5.867-5.714-3.996 0-6.342 2.997-6.342 6.095 0 1.207.466 2.501 1.046 3.205a.42.42 0 0 1 .097.403c-.107.443-.343 1.397-.39 1.592-.061.258-.204.312-.47.188-1.754-.816-2.85-3.38-2.85-5.44 0-4.431 3.218-8.5 9.28-8.5 4.872 0 8.658 3.472 8.658 8.112 0 4.84-3.052 8.736-7.288 8.736-1.423 0-2.761-.74-3.22-1.613l-.874 3.339c-.317 1.22-1.173 2.749-1.746 3.682a14.04 14.04 0 0 0 4.159.626c7.757 0 14.045-6.288 14.045-14.045S27.238 6.455 19.482 6.455Z"></path>
|
||||
</svg>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,336 +0,0 @@
|
||||
package sections
|
||||
|
||||
|
||||
templ Features() {
|
||||
<!-- Features #3 -->
|
||||
<section
|
||||
class="relative bg-zinc-800 after:absolute after:top-0 after:right-0 after:h-full after:w-96 after:pointer-events-none after:bg-gradient-to-l after:from-zinc-800 max-lg:after:hidden"
|
||||
>
|
||||
<div class="py-12 md:py-20">
|
||||
<!-- Carousel -->
|
||||
<div class="max-w-xl lg:max-w-6xl mx-auto px-8 sm:px-6">
|
||||
<div
|
||||
class="lg:flex space-y-12 lg:space-y-0 lg:space-x-12 xl:space-x-24"
|
||||
x-data="{ tab: '1' }"
|
||||
>
|
||||
<!-- Content -->
|
||||
<div class="lg:max-w-none lg:min-w-[524px]">
|
||||
<div class="mb-8">
|
||||
<div
|
||||
class="inline-flex text-sm font-medium text-zinc-400 px-4 py-0.5 border border-transparent [background:linear-gradient(theme(colors.zinc.800),theme(colors.zinc.800))_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] rounded-full mb-4"
|
||||
>
|
||||
L1 Blockchain
|
||||
</div>
|
||||
<h3
|
||||
class="font-inter-tight text-3xl font-bold text-zinc-200 mb-4"
|
||||
>
|
||||
The Protocol for Decentralized Identity & Authentication
|
||||
</h3>
|
||||
<p class="text-lg text-zinc-500">
|
||||
We're creating the Global Standard for Decentralized Identity.
|
||||
Authenticate users with PassKeys, Issue Crypto Wallets, Build
|
||||
Payment flows, Send Encrypted Messages - all on a single platform.
|
||||
</p>
|
||||
</div>
|
||||
<!-- Tabs buttons -->
|
||||
<div class="mb-8 md:mb-0 space-y-2">
|
||||
<button
|
||||
:class="tab !== '1' ? '' : '[background:linear-gradient(#2E2E32,#2E2E32)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box]'"
|
||||
class="text-left flex items-center px-6 py-4 rounded border border-transparent"
|
||||
@click.prevent="tab = '1'"
|
||||
>
|
||||
<svg
|
||||
class="shrink-0 fill-zinc-400 mr-3"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
>
|
||||
<path
|
||||
d="m7.951 14.537 6.296-7.196 1.506 1.318-7.704 8.804-3.756-3.756 1.414-1.414 2.244 2.244Zm11.296-7.196 1.506 1.318-7.704 8.804-1.756-1.756 1.414-1.414.244.244 6.296-7.196Z"
|
||||
></path>
|
||||
</svg>
|
||||
<div>
|
||||
<div
|
||||
class="font-inter-tight text-lg font-semibold text-zinc-200 mb-1"
|
||||
>
|
||||
Make designs feel real
|
||||
</div>
|
||||
<div class="text-zinc-500">
|
||||
Save time and keep things consistent with reusable
|
||||
images, and 3D assets in shared libraries.
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button
|
||||
:class="tab !== '2' ? '' : '[background:linear-gradient(#2E2E32,#2E2E32)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box]'"
|
||||
class="text-left flex items-center px-6 py-4 rounded border border-transparent"
|
||||
@click.prevent="tab = '2'"
|
||||
>
|
||||
<svg
|
||||
class="shrink-0 fill-zinc-400 mr-3"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
>
|
||||
<path
|
||||
d="m16.997 19.056-1.78-.912A13.91 13.91 0 0 0 16.75 11.8c0-2.206-.526-4.38-1.533-6.344l1.78-.912A15.91 15.91 0 0 1 18.75 11.8c0 2.524-.602 5.01-1.753 7.256Zm-3.616-1.701-1.77-.93A9.944 9.944 0 0 0 12.75 11.8c0-1.611-.39-3.199-1.14-4.625l1.771-.93c.9 1.714 1.37 3.62 1.369 5.555 0 1.935-.47 3.841-1.369 5.555Zm-3.626-1.693-1.75-.968c.49-.885.746-1.881.745-2.895a5.97 5.97 0 0 0-.745-2.893l1.75-.968a7.968 7.968 0 0 1 .995 3.861 7.97 7.97 0 0 1-.995 3.863Zm-3.673-1.65-1.664-1.11c.217-.325.333-.709.332-1.103 0-.392-.115-.776-.332-1.102L6.082 9.59c.437.655.67 1.425.668 2.21a3.981 3.981 0 0 1-.668 2.212Z"
|
||||
></path>
|
||||
</svg>
|
||||
<div>
|
||||
<div
|
||||
class="font-inter-tight text-lg font-semibold text-zinc-200 mb-1"
|
||||
>
|
||||
Bring creatives closer
|
||||
</div>
|
||||
<div class="text-zinc-500">
|
||||
Save time and keep things consistent with reusable
|
||||
images, and 3D assets in shared libraries.
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button
|
||||
:class="tab !== '3' ? '' : '[background:linear-gradient(#2E2E32,#2E2E32)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box]'"
|
||||
class="text-left flex items-center px-6 py-4 rounded border border-transparent"
|
||||
@click.prevent="tab = '3'"
|
||||
>
|
||||
<svg
|
||||
class="shrink-0 fill-zinc-400 mr-3"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
>
|
||||
<path
|
||||
d="m11.293 5.293 1.414 1.414-8 8-1.414-1.414 8-8Zm7-1 1.414 1.414-8 8-1.414-1.414 8-8Zm0 6 1.414 1.414-8 8-1.414-1.414 8-8Z"
|
||||
></path>
|
||||
</svg>
|
||||
<div>
|
||||
<div
|
||||
class="font-inter-tight text-lg font-semibold text-zinc-200 mb-1"
|
||||
>
|
||||
Scale and align your design team
|
||||
</div>
|
||||
<div class="text-zinc-500">
|
||||
Save time and keep things consistent with reusable
|
||||
images, and 3D assets in shared libraries.
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Tabs items -->
|
||||
<div class="relative lg:max-w-none">
|
||||
<div class="relative flex flex-col">
|
||||
<!-- Item 1 -->
|
||||
<div
|
||||
class="w-full"
|
||||
x-show="tab === '1'"
|
||||
x-transition:enter="transition ease-in-out duration-700 transform order-first"
|
||||
x-transition:enter-start="opacity-0 translate-x-8"
|
||||
x-transition:enter-end="opacity-100 translate-x-0"
|
||||
x-transition:leave="transition ease-in-out duration-300 transform absolute"
|
||||
x-transition:leave-start="opacity-100 translate-x-0"
|
||||
x-transition:leave-end="opacity-0 -translate-x-8"
|
||||
>
|
||||
<div>
|
||||
<img
|
||||
class="lg:max-w-none mx-auto rounded-lg shadow-2xl"
|
||||
src="./images/carousel-illustration-01.jpg"
|
||||
width="800"
|
||||
height="620"
|
||||
alt="Carousel 01"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item 2 -->
|
||||
<div
|
||||
class="w-full"
|
||||
x-show="tab === '2'"
|
||||
x-transition:enter="transition ease-in-out duration-700 transform order-first"
|
||||
x-transition:enter-start="opacity-0 translate-x-8"
|
||||
x-transition:enter-end="opacity-100 translate-x-0"
|
||||
x-transition:leave="transition ease-in-out duration-300 transform absolute"
|
||||
x-transition:leave-start="opacity-100 translate-x-0"
|
||||
x-transition:leave-end="opacity-0 -translate-x-8"
|
||||
>
|
||||
<div>
|
||||
<img
|
||||
class="lg:max-w-none mx-auto rounded-lg shadow-2xl"
|
||||
src="./images/carousel-illustration-01.jpg"
|
||||
width="800"
|
||||
height="620"
|
||||
alt="Carousel 02"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item 3 -->
|
||||
<div
|
||||
class="w-full"
|
||||
x-show="tab === '3'"
|
||||
x-transition:enter="transition ease-in-out duration-700 transform order-first"
|
||||
x-transition:enter-start="opacity-0 translate-x-8"
|
||||
x-transition:enter-end="opacity-100 translate-x-0"
|
||||
x-transition:leave="transition ease-in-out duration-300 transform absolute"
|
||||
x-transition:leave-start="opacity-100 translate-x-0"
|
||||
x-transition:leave-end="opacity-0 -translate-x-8"
|
||||
>
|
||||
<div>
|
||||
<img
|
||||
class="lg:max-w-none mx-auto rounded-lg shadow-2xl"
|
||||
src="./images/carousel-illustration-01.jpg"
|
||||
width="800"
|
||||
height="620"
|
||||
alt="Carousel 03"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Gear illustration -->
|
||||
<img
|
||||
class="absolute left-0 bottom-0 -translate-x-1/2 translate-y-1/3 mix-blend-exclusion max-lg:w-32"
|
||||
src="https://cdn.sonr.id/img/secure-vault.svg"
|
||||
alt="Features 02 illustration"
|
||||
width="224"
|
||||
height="224"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@featuresBlocks()
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
|
||||
templ featuresBlocks() {
|
||||
<div class="max-w-6xl mx-auto px-4 sm:px-6 mt-24 lg:mt-32">
|
||||
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-8 lg:gap-16">
|
||||
<!-- Block #1 -->
|
||||
<div>
|
||||
<div class="flex items-center mb-1">
|
||||
<svg
|
||||
class="fill-zinc-400 mr-2"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
>
|
||||
<path
|
||||
d="M15 9a1 1 0 0 1 0 2c-.441 0-1.243.92-1.89 1.716.319 1.005.529 1.284.89 1.284a1 1 0 0 1 0 2 2.524 2.524 0 0 1-2.339-1.545A3.841 3.841 0 0 1 9 16a1 1 0 0 1 0-2c.441 0 1.243-.92 1.89-1.716C10.57 11.279 10.361 11 10 11a1 1 0 0 1 0-2 2.524 2.524 0 0 1 2.339 1.545A3.841 3.841 0 0 1 15 9Zm-5-1H7.51l-.02.142C6.964 11.825 6.367 16 3 16a3 3 0 0 1-3-3 1 1 0 0 1 2 0 1 1 0 0 0 1 1c1.49 0 1.984-2.48 2.49-6H3a1 1 0 1 1 0-2h2.793c.52-3.1 1.4-6 4.207-6a3 3 0 0 1 3 3 1 1 0 0 1-2 0 1 1 0 0 0-1-1C8.808 2 8.257 3.579 7.825 6H10a1 1 0 0 1 0 2Z"
|
||||
></path>
|
||||
</svg>
|
||||
<h3 class="font-inter-tight font-semibold text-zinc-200">
|
||||
Multi-party Computation
|
||||
</h3>
|
||||
</div>
|
||||
<p class="text-sm text-zinc-500">
|
||||
Eliminate the need for seed-phrases, and browser extensions for crypto wallets.
|
||||
</p>
|
||||
</div>
|
||||
<!-- Block #2 -->
|
||||
<div>
|
||||
<div class="flex items-center mb-1">
|
||||
<svg
|
||||
class="fill-zinc-400 mr-2"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
>
|
||||
<path
|
||||
d="M13 16c-.153 0-.306-.035-.447-.105l-3.851-1.926c-.231.02-.465.031-.702.031-4.411 0-8-3.14-8-7s3.589-7 8-7 8 3.14 8 7c0 1.723-.707 3.351-2 4.63V15a1.003 1.003 0 0 1-1 1Zm-4.108-4.054c.155 0 .308.036.447.105L12 13.382v-2.187c0-.288.125-.562.341-.752C13.411 9.506 14 8.284 14 7c0-2.757-2.691-5-6-5S2 4.243 2 7s2.691 5 6 5c.266 0 .526-.02.783-.048a1.01 1.01 0 0 1 .109-.006Z"
|
||||
></path>
|
||||
</svg>
|
||||
<h3 class="font-inter-tight font-semibold text-zinc-200">
|
||||
Matrix Protocol
|
||||
</h3>
|
||||
</div>
|
||||
<p class="text-sm text-zinc-500">
|
||||
End-to-end encrypted messaging with <a class="text-zinc-500 hover:text-zinc-300 transition" href="https://sonr.chat">sonr.chat</a>.
|
||||
</p>
|
||||
</div>
|
||||
<!-- Block #3 -->
|
||||
<div>
|
||||
<div class="flex items-center mb-1">
|
||||
<svg
|
||||
class="fill-zinc-400 mr-2"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="14"
|
||||
height="16"
|
||||
>
|
||||
<path
|
||||
d="M13 0H1C.4 0 0 .4 0 1v14c0 .6.4 1 1 1h8l5-5V1c0-.6-.4-1-1-1ZM2 2h10v8H8v4H2V2Z"
|
||||
></path>
|
||||
</svg>
|
||||
<h3 class="font-inter-tight font-semibold text-zinc-200">
|
||||
OpenID Connect
|
||||
</h3>
|
||||
</div>
|
||||
<p class="text-sm text-zinc-500">
|
||||
Seamless integration with Web2 Applications with the OpenID Standard.
|
||||
</p>
|
||||
</div>
|
||||
<!-- Block #4 -->
|
||||
<div>
|
||||
<div class="flex items-center mb-1">
|
||||
<svg
|
||||
class="fill-zinc-400 mr-2"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
>
|
||||
<path
|
||||
d="M7 14c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7ZM7 2C4.243 2 2 4.243 2 7s2.243 5 5 5 5-2.243 5-5-2.243-5-5-5Zm8.707 12.293a.999.999 0 1 1-1.414 1.414L11.9 13.314a8.019 8.019 0 0 0 1.414-1.414l2.393 2.393Z"
|
||||
></path>
|
||||
</svg>
|
||||
<h3 class="font-inter-tight font-semibold text-zinc-200">
|
||||
Native ETH & BTC
|
||||
</h3>
|
||||
</div>
|
||||
<p class="text-sm text-zinc-500">
|
||||
Keep workflows efficient with tools that give teams
|
||||
visibility throughout the process.
|
||||
</p>
|
||||
</div>
|
||||
<!-- Block #5 -->
|
||||
<div>
|
||||
<div class="flex items-center mb-1">
|
||||
<svg
|
||||
class="fill-zinc-400 mr-2"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
>
|
||||
<path
|
||||
d="M14.6.085 8 2.885 1.4.085c-.5-.2-1.4-.1-1.4.9v11c0 .4.2.8.6.9l7 3c.3.1.5.1.8 0l7-3c.4-.2.6-.5.6-.9v-11c0-1-.9-1.1-1.4-.9ZM2 2.485l5 2.1v8.8l-5-2.1v-8.8Zm12 8.8-5 2.1v-8.7l5-2.1v8.7Z"
|
||||
></path>
|
||||
</svg>
|
||||
<h3 class="font-inter-tight font-semibold text-zinc-200">
|
||||
Developer Integrations
|
||||
</h3>
|
||||
</div>
|
||||
<p class="text-sm text-zinc-500">
|
||||
Quickly integrate with Sonr by leveraging modern web APIs.
|
||||
</p>
|
||||
</div>
|
||||
<!-- Block #6 -->
|
||||
<div>
|
||||
<div class="flex items-center mb-1">
|
||||
<svg
|
||||
class="fill-zinc-400 mr-2"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="14"
|
||||
height="16"
|
||||
>
|
||||
<path
|
||||
d="M13 14a1 1 0 0 1 0 2H1a1 1 0 0 1 0-2h12Zm-6.707-2.293-5-5a1 1 0 0 1 1.414-1.414L6 8.586V1a1 1 0 1 1 2 0v7.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-5 5a1 1 0 0 1-1.414 0Z"
|
||||
></path>
|
||||
</svg>
|
||||
<h3 class="font-inter-tight font-semibold text-zinc-200">
|
||||
Secure Backups
|
||||
</h3>
|
||||
</div>
|
||||
<p class="text-sm text-zinc-500">
|
||||
Uniformly accessible user keyshare access on/off network.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,78 +0,0 @@
|
||||
package sections
|
||||
|
||||
templ Footer() {
|
||||
<!-- Site footer -->
|
||||
<footer>
|
||||
<div class="max-w-5xl mx-auto px-4 sm:px-6">
|
||||
<!-- Top area: Blocks -->
|
||||
<div class="grid sm:grid-cols-12 gap-8 py-8 md:py-12 border-t border-zinc-200">
|
||||
<!-- 1st block -->
|
||||
<div class="sm:col-span-6 md:col-span-3 lg:col-span-6 max-sm:order-1 flex flex-col">
|
||||
<div class="mb-4">
|
||||
<!-- Logo -->
|
||||
<a class="flex items-center justify-center bg-white w-8 h-8 rounded shadow-sm shadow-zinc-950/20" href="/">
|
||||
<img src="https://cdn.sonr.id/logo-zinc.svg" width="24" height="24" alt="Logo"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="grow text-sm text-zinc-500">© diDAO DUNA. All rights reserved.</div>
|
||||
<!-- Social links -->
|
||||
<ul class="flex space-x-4 mt-4 mb-1">
|
||||
<li>
|
||||
<a class="flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition" href="#0" aria-label="Twitter">
|
||||
<svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="20" height="20">
|
||||
<path d="m7.063 3 3.495 4.475L14.601 3h2.454l-5.359 5.931L18 17h-4.938l-3.866-4.893L4.771 17H2.316l5.735-6.342L2 3h5.063Zm-.74 1.347H4.866l8.875 11.232h1.36L6.323 4.347Z"></path>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition" href="#0" aria-label="Medium">
|
||||
<svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="20" height="20">
|
||||
<path d="M17 2H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1Zm-1.708 3.791-.858.823a.251.251 0 0 0-.1.241V12.9a.251.251 0 0 0 .1.241l.838.823v.181h-4.215v-.181l.868-.843c.085-.085.085-.11.085-.241V7.993L9.6 14.124h-.329l-2.81-6.13V12.1a.567.567 0 0 0 .156.472l1.129 1.37v.181h-3.2v-.181l1.129-1.37a.547.547 0 0 0 .146-.472V7.351A.416.416 0 0 0 5.683 7l-1-1.209V5.61H7.8l2.4 5.283 2.122-5.283h2.971l-.001.181Z"></path>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition" href="#0" aria-label="Telegram">
|
||||
<svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="20" height="20">
|
||||
<path d="M17.968 3.276a.338.338 0 0 0-.232-.253 1.192 1.192 0 0 0-.63.045S3.087 8.106 2.286 8.664c-.172.121-.23.19-.259.272-.138.4.293.573.293.573l3.613 1.177a.388.388 0 0 0 .183-.011c.822-.519 8.27-5.222 8.7-5.38.068-.02.118 0 .1.049-.172.6-6.606 6.319-6.64 6.354a.138.138 0 0 0-.05.118l-.337 3.528s-.142 1.1.956 0a30.66 30.66 0 0 1 1.9-1.738c1.242.858 2.58 1.806 3.156 2.3a1 1 0 0 0 .732.283.825.825 0 0 0 .7-.622S17.894 5.292 17.98 3.909c.008-.135.021-.217.021-.317a1.177 1.177 0 0 0-.032-.316Z"></path>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 2nd block -->
|
||||
<div class="sm:col-span-6 md:col-span-3 lg:col-span-2"></div>
|
||||
<!-- 3rd block -->
|
||||
<div class="sm:col-span-6 md:col-span-3 lg:col-span-2">
|
||||
<h6 class="text-sm text-zinc-800 font-medium mb-2">Resources</h6>
|
||||
<ul class="text-sm space-y-2">
|
||||
<li>
|
||||
<a class="text-zinc-500 hover:text-zinc-900 transition" href="#0">Community</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="text-zinc-500 hover:text-zinc-900 transition" href="#0">Documentation</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="text-zinc-500 hover:text-zinc-900 transition" href="#0">Privacy policy</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 4th block -->
|
||||
<div class="sm:col-span-6 md:col-span-3 lg:col-span-2">
|
||||
<h6 class="text-sm text-zinc-800 font-medium mb-2">Legals</h6>
|
||||
<ul class="text-sm space-y-2">
|
||||
<li>
|
||||
<a class="text-zinc-500 hover:text-zinc-900 transition" href="#0">About the DAO</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="text-zinc-500 hover:text-zinc-900 transition" href="#0">Privacy policy</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="text-zinc-500 hover:text-zinc-900 transition" href="https://brandfetch.io/sonr.io">Brand Kit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package sections
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func Footer() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Site footer --><footer><div class=\"max-w-5xl mx-auto px-4 sm:px-6\"><!-- Top area: Blocks --><div class=\"grid sm:grid-cols-12 gap-8 py-8 md:py-12 border-t border-zinc-200\"><!-- 1st block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-6 max-sm:order-1 flex flex-col\"><div class=\"mb-4\"><!-- Logo --><a class=\"flex items-center justify-center bg-white w-8 h-8 rounded shadow-sm shadow-zinc-950/20\" href=\"/\"><img src=\"https://cdn.sonr.id/logo-zinc.svg\" width=\"24\" height=\"24\" alt=\"Logo\"></a></div><div class=\"grow text-sm text-zinc-500\">© diDAO DUNA. All rights reserved.</div><!-- Social links --><ul class=\"flex space-x-4 mt-4 mb-1\"><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Twitter\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"m7.063 3 3.495 4.475L14.601 3h2.454l-5.359 5.931L18 17h-4.938l-3.866-4.893L4.771 17H2.316l5.735-6.342L2 3h5.063Zm-.74 1.347H4.866l8.875 11.232h1.36L6.323 4.347Z\"></path></svg></a></li><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Medium\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M17 2H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1Zm-1.708 3.791-.858.823a.251.251 0 0 0-.1.241V12.9a.251.251 0 0 0 .1.241l.838.823v.181h-4.215v-.181l.868-.843c.085-.085.085-.11.085-.241V7.993L9.6 14.124h-.329l-2.81-6.13V12.1a.567.567 0 0 0 .156.472l1.129 1.37v.181h-3.2v-.181l1.129-1.37a.547.547 0 0 0 .146-.472V7.351A.416.416 0 0 0 5.683 7l-1-1.209V5.61H7.8l2.4 5.283 2.122-5.283h2.971l-.001.181Z\"></path></svg></a></li><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Telegram\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M17.968 3.276a.338.338 0 0 0-.232-.253 1.192 1.192 0 0 0-.63.045S3.087 8.106 2.286 8.664c-.172.121-.23.19-.259.272-.138.4.293.573.293.573l3.613 1.177a.388.388 0 0 0 .183-.011c.822-.519 8.27-5.222 8.7-5.38.068-.02.118 0 .1.049-.172.6-6.606 6.319-6.64 6.354a.138.138 0 0 0-.05.118l-.337 3.528s-.142 1.1.956 0a30.66 30.66 0 0 1 1.9-1.738c1.242.858 2.58 1.806 3.156 2.3a1 1 0 0 0 .732.283.825.825 0 0 0 .7-.622S17.894 5.292 17.98 3.909c.008-.135.021-.217.021-.317a1.177 1.177 0 0 0-.032-.316Z\"></path></svg></a></li></ul></div><!-- 2nd block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"></div><!-- 3rd block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Resources</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Community</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Documentation</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Privacy policy</a></li></ul></div><!-- 4th block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Legals</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">About the DAO</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Privacy policy</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"https://brandfetch.io/sonr.io\">Brand Kit</a></li></ul></div></div></div></footer>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,32 +0,0 @@
|
||||
package sections
|
||||
|
||||
templ Header() {
|
||||
<!-- 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-zinc-800 border-zinc-600 border-1 w-8 h-8 rounded shadow-sm shadow-zinc-950/20" href="/">
|
||||
<img src="https://cdn.sonr.id/logo-ivory.svg" width="20" height="20" 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>
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package sections
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func Header() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Site 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-zinc-800 border-zinc-600 border-1 w-8 h-8 rounded shadow-sm shadow-zinc-950/20\" href=\"/\"><img src=\"https://cdn.sonr.id/logo-ivory.svg\" width=\"20\" height=\"20\" 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 {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,133 +0,0 @@
|
||||
package sections
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/ui"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
|
||||
templ SectionHero(hero *models.Hero) {
|
||||
<!-- Hero -->
|
||||
<section class="relative before:absolute before:inset-0 before:h-80 before:pointer-events-none before:bg-gradient-to-b before:from-zinc-100 before:-z-10">
|
||||
<div class="pt-32 pb-12 md:pt-40 md:pb-20">
|
||||
<!-- Section content -->
|
||||
<div class="px-4 sm:px-6">
|
||||
<div class="max-w-3xl mx-auto">
|
||||
<div class="text-center pb-12 md:pb-16">
|
||||
<h1 class="font-inter-tight text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-zinc-500 via-zinc-900 to-zinc-900 pb-4">
|
||||
{ hero.TitleFirst }
|
||||
<em class="italic relative inline-flex justify-center items-center text-zinc-900">
|
||||
{ hero.TitleEmphasis }
|
||||
<svg class="absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10" xmlns="http://www.w3.org/2000/svg" width="223" height="62" viewBox="0 0 223 62" aria-hidden="true" preserveAspectRatio="none">
|
||||
<path d="M45.654 53.62c17.666 3.154 35.622 4.512 53.558 4.837 17.94.288 35.91-.468 53.702-2.54 8.89-1.062 17.742-2.442 26.455-4.352 8.684-1.945 17.338-4.3 25.303-7.905 3.94-1.81 7.79-3.962 10.634-6.777 1.38-1.41 2.424-2.994 2.758-4.561.358-1.563-.078-3.143-1.046-4.677-.986-1.524-2.43-2.96-4.114-4.175a37.926 37.926 0 0 0-5.422-3.32c-3.84-1.977-7.958-3.563-12.156-4.933-8.42-2.707-17.148-4.653-25.95-6.145-8.802-1.52-17.702-2.56-26.622-3.333-17.852-1.49-35.826-1.776-53.739-.978-8.953.433-17.898 1.125-26.79 2.22-8.887 1.095-17.738 2.541-26.428 4.616-4.342 1.037-8.648 2.226-12.853 3.676-4.197 1.455-8.314 3.16-12.104 5.363-1.862 1.13-3.706 2.333-5.218 3.829-1.52 1.47-2.79 3.193-3.285 5.113-.528 1.912-.127 3.965.951 5.743 1.07 1.785 2.632 3.335 4.348 4.68 2.135 1.652 3.2 2.672 2.986 3.083-.18.362-1.674.114-4.08-1.638-1.863-1.387-3.63-3.014-4.95-5.09C.94 35.316.424 34.148.171 32.89c-.275-1.253-.198-2.579.069-3.822.588-2.515 2.098-4.582 3.76-6.276 1.673-1.724 3.612-3.053 5.57-4.303 3.96-2.426 8.177-4.278 12.457-5.868 4.287-1.584 8.654-2.89 13.054-4.036 8.801-2.292 17.74-3.925 26.716-5.19C70.777 2.131 79.805 1.286 88.846.723c18.087-1.065 36.236-.974 54.325.397 9.041.717 18.07 1.714 27.042 3.225 8.972 1.485 17.895 3.444 26.649 6.253 4.37 1.426 8.697 3.083 12.878 5.243a42.11 42.11 0 0 1 6.094 3.762c1.954 1.44 3.823 3.2 5.283 5.485a12.515 12.515 0 0 1 1.63 3.88c.164.706.184 1.463.253 2.193-.063.73-.094 1.485-.247 2.195-.652 2.886-2.325 5.141-4.09 6.934-3.635 3.533-7.853 5.751-12.083 7.688-8.519 3.778-17.394 6.09-26.296 7.998-8.917 1.86-17.913 3.152-26.928 4.104-18.039 1.851-36.17 2.295-54.239 1.622-18.062-.713-36.112-2.535-53.824-6.23-5.941-1.31-5.217-2.91.361-1.852"></path>
|
||||
</svg>
|
||||
</em>
|
||||
{ hero.TitleSecond }
|
||||
</h1>
|
||||
<p class="text-lg text-zinc-500 mb-8">
|
||||
{ hero.Subtitle }
|
||||
</p>
|
||||
<div class="max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4">
|
||||
@ui.PrimaryButton("/register", "Get Started")
|
||||
@ui.SecondaryButton("/about", "Learn More")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@heroImage(hero)
|
||||
@stats()
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
|
||||
templ heroImage(hero *models.Hero) {
|
||||
<!-- Image -->
|
||||
<div class="max-w-5xl motion-preset-slide-up mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white">
|
||||
<img
|
||||
class="rounded-lg "
|
||||
src={ hero.Image.Src }
|
||||
width={ hero.Image.Width }
|
||||
height={ hero.Image.Height }
|
||||
alt="Hero"
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ stats() {
|
||||
<!-- Stats -->
|
||||
<div class="max-w-4xl mx-auto px-4 sm:px-6 justify-center items-center">
|
||||
<div class="max-w-sm mx-auto grid gap-12 sm:grid-cols-2 md:grid-cols-4 md:-mx-5 md:gap-0 items-end md:max-w-none">
|
||||
<!-- 1st item -->
|
||||
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
|
||||
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data="counter(476)" x-text="counterValue">0</span>K</h4>
|
||||
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
||||
</div>
|
||||
<!-- 2nd item -->
|
||||
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
|
||||
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data="counter(1.44)" x-text="counterValue">0</span>K</h4>
|
||||
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
||||
</div>
|
||||
<!-- 3rd item -->
|
||||
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
|
||||
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data="counter(1.5)" x-text="counterValue">0</span>M+</h4>
|
||||
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
||||
</div>
|
||||
<!-- 4th item -->
|
||||
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
|
||||
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data="counter(750)" x-text="counterValue">0</span>K</h4>
|
||||
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
||||
</div>
|
||||
</div>
|
||||
@counterAnimation()
|
||||
</div>
|
||||
}
|
||||
|
||||
script counterAnimation() {
|
||||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.data('counter', (target = 0, duration = 3000) => ({
|
||||
startTimestamp: null,
|
||||
step: null,
|
||||
rawValue: 0,
|
||||
counterValue: 0,
|
||||
target: target,
|
||||
precision: (target % 1 === 0) ? 0 : (target.toString().split('.')[1] || []).length,
|
||||
animationRequestId: null,
|
||||
animationCompleted: false,
|
||||
observer: null,
|
||||
init() {
|
||||
// Intersection observer to watch visibility
|
||||
this.observer = new IntersectionObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
// Check if element is in view
|
||||
if (entry.isIntersecting && !this.animationCompleted) {
|
||||
this.startAnimation()
|
||||
}
|
||||
})
|
||||
})
|
||||
this.observer.observe(this.$el)
|
||||
},
|
||||
startAnimation() {
|
||||
this.step = (timestamp) => {
|
||||
if (!this.startTimestamp) this.startTimestamp = timestamp
|
||||
const progress = Math.min((timestamp - this.startTimestamp) / duration, 1)
|
||||
const easedProgress = this.easeOut(progress)
|
||||
this.rawValue = parseFloat((easedProgress * this.target).toFixed(this.precision))
|
||||
this.counterValue = this.rawValue.toFixed(this.precision)
|
||||
if (progress < 1) {
|
||||
this.animationRequestId = window.requestAnimationFrame(this.step)
|
||||
} else {
|
||||
this.animationCompleted = true
|
||||
}
|
||||
}
|
||||
this.animationRequestId = window.requestAnimationFrame(this.step);
|
||||
},
|
||||
easeOut(t) {
|
||||
return 1 - Math.pow(1 - t, 5)
|
||||
},
|
||||
destroy() {
|
||||
// Detach the handler, avoiding memory and side-effect leakage
|
||||
this.animationRequestId && window.cancelAnimationFrame(this.step)
|
||||
this.observer && this.observer.disconnect()
|
||||
},
|
||||
}))
|
||||
})
|
||||
}
|
||||
@@ -1,283 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package sections
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/ui"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
|
||||
func SectionHero(hero *models.Hero) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Hero --><section class=\"relative before:absolute before:inset-0 before:h-80 before:pointer-events-none before:bg-gradient-to-b before:from-zinc-100 before:-z-10\"><div class=\"pt-32 pb-12 md:pt-40 md:pb-20\"><!-- Section content --><div class=\"px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto\"><div class=\"text-center pb-12 md:pb-16\"><h1 class=\"font-inter-tight text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-zinc-500 via-zinc-900 to-zinc-900 pb-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleFirst)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 17, Col: 24}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <em class=\"italic relative inline-flex justify-center items-center text-zinc-900\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleEmphasis)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 19, Col: 28}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <svg class=\"absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10\" xmlns=\"http://www.w3.org/2000/svg\" width=\"223\" height=\"62\" viewBox=\"0 0 223 62\" aria-hidden=\"true\" preserveAspectRatio=\"none\"><path d=\"M45.654 53.62c17.666 3.154 35.622 4.512 53.558 4.837 17.94.288 35.91-.468 53.702-2.54 8.89-1.062 17.742-2.442 26.455-4.352 8.684-1.945 17.338-4.3 25.303-7.905 3.94-1.81 7.79-3.962 10.634-6.777 1.38-1.41 2.424-2.994 2.758-4.561.358-1.563-.078-3.143-1.046-4.677-.986-1.524-2.43-2.96-4.114-4.175a37.926 37.926 0 0 0-5.422-3.32c-3.84-1.977-7.958-3.563-12.156-4.933-8.42-2.707-17.148-4.653-25.95-6.145-8.802-1.52-17.702-2.56-26.622-3.333-17.852-1.49-35.826-1.776-53.739-.978-8.953.433-17.898 1.125-26.79 2.22-8.887 1.095-17.738 2.541-26.428 4.616-4.342 1.037-8.648 2.226-12.853 3.676-4.197 1.455-8.314 3.16-12.104 5.363-1.862 1.13-3.706 2.333-5.218 3.829-1.52 1.47-2.79 3.193-3.285 5.113-.528 1.912-.127 3.965.951 5.743 1.07 1.785 2.632 3.335 4.348 4.68 2.135 1.652 3.2 2.672 2.986 3.083-.18.362-1.674.114-4.08-1.638-1.863-1.387-3.63-3.014-4.95-5.09C.94 35.316.424 34.148.171 32.89c-.275-1.253-.198-2.579.069-3.822.588-2.515 2.098-4.582 3.76-6.276 1.673-1.724 3.612-3.053 5.57-4.303 3.96-2.426 8.177-4.278 12.457-5.868 4.287-1.584 8.654-2.89 13.054-4.036 8.801-2.292 17.74-3.925 26.716-5.19C70.777 2.131 79.805 1.286 88.846.723c18.087-1.065 36.236-.974 54.325.397 9.041.717 18.07 1.714 27.042 3.225 8.972 1.485 17.895 3.444 26.649 6.253 4.37 1.426 8.697 3.083 12.878 5.243a42.11 42.11 0 0 1 6.094 3.762c1.954 1.44 3.823 3.2 5.283 5.485a12.515 12.515 0 0 1 1.63 3.88c.164.706.184 1.463.253 2.193-.063.73-.094 1.485-.247 2.195-.652 2.886-2.325 5.141-4.09 6.934-3.635 3.533-7.853 5.751-12.083 7.688-8.519 3.778-17.394 6.09-26.296 7.998-8.917 1.86-17.913 3.152-26.928 4.104-18.039 1.851-36.17 2.295-54.239 1.622-18.062-.713-36.112-2.535-53.824-6.23-5.941-1.31-5.217-2.91.361-1.852\"></path></svg></em> ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleSecond)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 24, Col: 25}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1><p class=\"text-lg text-zinc-500 mb-8\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Subtitle)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 27, Col: 22}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><div class=\"max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ui.PrimaryButton("/register", "Get Started").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ui.SecondaryButton("/about", "Learn More").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = heroImage(hero).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = stats().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></section>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func heroImage(hero *models.Hero) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var6 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var6 == nil {
|
||||
templ_7745c5c3_Var6 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Image --><div class=\"max-w-5xl motion-preset-slide-up mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white\"><img class=\"rounded-lg \" src=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Src)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 47, Col: 23}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" width=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Width)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 48, Col: 27}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" height=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Height)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 49, Col: 29}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" alt=\"Hero\"></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func stats() 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_Var10 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var10 == nil {
|
||||
templ_7745c5c3_Var10 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Stats --><div class=\"max-w-4xl mx-auto px-4 sm:px-6 justify-center items-center\"><div class=\"max-w-sm mx-auto grid gap-12 sm:grid-cols-2 md:grid-cols-4 md:-mx-5 md:gap-0 items-end md:max-w-none\"><!-- 1st item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(476)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 2nd item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(1.44)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 3rd item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(1.5)\" x-text=\"counterValue\">0</span>M+</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 4th item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(750)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = counterAnimation().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func counterAnimation() templ.ComponentScript {
|
||||
return templ.ComponentScript{
|
||||
Name: `__templ_counterAnimation_524d`,
|
||||
Function: `function __templ_counterAnimation_524d(){document.addEventListener('alpine:init', () => {
|
||||
Alpine.data('counter', (target = 0, duration = 3000) => ({
|
||||
startTimestamp: null,
|
||||
step: null,
|
||||
rawValue: 0,
|
||||
counterValue: 0,
|
||||
target: target,
|
||||
precision: (target % 1 === 0) ? 0 : (target.toString().split('.')[1] || []).length,
|
||||
animationRequestId: null,
|
||||
animationCompleted: false,
|
||||
observer: null,
|
||||
init() {
|
||||
// Intersection observer to watch visibility
|
||||
this.observer = new IntersectionObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
// Check if element is in view
|
||||
if (entry.isIntersecting && !this.animationCompleted) {
|
||||
this.startAnimation()
|
||||
}
|
||||
})
|
||||
})
|
||||
this.observer.observe(this.$el)
|
||||
},
|
||||
startAnimation() {
|
||||
this.step = (timestamp) => {
|
||||
if (!this.startTimestamp) this.startTimestamp = timestamp
|
||||
const progress = Math.min((timestamp - this.startTimestamp) / duration, 1)
|
||||
const easedProgress = this.easeOut(progress)
|
||||
this.rawValue = parseFloat((easedProgress * this.target).toFixed(this.precision))
|
||||
this.counterValue = this.rawValue.toFixed(this.precision)
|
||||
if (progress < 1) {
|
||||
this.animationRequestId = window.requestAnimationFrame(this.step)
|
||||
} else {
|
||||
this.animationCompleted = true
|
||||
}
|
||||
}
|
||||
this.animationRequestId = window.requestAnimationFrame(this.step);
|
||||
},
|
||||
easeOut(t) {
|
||||
return 1 - Math.pow(1 - t, 5)
|
||||
},
|
||||
destroy() {
|
||||
// Detach the handler, avoiding memory and side-effect leakage
|
||||
this.animationRequestId && window.cancelAnimationFrame(this.step)
|
||||
this.observer && this.observer.disconnect()
|
||||
},
|
||||
}))
|
||||
})
|
||||
}`,
|
||||
Call: templ.SafeScript(`__templ_counterAnimation_524d`),
|
||||
CallInline: templ.SafeScriptInline(`__templ_counterAnimation_524d`),
|
||||
}
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,218 +0,0 @@
|
||||
package sections
|
||||
|
||||
templ Highlights() {
|
||||
<!-- Features -->
|
||||
<section class="relative bg-zinc-50">
|
||||
<div class="py-12 md:py-20">
|
||||
<div class="max-w-5xl mx-auto px-4 sm:px-6">
|
||||
<div class="max-w-3xl mx-auto text-center pb-12">
|
||||
<h2
|
||||
class="font-inter-tight text-3xl md:text-4xl font-bold text-zinc-900 mb-4"
|
||||
>
|
||||
The Internet Rebuilt for You
|
||||
</h2>
|
||||
<p class="text-lg text-zinc-500">
|
||||
Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while
|
||||
providing Developers a cost-effective solution for decentralized authentication.
|
||||
</p>
|
||||
</div>
|
||||
<div x-data="{ tab: '1' }">
|
||||
<!-- Tabs buttons -->
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6">
|
||||
<button
|
||||
:class="tab !== '1' ? 'bg-zinc-100 opacity-60 hover:opacity-100 transition' : '[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] shadow-sm rotate-1'"
|
||||
class="text-left px-4 py-5 border border-transparent rounded"
|
||||
@click.prevent="tab = '1'"
|
||||
>
|
||||
<div class="flex items-center justify-between mb-1">
|
||||
<div class="font-inter-tight font-semibold text-zinc-900">
|
||||
Experience
|
||||
</div>
|
||||
<svg
|
||||
:class="tab !== '1' ? 'hidden' : ''"
|
||||
class="fill-zinc-400 shrink-0 ml-2"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="10"
|
||||
height="10"
|
||||
>
|
||||
<path
|
||||
d="M8.667.186H2.675a.999.999 0 0 0 0 1.998h3.581L.971 7.469a.999.999 0 1 0 1.412 1.412l5.285-5.285v3.58a.999.999 0 1 0 1.998 0V1.186a.999.999 0 0 0-.999-.999Z"
|
||||
></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="text-sm text-zinc-500">
|
||||
Sonr is completely designed to be frictionless for every kind of user.
|
||||
</div>
|
||||
</button>
|
||||
<button
|
||||
:class="tab !== '2' ? 'bg-zinc-100 opacity-60 hover:opacity-100 transition' : '[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] shadow-sm rotate-1'"
|
||||
class="text-left px-4 py-5 border border-transparent rounded"
|
||||
@click.prevent="tab = '2'"
|
||||
>
|
||||
<div class="flex items-center justify-between mb-1">
|
||||
<div class="font-inter-tight font-semibold text-zinc-900">
|
||||
Compliance
|
||||
</div>
|
||||
<svg
|
||||
:class="tab !== '2' ? 'hidden' : ''"
|
||||
class="fill-zinc-400 shrink-0 ml-2"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="10"
|
||||
height="10"
|
||||
>
|
||||
<path
|
||||
d="M8.667.186H2.675a.999.999 0 0 0 0 1.998h3.581L.971 7.469a.999.999 0 1 0 1.412 1.412l5.285-5.285v3.58a.999.999 0 1 0 1.998 0V1.186a.999.999 0 0 0-.999-.999Z"
|
||||
></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="text-sm text-zinc-500">
|
||||
Sonr is managed by a USA-based Wyoming DUNA, which is fully compliant with the GDPR.
|
||||
</div>
|
||||
</button>
|
||||
<button
|
||||
:class="tab !== '3' ? 'bg-zinc-100 opacity-60 hover:opacity-100 transition' : '[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] shadow-sm rotate-1'"
|
||||
class="text-left px-4 py-5 border border-transparent rounded"
|
||||
@click.prevent="tab = '3'"
|
||||
>
|
||||
<div class="flex items-center justify-between mb-1">
|
||||
<div class="font-inter-tight font-semibold text-zinc-900">
|
||||
Interoperability
|
||||
</div>
|
||||
<svg
|
||||
:class="tab !== '3' ? 'hidden' : ''"
|
||||
class="fill-zinc-400 shrink-0 ml-2"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="10"
|
||||
height="10"
|
||||
>
|
||||
<path
|
||||
d="M8.667.186H2.675a.999.999 0 0 0 0 1.998h3.581L.971 7.469a.999.999 0 1 0 1.412 1.412l5.285-5.285v3.58a.999.999 0 1 0 1.998 0V1.186a.999.999 0 0 0-.999-.999Z"
|
||||
></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="text-sm text-zinc-500">
|
||||
Sonr is designed to work cross-platform, cross-network, and cross-chain.
|
||||
</div>
|
||||
</button>
|
||||
<button
|
||||
:class="tab !== '4' ? 'bg-zinc-100 opacity-60 hover:opacity-100 transition' : '[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] shadow-sm rotate-1'"
|
||||
class="text-left px-4 py-5 border border-transparent rounded"
|
||||
@click.prevent="tab = '4'"
|
||||
>
|
||||
<div class="flex items-center justify-between mb-1">
|
||||
<div class="font-inter-tight font-semibold text-zinc-900">
|
||||
Security
|
||||
</div>
|
||||
<svg
|
||||
:class="tab !== '4' ? 'hidden' : ''"
|
||||
class="fill-zinc-400 shrink-0 ml-2"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="10"
|
||||
height="10"
|
||||
>
|
||||
<path
|
||||
d="M8.667.186H2.675a.999.999 0 0 0 0 1.998h3.581L.971 7.469a.999.999 0 1 0 1.412 1.412l5.285-5.285v3.58a.999.999 0 1 0 1.998 0V1.186a.999.999 0 0 0-.999-.999Z"
|
||||
></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="text-sm text-zinc-500">
|
||||
Sonr eliminates 99.9% of attack vectors with its quantum-resistant encryption.
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<!-- Tabs items -->
|
||||
<div
|
||||
class="relative lg:max-w-none [mask-image:linear-gradient(white_0%,white_calc(100%-40px),_transparent_calc(100%-1px))] -mx-6"
|
||||
>
|
||||
<div class="relative flex flex-col pt-12 md:pt-20 mx-6">
|
||||
<!-- Item 1 -->
|
||||
<div
|
||||
class="w-full text-center"
|
||||
x-show="tab === '1'"
|
||||
x-transition:enter="transition ease-in-out duration-700 transform order-first"
|
||||
x-transition:enter-start="opacity-0 -translate-y-4"
|
||||
x-transition:enter-end="opacity-100 translate-y-0"
|
||||
x-transition:leave="transition ease-in-out duration-300 transform absolute"
|
||||
x-transition:leave-start="opacity-100 translate-y-0"
|
||||
x-transition:leave-end="opacity-0 translate-y-4"
|
||||
>
|
||||
<div class="inline-flex relative align-top">
|
||||
<img
|
||||
class="rounded-t-lg 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] box-content shadow-2xl"
|
||||
src="./images/feature-01.png"
|
||||
width="600"
|
||||
height="360"
|
||||
alt="Feature 01"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item 2 -->
|
||||
<div
|
||||
class="w-full text-center"
|
||||
x-show="tab === '2'"
|
||||
x-transition:enter="transition ease-in-out duration-700 transform order-first"
|
||||
x-transition:enter-start="opacity-0 -translate-y-4"
|
||||
x-transition:enter-end="opacity-100 translate-y-0"
|
||||
x-transition:leave="transition ease-in-out duration-300 transform absolute"
|
||||
x-transition:leave-start="opacity-100 translate-y-0"
|
||||
x-transition:leave-end="opacity-0 translate-y-4"
|
||||
>
|
||||
<div class="inline-flex relative align-top">
|
||||
<img
|
||||
class="rounded-t-lg 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] box-content shadow-2xl"
|
||||
src="./images/feature-01.png"
|
||||
width="600"
|
||||
height="360"
|
||||
alt="Feature 02"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item 3 -->
|
||||
<div
|
||||
class="w-full text-center"
|
||||
x-show="tab === '3'"
|
||||
x-transition:enter="transition ease-in-out duration-700 transform order-first"
|
||||
x-transition:enter-start="opacity-0 -translate-y-4"
|
||||
x-transition:enter-end="opacity-100 translate-y-0"
|
||||
x-transition:leave="transition ease-in-out duration-300 transform absolute"
|
||||
x-transition:leave-start="opacity-100 translate-y-0"
|
||||
x-transition:leave-end="opacity-0 translate-y-4"
|
||||
>
|
||||
<div class="inline-flex relative align-top">
|
||||
<img
|
||||
class="rounded-t-lg 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] box-content shadow-2xl"
|
||||
src="./images/feature-01.png"
|
||||
width="600"
|
||||
height="360"
|
||||
alt="Feature 03"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item 4 -->
|
||||
<div
|
||||
class="w-full text-center"
|
||||
x-show="tab === '4'"
|
||||
x-transition:enter="transition ease-in-out duration-700 transform order-first"
|
||||
x-transition:enter-start="opacity-0 -translate-y-4"
|
||||
x-transition:enter-end="opacity-100 translate-y-0"
|
||||
x-transition:leave="transition ease-in-out duration-300 transform absolute"
|
||||
x-transition:leave-start="opacity-100 translate-y-0"
|
||||
x-transition:leave-end="opacity-0 translate-y-4"
|
||||
>
|
||||
<div class="inline-flex relative align-top">
|
||||
<img
|
||||
class="rounded-t-lg 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] box-content shadow-2xl"
|
||||
src="./images/feature-01.png"
|
||||
width="600"
|
||||
height="360"
|
||||
alt="Feature 04"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,161 +0,0 @@
|
||||
package sections
|
||||
|
||||
templ Lowlights() {
|
||||
<section class="bg-zinc-800">
|
||||
<div class="py-12 md:py-20">
|
||||
<div class="max-w-5xl mx-auto px-4 sm:px-6">
|
||||
<div class="max-w-3xl mx-auto text-center pb-12 md:pb-20">
|
||||
<h2 class="font-inter-tight text-3xl md:text-4xl font-bold text-zinc-200">The Fragmentation Problem in the Existing Web is seeping into Crypto</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="max-w-[94rem] mx-auto space-y-6">
|
||||
<!-- Row #1 -->
|
||||
<div
|
||||
x-data="{}"
|
||||
x-init="$nextTick(() => {
|
||||
let ul = $refs.testimonials;
|
||||
ul.insertAdjacentHTML('afterend', ul.outerHTML);
|
||||
ul.nextSibling.setAttribute('aria-hidden', 'true');
|
||||
})"
|
||||
class="w-full inline-flex flex-nowrap overflow-hidden [mask-image:_linear-gradient(to_right,transparent_0,_black_28%,_black_calc(100%-28%),transparent_100%)] group"
|
||||
>
|
||||
<div x-ref="testimonials" class="flex items-start justify-center md:justify-start [&>div]:mx-3 animate-infinite-scroll group-hover:[animation-play-state:paused]">
|
||||
<!-- Item #1 -->
|
||||
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
|
||||
<div class="flex items-center mb-4">
|
||||
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-01.jpg" width="44" height="44" alt="Testimonial 01"/>
|
||||
<div>
|
||||
<div class="font-inter-tight font-bold text-zinc-200">Lina James</div>
|
||||
<div>
|
||||
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">linaj87</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
|
||||
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item #2 -->
|
||||
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
|
||||
<div class="flex items-center mb-4">
|
||||
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-02.jpg" width="44" height="44" alt="Testimonial 02"/>
|
||||
<div>
|
||||
<div class="font-inter-tight font-bold text-zinc-200">Sarah Mendes</div>
|
||||
<div>
|
||||
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">saramendes</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
|
||||
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item #3 -->
|
||||
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
|
||||
<div class="flex items-center mb-4">
|
||||
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-03.jpg" width="44" height="44" alt="Testimonial 03"/>
|
||||
<div>
|
||||
<div class="font-inter-tight font-bold text-zinc-200">Michał Rutt</div>
|
||||
<div>
|
||||
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">michrutt</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
|
||||
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item #4 -->
|
||||
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
|
||||
<div class="flex items-center mb-4">
|
||||
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-04.jpg" width="44" height="44" alt="Testimonial 04"/>
|
||||
<div>
|
||||
<div class="font-inter-tight font-bold text-zinc-200">Mary Kahl</div>
|
||||
<div>
|
||||
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">marykahl</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
|
||||
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Row #2 -->
|
||||
<div
|
||||
x-data="{}"
|
||||
x-init="$nextTick(() => {
|
||||
let ul = $refs.testimonials;
|
||||
ul.insertAdjacentHTML('afterend', ul.outerHTML);
|
||||
ul.nextSibling.setAttribute('aria-hidden', 'true');
|
||||
})"
|
||||
class="w-full inline-flex flex-nowrap overflow-hidden [mask-image:_linear-gradient(to_right,transparent_0,_black_28%,_black_calc(100%-28%),transparent_100%)] group"
|
||||
>
|
||||
<div x-ref="testimonials" class="flex items-start justify-center md:justify-start [&>div]:mx-3 animate-infinite-scroll-inverse group-hover:[animation-play-state:paused] [animation-delay:-7.5s]">
|
||||
<!-- Item #5 -->
|
||||
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
|
||||
<div class="flex items-center mb-4">
|
||||
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-05.jpg" width="44" height="44" alt="Testimonial 05"/>
|
||||
<div>
|
||||
<div class="font-inter-tight font-bold text-zinc-200">Katy Dragán</div>
|
||||
<div>
|
||||
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">katyd</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
|
||||
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item #6 -->
|
||||
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
|
||||
<div class="flex items-center mb-4">
|
||||
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-06.jpg" width="44" height="44" alt="Testimonial 06"/>
|
||||
<div>
|
||||
<div class="font-inter-tight font-bold text-zinc-200">Karl Ahmed</div>
|
||||
<div>
|
||||
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">karl87</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
|
||||
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item #7 -->
|
||||
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
|
||||
<div class="flex items-center mb-4">
|
||||
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-07.jpg" width="44" height="44" alt="Testimonial 07"/>
|
||||
<div>
|
||||
<div class="font-inter-tight font-bold text-zinc-200">Carlotta Grech</div>
|
||||
<div>
|
||||
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">carlagrech</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
|
||||
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item #8 -->
|
||||
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
|
||||
<div class="flex items-center mb-4">
|
||||
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-08.jpg" width="44" height="44" alt="Testimonial 08"/>
|
||||
<div>
|
||||
<div class="font-inter-tight font-bold text-zinc-200">Alejandra Gok</div>
|
||||
<div>
|
||||
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">alejandraIT</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
|
||||
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,96 +0,0 @@
|
||||
package state
|
||||
|
||||
func UseNavigatorCredentials() {
|
||||
templ.NewOnceHandle().Once()
|
||||
}
|
||||
|
||||
templ NavigatorCredentialsCreate() {
|
||||
<script>
|
||||
function createCredential() {
|
||||
navigator.credentials.create({
|
||||
publicKey: {
|
||||
rp: {
|
||||
name: "Sonr",
|
||||
},
|
||||
user: {
|
||||
id: new Uint8Array(0),
|
||||
name: "Sonr",
|
||||
displayName: "Sonr",
|
||||
},
|
||||
challenge: new Uint8Array(0),
|
||||
pubKeyCredParams: [{
|
||||
type: "public-key",
|
||||
alg: -7,
|
||||
}],
|
||||
timeout: 60000,
|
||||
excludeCredentials: [],
|
||||
authenticatorSelection: {
|
||||
requireResidentKey: false,
|
||||
userVerification: "discouraged",
|
||||
},
|
||||
},
|
||||
})
|
||||
.then((assertion) => {
|
||||
console.log("Assertion:", assertion);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error:", error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
templ NavigatorCredentialsGet() {
|
||||
<script>
|
||||
function getCredential() {
|
||||
navigator.credentials.get({
|
||||
publicKey: {
|
||||
challenge: new Uint8Array(0),
|
||||
allowCredentials: [],
|
||||
timeout: 60000,
|
||||
userVerification: "discouraged",
|
||||
},
|
||||
})
|
||||
.then((assertion) => {
|
||||
console.log("Assertion:", assertion);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error:", error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
templ NavigatorCredentialsGetAll() {
|
||||
<script>
|
||||
navigator.credentials.getAll({
|
||||
publicKey: {
|
||||
challenge: new Uint8Array(0),
|
||||
allowCredentials: [],
|
||||
timeout: 60000,
|
||||
userVerification: "discouraged",
|
||||
extensions: {
|
||||
|
||||
}
|
||||
},
|
||||
})
|
||||
.then((assertion) => {
|
||||
console.log("Assertion:", assertion);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error:", error);
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
templ NavigatorCredentialsHasPasskey() {
|
||||
<script>
|
||||
navigator.credentials.has()
|
||||
.then((has) => {
|
||||
console.log("Has Passkey:", has);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error:", error);
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package state
|
||||
|
||||
//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 UseNavigatorCredentials() {
|
||||
templ.NewOnceHandle().Once()
|
||||
}
|
||||
|
||||
func NavigatorCredentialsCreate() 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("<script>\n\tfunction createCredential() {\n\t\tnavigator.credentials.create({\n\t\t\tpublicKey: {\n\t\t\t\trp: {\n\t\t\t\t\tname: \"Sonr\",\n\t\t\t\t},\n\t\t\t\tuser: {\n\t\t\t\t\tid: new Uint8Array(0),\n\t\t\t\t\tname: \"Sonr\",\n\t\t\t\t\tdisplayName: \"Sonr\",\n\t\t\t\t},\n\t\t\t\tchallenge: new Uint8Array(0),\n\t\t\t\tpubKeyCredParams: [{\n\t\t\t\t\ttype: \"public-key\",\n\t\t\t\t\talg: -7,\n\t\t\t\t}],\n\t\t\t\ttimeout: 60000,\n\t\t\t\texcludeCredentials: [],\n\t\t\t\tauthenticatorSelection: {\n\t\t\t\t\trequireResidentKey: false,\n\t\t\t\t\tuserVerification: \"discouraged\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\t\t.then((assertion) => {\n\t\t\t\tconsole.log(\"Assertion:\", assertion);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.error(\"Error:\", error);\n\t\t\t});\n\t\t}\n\t</script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func NavigatorCredentialsGet() 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("<script>\n\t\tfunction getCredential() {\n\t\tnavigator.credentials.get({\n\t\t\tpublicKey: {\n\t\t\t\tchallenge: new Uint8Array(0),\n\t\t\t\tallowCredentials: [],\n\t\t\t\ttimeout: 60000,\n\t\t\t\tuserVerification: \"discouraged\",\n\t\t\t},\n\t\t})\n\t\t\t.then((assertion) => {\n\t\t\t\tconsole.log(\"Assertion:\", assertion);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.error(\"Error:\", error);\n\t\t\t});\n\t}\n\t</script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func NavigatorCredentialsGetAll() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var3 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var3 == nil {
|
||||
templ_7745c5c3_Var3 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script>\n\t\tnavigator.credentials.getAll({\n\t\t\tpublicKey: {\n\t\t\t\tchallenge: new Uint8Array(0),\n\t\t\t\tallowCredentials: [],\n\t\t\t\ttimeout: 60000,\n\t\t\t\tuserVerification: \"discouraged\",\n\t\t\t\textensions: {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t},\n\t\t})\n\t\t\t.then((assertion) => {\n\t\t\t\tconsole.log(\"Assertion:\", assertion);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.error(\"Error:\", error);\n\t\t\t});\n\t</script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func NavigatorCredentialsHasPasskey() 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_Var4 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var4 == nil {
|
||||
templ_7745c5c3_Var4 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script>\n\t\tnavigator.credentials.has()\n\t\t\t.then((has) => {\n\t\t\t\tconsole.log(\"Has Passkey:\", has);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.error(\"Error:\", error);\n\t\t\t});\n\t</script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,17 +0,0 @@
|
||||
package state
|
||||
|
||||
templ InsertAccount(accountName string) {
|
||||
<script>
|
||||
const accountId = await motr.insertAccount({
|
||||
name: accountName,
|
||||
address: "0x1234567890123456789012345678901234567890",
|
||||
publicKey: "sample_public_key",
|
||||
chainCode: "SONR",
|
||||
index: 0,
|
||||
controller: "sample_controller",
|
||||
createdAt: new Date(),
|
||||
});
|
||||
|
||||
console.log("Inserted account with ID:", accountId);
|
||||
</script>
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package state
|
||||
|
||||
//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 InsertAccount(accountName 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)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script>\n\t\tconst accountId = await motr.insertAccount({\n\t\t\tname: accountName,\n\t\t\taddress: \"0x1234567890123456789012345678901234567890\",\n\t\t\tpublicKey: \"sample_public_key\",\n\t\t\tchainCode: \"SONR\",\n\t\t\tindex: 0,\n\t\t\tcontroller: \"sample_controller\",\n\t\t\tcreatedAt: new Date(),\n\t\t});\n\n\t\tconsole.log(\"Inserted account with ID:\", accountId);\n\t</script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,24 +0,0 @@
|
||||
package state
|
||||
|
||||
var (
|
||||
serviceWorkerHandle = templ.NewOnceHandle()
|
||||
)
|
||||
|
||||
templ RegisterServiceWorker() {
|
||||
@serviceWorkerHandle.Once() {
|
||||
<script>
|
||||
if ("serviceWorker" in navigator) {
|
||||
window.addEventListener("load", function() {
|
||||
navigator.serviceWorker
|
||||
.register("/sw.js")
|
||||
.then(function (registration) {
|
||||
console.log("Service Worker registered with scope:", registration.scope);
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log("Service Worker registration failed:", error);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package state
|
||||
|
||||
//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"
|
||||
|
||||
var (
|
||||
serviceWorkerHandle = templ.NewOnceHandle()
|
||||
)
|
||||
|
||||
func RegisterServiceWorker() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script>\n if (\"serviceWorker\" in navigator) {\n window.addEventListener(\"load\", function() {\n navigator.serviceWorker\n .register(\"/sw.js\")\n .then(function (registration) {\n console.log(\"Service Worker registered with scope:\", registration.scope);\n })\n .catch(function (error) {\n console.log(\"Service Worker registration failed:\", error);\n });\n });\n }\n </script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
templ_7745c5c3_Err = serviceWorkerHandle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,178 +0,0 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Inter+Tight:ital,wght@0,500;0,600;0,700;1,700&display=fallback");
|
||||
|
||||
/* src/css/styles.css */
|
||||
@import "tailwindcss/base";
|
||||
@import "tailwindcss/components";
|
||||
@import "tailwindcss/utilities";
|
||||
|
||||
/* See Alpine.js: https://github.com/alpinejs/alpine#x-cloak */
|
||||
[x-cloak=""] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Custom styles */
|
||||
.form-input:focus,
|
||||
.form-textarea:focus,
|
||||
.form-multiselect:focus,
|
||||
.form-select:focus,
|
||||
.form-checkbox:focus,
|
||||
.form-radio:focus {
|
||||
@apply ring-0;
|
||||
}
|
||||
|
||||
/* Hamburger button */
|
||||
.hamburger svg > *:nth-child(1),
|
||||
.hamburger svg > *:nth-child(2),
|
||||
.hamburger svg > *:nth-child(3) {
|
||||
transform-origin: center;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.hamburger svg > *:nth-child(1) {
|
||||
transition:
|
||||
y 0.1s 0.25s ease-in,
|
||||
transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19),
|
||||
opacity 0.1s ease-in;
|
||||
}
|
||||
|
||||
.hamburger svg > *:nth-child(2) {
|
||||
transition: transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
||||
}
|
||||
|
||||
.hamburger svg > *:nth-child(3) {
|
||||
transition:
|
||||
y 0.1s 0.25s ease-in,
|
||||
transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19),
|
||||
width 0.1s 0.25s ease-in;
|
||||
}
|
||||
|
||||
.hamburger.active svg > *:nth-child(1) {
|
||||
opacity: 0;
|
||||
y: 11;
|
||||
transform: rotate(225deg);
|
||||
transition:
|
||||
y 0.1s ease-out,
|
||||
transform 0.22s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1),
|
||||
opacity 0.1s 0.12s ease-out;
|
||||
}
|
||||
|
||||
.hamburger.active svg > *:nth-child(2) {
|
||||
transform: rotate(225deg);
|
||||
transition: transform 0.22s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
}
|
||||
|
||||
.hamburger.active svg > *:nth-child(3) {
|
||||
y: 11;
|
||||
transform: rotate(135deg);
|
||||
transition:
|
||||
y 0.1s ease-out,
|
||||
transform 0.22s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1),
|
||||
width 0.1s ease-out;
|
||||
}
|
||||
|
||||
/* Typography */
|
||||
.h1 {
|
||||
@apply text-5xl font-bold;
|
||||
}
|
||||
|
||||
.h2 {
|
||||
@apply text-4xl font-bold;
|
||||
}
|
||||
|
||||
.h3 {
|
||||
@apply text-3xl font-bold;
|
||||
}
|
||||
|
||||
.h4 {
|
||||
@apply text-2xl font-bold;
|
||||
}
|
||||
|
||||
@screen md {
|
||||
.h1 {
|
||||
@apply text-6xl;
|
||||
}
|
||||
|
||||
.h2 {
|
||||
@apply text-5xl;
|
||||
}
|
||||
|
||||
.h3 {
|
||||
@apply text-4xl;
|
||||
}
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn,
|
||||
.btn-sm {
|
||||
@apply text-sm font-medium inline-flex items-center justify-center border border-transparent rounded-md tracking-normal transition;
|
||||
}
|
||||
|
||||
.btn {
|
||||
@apply px-4 py-2;
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
@apply px-2 py-1;
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
input[type="search"]::-webkit-search-decoration,
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-results-button,
|
||||
input[type="search"]::-webkit-search-results-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.form-input,
|
||||
.form-textarea,
|
||||
.form-multiselect,
|
||||
.form-select,
|
||||
.form-checkbox,
|
||||
.form-radio {
|
||||
@apply bg-white border border-zinc-200 focus:border-zinc-400 shadow shadow-black/5;
|
||||
}
|
||||
|
||||
.form-input,
|
||||
.form-textarea,
|
||||
.form-multiselect,
|
||||
.form-select,
|
||||
.form-checkbox {
|
||||
@apply rounded;
|
||||
}
|
||||
|
||||
.form-input,
|
||||
.form-textarea,
|
||||
.form-multiselect,
|
||||
.form-select {
|
||||
@apply text-zinc-600 text-sm px-4 py-2;
|
||||
}
|
||||
|
||||
.form-input,
|
||||
.form-textarea {
|
||||
@apply placeholder-zinc-400;
|
||||
}
|
||||
|
||||
.form-select {
|
||||
@apply pr-10;
|
||||
}
|
||||
|
||||
.form-checkbox,
|
||||
.form-radio {
|
||||
@apply text-zinc-800;
|
||||
}
|
||||
|
||||
.form-checkbox {
|
||||
@apply rounded-sm;
|
||||
}
|
||||
|
||||
/* Chrome, Safari and Opera */
|
||||
.no-scrollbar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.no-scrollbar {
|
||||
-ms-overflow-style: none;
|
||||
/* IE and Edge */
|
||||
scrollbar-width: none;
|
||||
/* Firefox */
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
package styles
|
||||
|
||||
import "strings"
|
||||
|
||||
type Icon interface {
|
||||
Render() templ.Component
|
||||
}
|
||||
|
||||
type Variant interface {
|
||||
Attributes() templ.Attributes
|
||||
}
|
||||
|
||||
templ Spacer() {
|
||||
<br/>
|
||||
}
|
||||
|
||||
templ Rows() {
|
||||
<div class="flex flex-row w-full gap-2 md:gap-4">
|
||||
{ children... }
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Columns() {
|
||||
<div class="flex flex-col h-full w-full gap-3 md:gap-6 md:flex-row">
|
||||
{ children... }
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Layout(title string, remote bool) {
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@Styles()
|
||||
@Htmx()
|
||||
@Alpine()
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>{ title }</title>
|
||||
<!-- Sets the status bar style to transparent -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
||||
<link rel="icon" type="image/png" href="https://cdn.sonr.id/favicon.png"/>
|
||||
</head>
|
||||
<body class="flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4">
|
||||
<main class="flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3">
|
||||
{ children... }
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
}
|
||||
|
||||
templ LayoutNoBody(title string, remote bool) {
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@Styles()
|
||||
@Htmx()
|
||||
@Alpine()
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>{ title }</title>
|
||||
<link rel="icon" type="image/png" href="https://cdn.sonr.id/favicon.png"/>
|
||||
<!-- Sets the status bar style to transparent -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
||||
</head>
|
||||
<main class="grow">
|
||||
<body class="font-inter antialiased bg-white text-zinc-900 tracking-tight">
|
||||
<div class="flex flex-col min-h-screen overflow-hidden supports-[overflow:clip]:overflow-clip">
|
||||
{ children... }
|
||||
</div>
|
||||
</body>
|
||||
</main>
|
||||
</html>
|
||||
}
|
||||
|
||||
templ OpenModal(title, description string) {
|
||||
<div
|
||||
x-data="{ modalOpen: true }"
|
||||
@keydown.escape="modalOpen=false"
|
||||
:class="{ 'z-40': 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-90 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">{ title }</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>{ description }</p>
|
||||
</div>
|
||||
{ children... }
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
}
|
||||
|
||||
func clsxMerge(variants ...Variant) templ.Attributes {
|
||||
combinedAttrs := templ.Attributes{}
|
||||
var classElements []string
|
||||
|
||||
for _, variant := range variants {
|
||||
attrs := variant.Attributes()
|
||||
if class, ok := attrs["class"].(string); ok {
|
||||
classElements = append(classElements, strings.Fields(class)...)
|
||||
}
|
||||
for key, value := range attrs {
|
||||
if key != "class" {
|
||||
combinedAttrs[key] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(classElements) > 0 {
|
||||
combinedAttrs["class"] = strings.Join(classElements, " ")
|
||||
}
|
||||
return combinedAttrs
|
||||
}
|
||||
|
||||
func clsxBuilder(classes ...string) templ.Attributes {
|
||||
if len(classes) == 0 {
|
||||
return templ.Attributes{}
|
||||
}
|
||||
class := strings.Join(classes, " ")
|
||||
return templ.Attributes{
|
||||
"class": class,
|
||||
}
|
||||
}
|
||||
@@ -1,351 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package styles
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import "strings"
|
||||
|
||||
type Icon interface {
|
||||
Render() templ.Component
|
||||
}
|
||||
|
||||
type Variant interface {
|
||||
Attributes() templ.Attributes
|
||||
}
|
||||
|
||||
func Spacer() 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("<br>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Rows() 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-row w-full gap-2 md:gap-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ_7745c5c3_Var2.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Columns() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var3 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var3 == nil {
|
||||
templ_7745c5c3_Var3 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col h-full w-full gap-3 md:gap-6 md:flex-row\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ_7745c5c3_Var3.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Layout(title string, remote bool) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var4 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var4 == nil {
|
||||
templ_7745c5c3_Var4 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = Styles().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = Htmx().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = Alpine().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<meta charset=\"UTF-8\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/layout.templ`, Line: 39, Col: 17}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><!-- Sets the status bar style to transparent --><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"><link rel=\"icon\" type=\"image/png\" href=\"https://cdn.sonr.id/favicon.png\"></head><body class=\"flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4\"><main class=\"flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ_7745c5c3_Var4.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</main></body></html>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func LayoutNoBody(title string, remote bool) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var6 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var6 == nil {
|
||||
templ_7745c5c3_Var6 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = Styles().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = Htmx().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = Alpine().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<meta charset=\"UTF-8\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/layout.templ`, Line: 63, Col: 17}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><link rel=\"icon\" type=\"image/png\" href=\"https://cdn.sonr.id/favicon.png\"><!-- Sets the status bar style to transparent --><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"></head><main class=\"grow\"><body class=\"font-inter antialiased bg-white text-zinc-900 tracking-tight\"><div class=\"flex flex-col min-h-screen overflow-hidden supports-[overflow:clip]:overflow-clip\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ_7745c5c3_Var6.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></body></main></html>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func OpenModal(title, description 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_Var8 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var8 == nil {
|
||||
templ_7745c5c3_Var8 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div x-data=\"{ modalOpen: true }\" @keydown.escape=\"modalOpen=false\" :class=\"{ 'z-40': 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-90 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\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/layout.templ`, Line: 111, Col: 47}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</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>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(description)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/layout.templ`, Line: 117, Col: 22}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ_7745c5c3_Var8.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></template></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func clsxMerge(variants ...Variant) templ.Attributes {
|
||||
combinedAttrs := templ.Attributes{}
|
||||
var classElements []string
|
||||
|
||||
for _, variant := range variants {
|
||||
attrs := variant.Attributes()
|
||||
if class, ok := attrs["class"].(string); ok {
|
||||
classElements = append(classElements, strings.Fields(class)...)
|
||||
}
|
||||
for key, value := range attrs {
|
||||
if key != "class" {
|
||||
combinedAttrs[key] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(classElements) > 0 {
|
||||
combinedAttrs["class"] = strings.Join(classElements, " ")
|
||||
}
|
||||
return combinedAttrs
|
||||
}
|
||||
|
||||
func clsxBuilder(classes ...string) templ.Attributes {
|
||||
if len(classes) == 0 {
|
||||
return templ.Attributes{}
|
||||
}
|
||||
class := strings.Join(classes, " ")
|
||||
return templ.Attributes{
|
||||
"class": class,
|
||||
}
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,28 +0,0 @@
|
||||
package styles
|
||||
|
||||
const (
|
||||
PublicOrigin = "https://cdn.sonr.id"
|
||||
)
|
||||
|
||||
var (
|
||||
stylesHandle = templ.NewOnceHandle()
|
||||
alpineHandle = templ.NewOnceHandle()
|
||||
dexieHandle = templ.NewOnceHandle()
|
||||
htmxHandle = templ.NewOnceHandle()
|
||||
)
|
||||
|
||||
templ Styles() {
|
||||
<link href={ "https://cdn.sonr.id/css/styles.css" } rel="stylesheet"/>
|
||||
}
|
||||
|
||||
templ Alpine() {
|
||||
<script src={ "https://cdn.sonr.id/js/alpine.min.js" } defer></script>
|
||||
}
|
||||
|
||||
templ Dexie() {
|
||||
<script src={ "https://cdn.sonr.id/js/dexie.min.js" }></script>
|
||||
}
|
||||
|
||||
templ Htmx() {
|
||||
<script src={ "https://cdn.sonr.id/js/htmx.min.js" }></script>
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package styles
|
||||
|
||||
//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"
|
||||
|
||||
const (
|
||||
PublicOrigin = "https://cdn.sonr.id"
|
||||
)
|
||||
|
||||
var (
|
||||
stylesHandle = templ.NewOnceHandle()
|
||||
alpineHandle = templ.NewOnceHandle()
|
||||
dexieHandle = templ.NewOnceHandle()
|
||||
htmxHandle = templ.NewOnceHandle()
|
||||
)
|
||||
|
||||
func Styles() 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("<link href=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/css/styles.css")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/scripts.templ`, Line: 15, Col: 50}
|
||||
}
|
||||
_, 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("\" rel=\"stylesheet\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Alpine() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var3 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var3 == nil {
|
||||
templ_7745c5c3_Var3 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script src=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/alpine.min.js")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/scripts.templ`, Line: 19, Col: 53}
|
||||
}
|
||||
_, 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("\" defer></script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Dexie() 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_Var5 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var5 == nil {
|
||||
templ_7745c5c3_Var5 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script src=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/dexie.min.js")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/scripts.templ`, Line: 23, Col: 52}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"></script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Htmx() 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_Var7 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var7 == nil {
|
||||
templ_7745c5c3_Var7 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script src=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/htmx.min.js")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/scripts.templ`, Line: 27, Col: 51}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"></script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,61 +0,0 @@
|
||||
package styles
|
||||
|
||||
type Size int
|
||||
|
||||
const (
|
||||
SizeDefault Size = iota
|
||||
SizeSmall
|
||||
SizeMedium
|
||||
SizeLarge
|
||||
)
|
||||
|
||||
func (s Size) CardAttributes() templ.Attributes {
|
||||
switch s {
|
||||
case SizeSmall:
|
||||
return templ.Attributes{
|
||||
"class": "max-w-lg bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60",
|
||||
}
|
||||
case SizeLarge:
|
||||
return templ.Attributes{
|
||||
"class": "max-w-2xl bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "max-w-xl bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60",
|
||||
}
|
||||
}
|
||||
|
||||
func (s Size) SvgAttributes() templ.Attributes {
|
||||
switch s {
|
||||
case SizeSmall:
|
||||
return templ.Attributes{
|
||||
"height": "16",
|
||||
"width": "16",
|
||||
}
|
||||
case SizeLarge:
|
||||
return templ.Attributes{
|
||||
"height": "32",
|
||||
"width": "32",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"height": "24",
|
||||
"width": "24",
|
||||
}
|
||||
}
|
||||
|
||||
func (s Size) TextAttributes() templ.Attributes {
|
||||
switch s {
|
||||
case SizeSmall:
|
||||
return templ.Attributes{
|
||||
"class": "text-sm",
|
||||
}
|
||||
case SizeLarge:
|
||||
return templ.Attributes{
|
||||
"class": "text-lg",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "text-md",
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package styles
|
||||
|
||||
//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 Size int
|
||||
|
||||
const (
|
||||
SizeDefault Size = iota
|
||||
SizeSmall
|
||||
SizeMedium
|
||||
SizeLarge
|
||||
)
|
||||
|
||||
func (s Size) CardAttributes() templ.Attributes {
|
||||
switch s {
|
||||
case SizeSmall:
|
||||
return templ.Attributes{
|
||||
"class": "max-w-lg bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60",
|
||||
}
|
||||
case SizeLarge:
|
||||
return templ.Attributes{
|
||||
"class": "max-w-2xl bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "max-w-xl bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60",
|
||||
}
|
||||
}
|
||||
|
||||
func (s Size) SvgAttributes() templ.Attributes {
|
||||
switch s {
|
||||
case SizeSmall:
|
||||
return templ.Attributes{
|
||||
"height": "16",
|
||||
"width": "16",
|
||||
}
|
||||
case SizeLarge:
|
||||
return templ.Attributes{
|
||||
"height": "32",
|
||||
"width": "32",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"height": "24",
|
||||
"width": "24",
|
||||
}
|
||||
}
|
||||
|
||||
func (s Size) TextAttributes() templ.Attributes {
|
||||
switch s {
|
||||
case SizeSmall:
|
||||
return templ.Attributes{
|
||||
"class": "text-sm",
|
||||
}
|
||||
case SizeLarge:
|
||||
return templ.Attributes{
|
||||
"class": "text-lg",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "text-md",
|
||||
}
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,62 +0,0 @@
|
||||
package styles
|
||||
|
||||
func H1(content string) templ.Component {
|
||||
return renderText(1, content)
|
||||
}
|
||||
|
||||
func H2(content string) templ.Component {
|
||||
return renderText(2, content)
|
||||
}
|
||||
|
||||
func H3(content string) templ.Component {
|
||||
return renderText(3, content)
|
||||
}
|
||||
|
||||
func Text(content string) templ.Component {
|
||||
return renderText(0, content)
|
||||
}
|
||||
|
||||
templ renderText(level int, text string) {
|
||||
switch level {
|
||||
case 1:
|
||||
<h1 class="text-2xl lg:text-3xl font-bold pb-3">
|
||||
{ text }
|
||||
</h1>
|
||||
case 2:
|
||||
<h2 class="text-xl lg:text-2xl font-bold pb-2">
|
||||
{ text }
|
||||
</h2>
|
||||
case 3:
|
||||
<h3 class="text-md lg:text-xl font-semibold pb-1">
|
||||
{ text }
|
||||
</h3>
|
||||
default:
|
||||
<p class="text-base font-normal">
|
||||
{ text }
|
||||
</p>
|
||||
}
|
||||
}
|
||||
|
||||
templ renderLink(attrs templ.Attributes, text string) {
|
||||
<a { attrs... }>
|
||||
{ text }
|
||||
</a>
|
||||
}
|
||||
|
||||
templ renderStrong(attrs templ.Attributes, text string) {
|
||||
<strong { attrs... }>
|
||||
{ text }
|
||||
</strong>
|
||||
}
|
||||
|
||||
templ renderEmphasis(attrs templ.Attributes, text string) {
|
||||
<em { attrs... }>
|
||||
{ text }
|
||||
</em>
|
||||
}
|
||||
|
||||
templ renderCode(attrs templ.Attributes, text string) {
|
||||
<code { attrs... }>
|
||||
{ text }
|
||||
</code>
|
||||
}
|
||||
@@ -1,326 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package styles
|
||||
|
||||
//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 H1(content string) templ.Component {
|
||||
return renderText(1, content)
|
||||
}
|
||||
|
||||
func H2(content string) templ.Component {
|
||||
return renderText(2, content)
|
||||
}
|
||||
|
||||
func H3(content string) templ.Component {
|
||||
return renderText(3, content)
|
||||
}
|
||||
|
||||
func Text(content string) templ.Component {
|
||||
return renderText(0, content)
|
||||
}
|
||||
|
||||
func renderText(level int, text 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 level {
|
||||
case 1:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h1 class=\"text-2xl lg:text-3xl font-bold pb-3\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 23, Col: 10}
|
||||
}
|
||||
_, 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("</h1>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
case 2:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h2 class=\"text-xl lg:text-2xl font-bold pb-2\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 27, Col: 10}
|
||||
}
|
||||
_, 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("</h2>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
case 3:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h3 class=\"text-md lg:text-xl font-semibold pb-1\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 31, Col: 10}
|
||||
}
|
||||
_, 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("</h3>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
default:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<p class=\"text-base font-normal\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 35, Col: 10}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func renderLink(attrs templ.Attributes, text 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_Var6 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var6 == nil {
|
||||
templ_7745c5c3_Var6 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a")
|
||||
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
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 42, Col: 8}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func renderStrong(attrs templ.Attributes, text 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_Var8 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var8 == nil {
|
||||
templ_7745c5c3_Var8 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<strong")
|
||||
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
|
||||
}
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 48, Col: 8}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</strong>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func renderEmphasis(attrs templ.Attributes, text 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_Var10 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var10 == nil {
|
||||
templ_7745c5c3_Var10 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<em")
|
||||
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
|
||||
}
|
||||
var templ_7745c5c3_Var11 string
|
||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 54, Col: 8}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</em>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func renderCode(attrs templ.Attributes, text 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_Var12 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var12 == nil {
|
||||
templ_7745c5c3_Var12 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<code")
|
||||
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
|
||||
}
|
||||
var templ_7745c5c3_Var13 string
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 60, Col: 8}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</code>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,59 +0,0 @@
|
||||
package ui
|
||||
|
||||
templ PoweredBySonr() {
|
||||
<div class="mx-auto w-fit pt-8">
|
||||
<div class="pt-2 pb-3 pl-4 pr-4 gap-x-3 text-sm text-gray-500 border-t border-neutral-200/70">
|
||||
<div
|
||||
x-data="{
|
||||
hoverCardHovered: false,
|
||||
hoverCardDelay: 600,
|
||||
hoverCardLeaveDelay: 500,
|
||||
hoverCardTimout: null,
|
||||
hoverCardLeaveTimeout: null,
|
||||
hoverCardEnter () {
|
||||
clearTimeout(this.hoverCardLeaveTimeout);
|
||||
if(this.hoverCardHovered) return;
|
||||
clearTimeout(this.hoverCardTimout);
|
||||
this.hoverCardTimout = setTimeout(() => {
|
||||
this.hoverCardHovered = true;
|
||||
}, this.hoverCardDelay);
|
||||
},
|
||||
hoverCardLeave () {
|
||||
clearTimeout(this.hoverCardTimout);
|
||||
if(!this.hoverCardHovered) return;
|
||||
clearTimeout(this.hoverCardLeaveTimeout);
|
||||
this.hoverCardLeaveTimeout = setTimeout(() => {
|
||||
this.hoverCardHovered = false;
|
||||
}, this.hoverCardLeaveDelay);
|
||||
}
|
||||
}"
|
||||
class="relative"
|
||||
@mouseover="hoverCardEnter()"
|
||||
@mouseleave="hoverCardLeave()"
|
||||
>
|
||||
<span class="bg-transparent text-gray-500 border border-neutral-300 flex items-center text-xs font-semibold px-2.5 py-0.5 rounded-full">
|
||||
<span class="mr-1">Powered by </span>
|
||||
<svg class="w-3 h-3" width="164" height="164" viewBox="0 0 164 164" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M71.8077 133.231C74.5054 135.928 78.1636 137.443 81.978 137.443C85.7924 137.443 89.4506 135.928 92.1483 133.231L133.219 92.1638C135.909 89.4654 137.42 85.8102 137.42 81.9998C137.42 78.1895 135.909 74.5345 133.219 71.8361L112.886 51.5272L131.665 32.7499L152.031 53.1143C159.696 60.7963 164 71.2046 164 82.0559C164 92.9072 159.696 103.315 152.031 110.997L110.95 152.065C107.154 155.869 102.642 158.883 97.6739 160.931C92.7059 162.98 87.3809 164.023 82.0071 164L82.0052 164C76.622 164.019 71.2886 162.969 66.3145 160.91C61.3405 158.852 56.8247 155.826 53.0294 152.009L53.0289 152.008L48.7187 147.699L67.4974 128.921L71.8077 133.231Z" fill="currentColor"></path>
|
||||
<path d="M110.95 11.9912L115.26 16.3011L96.481 35.0785L92.1707 30.7685C89.4731 28.072 85.8148 26.5572 82.0004 26.5572C78.186 26.5572 74.5277 28.072 71.8301 30.7685L30.7597 71.8359C29.4247 73.1706 28.3658 74.7552 27.6433 76.4991C26.9208 78.2431 26.549 80.1122 26.549 81.9999C26.549 83.8876 26.9208 85.7567 27.6433 87.5007C28.3658 89.2446 29.4247 90.8292 30.7597 92.1639L51.1256 112.528L32.3138 131.306L11.9923 110.941C8.19043 107.141 5.17433 102.629 3.1167 97.6635C1.05907 92.6976 0 87.3751 0 81.9999C0 76.6247 1.05907 71.3022 3.1167 66.3363C5.17433 61.3705 8.19021 56.8587 11.9921 53.0586L53.0625 11.9912C56.8629 8.18964 61.3751 5.17395 66.3413 3.11647C71.3075 1.05899 76.6304 0 82.006 0C87.3816 0 92.7045 1.05899 97.6707 3.11647C102.637 5.17395 107.149 8.18964 110.95 11.9912Z" fill="currentColor"></path>
|
||||
<path d="M55.603 76.6744L76.6993 55.5798C79.6327 52.6465 84.3888 52.6465 87.3223 55.5797L108.419 76.6744C111.352 79.6077 111.352 84.3634 108.419 87.2966L87.3223 108.391C84.3888 111.325 79.6327 111.325 76.6993 108.391L55.603 87.2966C52.6696 84.3634 52.6696 79.6077 55.603 76.6744Z" fill="currentColor"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<div x-show="hoverCardHovered" class="absolute top-0 w-[365px] max-w-lg mt-5 z-30 -translate-x-1/2 translate-y-3 left-1/2" x-cloak>
|
||||
<div x-show="hoverCardHovered" class="w-[full] h-auto bg-white space-x-3 p-5 flex items-start rounded-md shadow-sm border border-neutral-200/70" x-transition>
|
||||
<img src="https://cdn.sonr.io/logo.svg" alt="sonr image" class="rounded-full w-14 h-14"/>
|
||||
<div class="relative">
|
||||
<p class="mb-1 text-sm text-gray-600">The creative platform for developers. Community, tools, products, and more</p>
|
||||
<p class="flex items-center space-x-1 text-xs text-gray-400">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"></path>
|
||||
</svg>
|
||||
<span>Joined June 2020</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package ui
|
||||
|
||||
//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 PoweredBySonr() 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 class=\"mx-auto w-fit pt-8\"><div class=\"pt-2 pb-3 pl-4 pr-4 gap-x-3 text-sm text-gray-500 border-t border-neutral-200/70\"><div x-data=\"{ \n hoverCardHovered: false,\n hoverCardDelay: 600,\n hoverCardLeaveDelay: 500,\n hoverCardTimout: null,\n hoverCardLeaveTimeout: null,\n hoverCardEnter () {\n clearTimeout(this.hoverCardLeaveTimeout);\n if(this.hoverCardHovered) return;\n clearTimeout(this.hoverCardTimout);\n this.hoverCardTimout = setTimeout(() => {\n this.hoverCardHovered = true;\n }, this.hoverCardDelay);\n },\n hoverCardLeave () {\n clearTimeout(this.hoverCardTimout);\n if(!this.hoverCardHovered) return;\n clearTimeout(this.hoverCardLeaveTimeout);\n this.hoverCardLeaveTimeout = setTimeout(() => {\n this.hoverCardHovered = false;\n }, this.hoverCardLeaveDelay);\n }\n }\" class=\"relative\" @mouseover=\"hoverCardEnter()\" @mouseleave=\"hoverCardLeave()\"><span class=\"bg-transparent text-gray-500 border border-neutral-300 flex items-center text-xs font-semibold px-2.5 py-0.5 rounded-full\"><span class=\"mr-1\">Powered by </span> <svg class=\"w-3 h-3\" width=\"164\" height=\"164\" viewBox=\"0 0 164 164\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M71.8077 133.231C74.5054 135.928 78.1636 137.443 81.978 137.443C85.7924 137.443 89.4506 135.928 92.1483 133.231L133.219 92.1638C135.909 89.4654 137.42 85.8102 137.42 81.9998C137.42 78.1895 135.909 74.5345 133.219 71.8361L112.886 51.5272L131.665 32.7499L152.031 53.1143C159.696 60.7963 164 71.2046 164 82.0559C164 92.9072 159.696 103.315 152.031 110.997L110.95 152.065C107.154 155.869 102.642 158.883 97.6739 160.931C92.7059 162.98 87.3809 164.023 82.0071 164L82.0052 164C76.622 164.019 71.2886 162.969 66.3145 160.91C61.3405 158.852 56.8247 155.826 53.0294 152.009L53.0289 152.008L48.7187 147.699L67.4974 128.921L71.8077 133.231Z\" fill=\"currentColor\"></path> <path d=\"M110.95 11.9912L115.26 16.3011L96.481 35.0785L92.1707 30.7685C89.4731 28.072 85.8148 26.5572 82.0004 26.5572C78.186 26.5572 74.5277 28.072 71.8301 30.7685L30.7597 71.8359C29.4247 73.1706 28.3658 74.7552 27.6433 76.4991C26.9208 78.2431 26.549 80.1122 26.549 81.9999C26.549 83.8876 26.9208 85.7567 27.6433 87.5007C28.3658 89.2446 29.4247 90.8292 30.7597 92.1639L51.1256 112.528L32.3138 131.306L11.9923 110.941C8.19043 107.141 5.17433 102.629 3.1167 97.6635C1.05907 92.6976 0 87.3751 0 81.9999C0 76.6247 1.05907 71.3022 3.1167 66.3363C5.17433 61.3705 8.19021 56.8587 11.9921 53.0586L53.0625 11.9912C56.8629 8.18964 61.3751 5.17395 66.3413 3.11647C71.3075 1.05899 76.6304 0 82.006 0C87.3816 0 92.7045 1.05899 97.6707 3.11647C102.637 5.17395 107.149 8.18964 110.95 11.9912Z\" fill=\"currentColor\"></path> <path d=\"M55.603 76.6744L76.6993 55.5798C79.6327 52.6465 84.3888 52.6465 87.3223 55.5797L108.419 76.6744C111.352 79.6077 111.352 84.3634 108.419 87.2966L87.3223 108.391C84.3888 111.325 79.6327 111.325 76.6993 108.391L55.603 87.2966C52.6696 84.3634 52.6696 79.6077 55.603 76.6744Z\" fill=\"currentColor\"></path></svg></span><div x-show=\"hoverCardHovered\" class=\"absolute top-0 w-[365px] max-w-lg mt-5 z-30 -translate-x-1/2 translate-y-3 left-1/2\" x-cloak><div x-show=\"hoverCardHovered\" class=\"w-[full] h-auto bg-white space-x-3 p-5 flex items-start rounded-md shadow-sm border border-neutral-200/70\" x-transition><img src=\"https://cdn.sonr.io/logo.svg\" alt=\"sonr image\" class=\"rounded-full w-14 h-14\"><div class=\"relative\"><p class=\"mb-1 text-sm text-gray-600\">The creative platform for developers. Community, tools, products, and more</p><p class=\"flex items-center space-x-1 text-xs text-gray-400\"><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-5 h-5\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z\"></path></svg> <span>Joined June 2020</span></p></div></div></div></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,233 +0,0 @@
|
||||
package ui
|
||||
|
||||
import "github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
|
||||
templ PrimaryButton(href string, text string) {
|
||||
<div>
|
||||
<div class="btn cursor-pointer text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" hx-swap="afterend" hx-get={ href }>{ text }</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ SecondaryButton(href string, text string) {
|
||||
<div>
|
||||
<div class="btn cursor-pointer text-zinc-600 bg-white hover:text-zinc-900 w-full shadow" hx-swap="afterend" hx-get={ href }>{ text }</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
type button struct {
|
||||
variant styles.Variant
|
||||
hxGet string
|
||||
hxPost string
|
||||
hxTarget string
|
||||
hxTrigger string
|
||||
hxSwap string
|
||||
}
|
||||
|
||||
type ButtonOpt func(button *button)
|
||||
|
||||
func PrimaryButtonStyle() ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.variant = ButtonVariantPrimary
|
||||
}
|
||||
}
|
||||
|
||||
func InfoButtonStyle() ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.variant = ButtonVariantInfo
|
||||
}
|
||||
}
|
||||
|
||||
func ErrorButtonStyle() ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.variant = ButtonVariantError
|
||||
}
|
||||
}
|
||||
|
||||
func SuccessButtonStyle() ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.variant = ButtonVariantSuccess
|
||||
}
|
||||
}
|
||||
|
||||
func WarningButtonStyle() ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.variant = ButtonVariantWarning
|
||||
}
|
||||
}
|
||||
|
||||
func GET(action string, target string) ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.hxGet = action
|
||||
button.hxTarget = target
|
||||
button.hxTrigger = "click"
|
||||
button.hxSwap = "outerHTML"
|
||||
}
|
||||
}
|
||||
|
||||
func POST(action string, target string) ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.hxPost = action
|
||||
button.hxTarget = target
|
||||
button.hxTrigger = "click"
|
||||
button.hxSwap = "outerHTML"
|
||||
}
|
||||
}
|
||||
|
||||
func Button(opts ...ButtonOpt) templ.Component {
|
||||
button := button{
|
||||
variant: ButtonVariantDefault,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(&button)
|
||||
}
|
||||
if button.hxGet != "" {
|
||||
return renderHxGetButton(&button, button.variant.Attributes())
|
||||
}
|
||||
|
||||
if button.hxPost != "" {
|
||||
return renderHxPostButton(&button, button.variant.Attributes())
|
||||
}
|
||||
return renderButton(button.variant.Attributes())
|
||||
}
|
||||
|
||||
templ renderButton(attrs templ.Attributes) {
|
||||
<button { attrs... }>
|
||||
{ children... }
|
||||
</button>
|
||||
}
|
||||
|
||||
templ renderHxGetButton(c *button, attrs templ.Attributes) {
|
||||
<button hx-get={ c.hxGet } hx-push-url="true" hx-target={ c.hxTarget } hx-trigger={ c.hxTrigger } hx-swap={ c.hxSwap } { attrs... }>
|
||||
{ children... }
|
||||
</button>
|
||||
}
|
||||
|
||||
templ renderHxPostButton(c *button, attrs templ.Attributes) {
|
||||
<button hx-post={ c.hxPost } hx-target={ c.hxTarget } hx-trigger={ c.hxTrigger } hx-swap={ c.hxSwap } { attrs... }>
|
||||
{ children... }
|
||||
</button>
|
||||
}
|
||||
|
||||
type ButtonVariant int
|
||||
|
||||
const (
|
||||
ButtonVariantDefault ButtonVariant = iota
|
||||
ButtonVariantPrimary
|
||||
ButtonVariantInfo
|
||||
ButtonVariantError
|
||||
ButtonVariantSuccess
|
||||
ButtonVariantWarning
|
||||
)
|
||||
|
||||
func (v ButtonVariant) Attributes() templ.Attributes {
|
||||
switch v {
|
||||
case ButtonVariantPrimary:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-neutral-950 hover:bg-neutral-900 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-900 focus:shadow-outline focus:outline-none",
|
||||
"type": "button",
|
||||
}
|
||||
case ButtonVariantInfo:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-700 focus:shadow-outline focus:outline-none",
|
||||
"type": "button",
|
||||
}
|
||||
case ButtonVariantError:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-red-600 hover:bg-red-700 focus:ring-2 focus:ring-offset-2 focus:ring-red-700 focus:shadow-outline focus:outline-none",
|
||||
"type": "button",
|
||||
}
|
||||
case ButtonVariantSuccess:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-green-600 hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-700 focus:shadow-outline focus:outline-none",
|
||||
"type": "button",
|
||||
}
|
||||
case ButtonVariantWarning:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-yellow-600 hover:bg-yellow-700 focus:ring-2 focus:ring-offset-2 focus:ring-yellow-700 focus:shadow-outline focus:outline-none",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-200 bg-white border rounded-md text-neutral-500 hover:text-neutral-700 border-neutral-200/70 hover:bg-neutral-100 active:bg-white focus:bg-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-200/60 focus:shadow-outline",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
|
||||
type SubtleButtonVariant int
|
||||
|
||||
const (
|
||||
SubtleButtonVariantDefault SubtleButtonVariant = iota
|
||||
SubtleButtonVariantInfo
|
||||
SubtleButtonVariantError
|
||||
SubtleButtonVariantSuccess
|
||||
SubtleButtonVariantWarning
|
||||
)
|
||||
|
||||
func (v SubtleButtonVariant) Attributes() templ.Attributes {
|
||||
switch v {
|
||||
case SubtleButtonVariantInfo:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-blue-100 bg-blue-50 hover:text-blue-600 hover:bg-blue-100",
|
||||
"type": "button",
|
||||
}
|
||||
case SubtleButtonVariantError:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-red-100 bg-red-50 hover:text-red-600 hover:bg-red-100",
|
||||
"type": "button",
|
||||
}
|
||||
case SubtleButtonVariantSuccess:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-green-100 bg-green-50 hover:text-green-600 hover:bg-green-100",
|
||||
"type": "button",
|
||||
}
|
||||
case SubtleButtonVariantWarning:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-yellow-100 bg-yellow-50 hover:text-yellow-700 hover:bg-yellow-100",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 rounded-md text-neutral-500 bg-neutral-50 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-100 hover:text-neutral-600 hover:bg-neutral-100",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
|
||||
type OutlineButtonVariant int
|
||||
|
||||
const (
|
||||
OutlineButtonVariantDefault OutlineButtonVariant = iota
|
||||
OutlineButtonVariantInfo
|
||||
OutlineButtonVariantError
|
||||
OutlineButtonVariantSuccess
|
||||
OutlineButtonVariantWarning
|
||||
)
|
||||
|
||||
func (v OutlineButtonVariant) Attributes() templ.Attributes {
|
||||
switch v {
|
||||
case OutlineButtonVariantInfo:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-600 transition-colors duration-100 bg-white border-2 border-blue-600 rounded-md hover:text-white hover:bg-blue-600",
|
||||
"type": "button",
|
||||
}
|
||||
case OutlineButtonVariantError:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-600 transition-colors duration-100 bg-white border-2 border-red-600 rounded-md hover:text-white hover:bg-red-600",
|
||||
"type": "button",
|
||||
}
|
||||
case OutlineButtonVariantSuccess:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-600 transition-colors duration-100 bg-white border-2 border-green-600 rounded-md hover:text-white hover:bg-green-600",
|
||||
"type": "button",
|
||||
}
|
||||
case OutlineButtonVariantWarning:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 bg-white border-2 border-yellow-500 rounded-md hover:text-white hover:bg-yellow-500",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 bg-white border-2 rounded-md text-neutral-900 hover:text-white border-neutral-900 hover:bg-neutral-900",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
@@ -1,561 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package ui
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import "github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
|
||||
func PrimaryButton(href string, text 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)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div><div class=\"btn cursor-pointer text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow\" hx-swap=\"afterend\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(href)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 7, Col: 124}
|
||||
}
|
||||
_, 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("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 7, Col: 133}
|
||||
}
|
||||
_, 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
|
||||
})
|
||||
}
|
||||
|
||||
func SecondaryButton(href string, text 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_Var4 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var4 == nil {
|
||||
templ_7745c5c3_Var4 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div><div class=\"btn cursor-pointer text-zinc-600 bg-white hover:text-zinc-900 w-full shadow\" hx-swap=\"afterend\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(href)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 13, Col: 123}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 13, Col: 132}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
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 button struct {
|
||||
variant styles.Variant
|
||||
hxGet string
|
||||
hxPost string
|
||||
hxTarget string
|
||||
hxTrigger string
|
||||
hxSwap string
|
||||
}
|
||||
|
||||
type ButtonOpt func(button *button)
|
||||
|
||||
func PrimaryButtonStyle() ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.variant = ButtonVariantPrimary
|
||||
}
|
||||
}
|
||||
|
||||
func InfoButtonStyle() ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.variant = ButtonVariantInfo
|
||||
}
|
||||
}
|
||||
|
||||
func ErrorButtonStyle() ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.variant = ButtonVariantError
|
||||
}
|
||||
}
|
||||
|
||||
func SuccessButtonStyle() ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.variant = ButtonVariantSuccess
|
||||
}
|
||||
}
|
||||
|
||||
func WarningButtonStyle() ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.variant = ButtonVariantWarning
|
||||
}
|
||||
}
|
||||
|
||||
func GET(action string, target string) ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.hxGet = action
|
||||
button.hxTarget = target
|
||||
button.hxTrigger = "click"
|
||||
button.hxSwap = "outerHTML"
|
||||
}
|
||||
}
|
||||
|
||||
func POST(action string, target string) ButtonOpt {
|
||||
return func(button *button) {
|
||||
button.hxPost = action
|
||||
button.hxTarget = target
|
||||
button.hxTrigger = "click"
|
||||
button.hxSwap = "outerHTML"
|
||||
}
|
||||
}
|
||||
|
||||
func Button(opts ...ButtonOpt) templ.Component {
|
||||
button := button{
|
||||
variant: ButtonVariantDefault,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(&button)
|
||||
}
|
||||
if button.hxGet != "" {
|
||||
return renderHxGetButton(&button, button.variant.Attributes())
|
||||
}
|
||||
|
||||
if button.hxPost != "" {
|
||||
return renderHxPostButton(&button, button.variant.Attributes())
|
||||
}
|
||||
return renderButton(button.variant.Attributes())
|
||||
}
|
||||
|
||||
func renderButton(attrs templ.Attributes) 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_Var7 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var7 == nil {
|
||||
templ_7745c5c3_Var7 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<button")
|
||||
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 = templ_7745c5c3_Var7.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</button>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func renderHxGetButton(c *button, attrs templ.Attributes) 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_Var8 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var8 == nil {
|
||||
templ_7745c5c3_Var8 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<button hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxGet)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 101, Col: 25}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-push-url=\"true\" hx-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTarget)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 101, Col: 69}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-trigger=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var11 string
|
||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTrigger)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 101, Col: 96}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var12 string
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxSwap)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 101, Col: 117}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||
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 = 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 = templ_7745c5c3_Var8.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</button>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func renderHxPostButton(c *button, attrs templ.Attributes) 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_Var13 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var13 == nil {
|
||||
templ_7745c5c3_Var13 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<button hx-post=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxPost)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 107, Col: 27}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTarget)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 107, Col: 52}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-trigger=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTrigger)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 107, Col: 79}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-swap=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxSwap)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 107, Col: 100}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||
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 = 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 = templ_7745c5c3_Var13.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</button>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
type ButtonVariant int
|
||||
|
||||
const (
|
||||
ButtonVariantDefault ButtonVariant = iota
|
||||
ButtonVariantPrimary
|
||||
ButtonVariantInfo
|
||||
ButtonVariantError
|
||||
ButtonVariantSuccess
|
||||
ButtonVariantWarning
|
||||
)
|
||||
|
||||
func (v ButtonVariant) Attributes() templ.Attributes {
|
||||
switch v {
|
||||
case ButtonVariantPrimary:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-neutral-950 hover:bg-neutral-900 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-900 focus:shadow-outline focus:outline-none",
|
||||
"type": "button",
|
||||
}
|
||||
case ButtonVariantInfo:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-700 focus:shadow-outline focus:outline-none",
|
||||
"type": "button",
|
||||
}
|
||||
case ButtonVariantError:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-red-600 hover:bg-red-700 focus:ring-2 focus:ring-offset-2 focus:ring-red-700 focus:shadow-outline focus:outline-none",
|
||||
"type": "button",
|
||||
}
|
||||
case ButtonVariantSuccess:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-green-600 hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-700 focus:shadow-outline focus:outline-none",
|
||||
"type": "button",
|
||||
}
|
||||
case ButtonVariantWarning:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-yellow-600 hover:bg-yellow-700 focus:ring-2 focus:ring-offset-2 focus:ring-yellow-700 focus:shadow-outline focus:outline-none",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-200 bg-white border rounded-md text-neutral-500 hover:text-neutral-700 border-neutral-200/70 hover:bg-neutral-100 active:bg-white focus:bg-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-200/60 focus:shadow-outline",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
|
||||
type SubtleButtonVariant int
|
||||
|
||||
const (
|
||||
SubtleButtonVariantDefault SubtleButtonVariant = iota
|
||||
SubtleButtonVariantInfo
|
||||
SubtleButtonVariantError
|
||||
SubtleButtonVariantSuccess
|
||||
SubtleButtonVariantWarning
|
||||
)
|
||||
|
||||
func (v SubtleButtonVariant) Attributes() templ.Attributes {
|
||||
switch v {
|
||||
case SubtleButtonVariantInfo:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-blue-100 bg-blue-50 hover:text-blue-600 hover:bg-blue-100",
|
||||
"type": "button",
|
||||
}
|
||||
case SubtleButtonVariantError:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-red-100 bg-red-50 hover:text-red-600 hover:bg-red-100",
|
||||
"type": "button",
|
||||
}
|
||||
case SubtleButtonVariantSuccess:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-green-100 bg-green-50 hover:text-green-600 hover:bg-green-100",
|
||||
"type": "button",
|
||||
}
|
||||
case SubtleButtonVariantWarning:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-yellow-100 bg-yellow-50 hover:text-yellow-700 hover:bg-yellow-100",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 rounded-md text-neutral-500 bg-neutral-50 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-100 hover:text-neutral-600 hover:bg-neutral-100",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
|
||||
type OutlineButtonVariant int
|
||||
|
||||
const (
|
||||
OutlineButtonVariantDefault OutlineButtonVariant = iota
|
||||
OutlineButtonVariantInfo
|
||||
OutlineButtonVariantError
|
||||
OutlineButtonVariantSuccess
|
||||
OutlineButtonVariantWarning
|
||||
)
|
||||
|
||||
func (v OutlineButtonVariant) Attributes() templ.Attributes {
|
||||
switch v {
|
||||
case OutlineButtonVariantInfo:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-600 transition-colors duration-100 bg-white border-2 border-blue-600 rounded-md hover:text-white hover:bg-blue-600",
|
||||
"type": "button",
|
||||
}
|
||||
case OutlineButtonVariantError:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-600 transition-colors duration-100 bg-white border-2 border-red-600 rounded-md hover:text-white hover:bg-red-600",
|
||||
"type": "button",
|
||||
}
|
||||
case OutlineButtonVariantSuccess:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-600 transition-colors duration-100 bg-white border-2 border-green-600 rounded-md hover:text-white hover:bg-green-600",
|
||||
"type": "button",
|
||||
}
|
||||
case OutlineButtonVariantWarning:
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 bg-white border-2 border-yellow-500 rounded-md hover:text-white hover:bg-yellow-500",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 bg-white border-2 rounded-md text-neutral-900 hover:text-white border-neutral-900 hover:bg-neutral-900",
|
||||
"type": "button",
|
||||
}
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,49 +0,0 @@
|
||||
package ui
|
||||
|
||||
import "github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
|
||||
func Card(id string, size styles.Size) templ.Component {
|
||||
return renderCard(id, size.CardAttributes())
|
||||
}
|
||||
|
||||
templ renderCard(id string, attrs templ.Attributes) {
|
||||
<div id={ id } { attrs... }>
|
||||
<div class="w-full h-full">
|
||||
<div class="row">
|
||||
<div class="col-md-12 space-3">
|
||||
{ children... }
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ ProfileCard() {
|
||||
<div class="relative max-w-sm overflow-hidden bg-white border rounded-lg shadow-sm border-neutral-200/60">
|
||||
<img src="https://cdn.devdojo.com/images/august2023/wallpaper.jpeg" class="relative z-20 object-cover w-full h-32"/>
|
||||
<div class="absolute top-0 z-50 flex items-center w-full mt-2 translate-y-24 px-7 -translate-x-0">
|
||||
<div class="w-20 h-20 p-1 bg-white rounded-full">
|
||||
<img src="https://cdn.devdojo.com/images/august2023/adam.jpeg" class="w-full h-full rounded-full"/>
|
||||
</div>
|
||||
<a href="https://twitter.com/adamwathan" target="_blank" class="block mt-6 ml-2">
|
||||
<h5 class="text-lg font-bold leading-none tracking-tight text-neutral-900">Adam Wathan</h5>
|
||||
<small class="block mt-1 text-sm font-medium leading-none text-neutral-500">adamwathan</small>
|
||||
</a>
|
||||
<button class="absolute right-0 inline-flex items-center justify-center w-auto px-5 mt-6 text-sm font-medium transition-colors duration-100 rounded-full h-9 mr-7 hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 bg-neutral-900 disabled:pointer-events-none hover:bg-neutral-800 text-neutral-100">
|
||||
<span>Follow</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="relative pb-6 p-7">
|
||||
<p class="mt-12 mb-6 text-neutral-500 text-">Creator of @tailwindcss. Listener of Slayer. Austin 3:16. BTW, Pines UI is super cool!</p>
|
||||
<div class="flex items-center justify-between pr-2 text-neutral-500">
|
||||
<div class="relative flex w-16">
|
||||
<img src="https://cdn.devdojo.com/images/august2023/caleb.jpeg" class="relative z-30 w-8 h-8 border-2 border-white rounded-full"/>
|
||||
<img src="https://cdn.devdojo.com/images/august2023/taylor.jpeg" class="z-20 w-8 h-8 -translate-x-4 border-2 border-white rounded-full"/>
|
||||
<img src="https://cdn.devdojo.com/images/august2023/adam.jpeg" class="z-10 w-8 h-8 border-2 border-white rounded-full -translate-x-7"/>
|
||||
</div>
|
||||
<a href="https://twitter.com/adamwathan/following" target="_blank" class="text-sm hover:underline"><strong class="text-neutral-800">673</strong> Following</a>
|
||||
<a href="https://twitter.com/adamwathan/followers" target="_blank" class="text-sm hover:underline"><strong class="text-neutral-800">168.6K</strong> Followers</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package ui
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import "github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
|
||||
func Card(id string, size styles.Size) templ.Component {
|
||||
return renderCard(id, size.CardAttributes())
|
||||
}
|
||||
|
||||
func renderCard(id string, attrs templ.Attributes) 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 id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/card.templ`, Line: 10, Col: 13}
|
||||
}
|
||||
_, 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("\"")
|
||||
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("><div class=\"w-full h-full\"><div class=\"row\"><div class=\"col-md-12 space-3\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func ProfileCard() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var3 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var3 == nil {
|
||||
templ_7745c5c3_Var3 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"relative max-w-sm overflow-hidden bg-white border rounded-lg shadow-sm border-neutral-200/60\"><img src=\"https://cdn.devdojo.com/images/august2023/wallpaper.jpeg\" class=\"relative z-20 object-cover w-full h-32\"><div class=\"absolute top-0 z-50 flex items-center w-full mt-2 translate-y-24 px-7 -translate-x-0\"><div class=\"w-20 h-20 p-1 bg-white rounded-full\"><img src=\"https://cdn.devdojo.com/images/august2023/adam.jpeg\" class=\"w-full h-full rounded-full\"></div><a href=\"https://twitter.com/adamwathan\" target=\"_blank\" class=\"block mt-6 ml-2\"><h5 class=\"text-lg font-bold leading-none tracking-tight text-neutral-900\">Adam Wathan</h5><small class=\"block mt-1 text-sm font-medium leading-none text-neutral-500\">adamwathan</small></a> <button class=\"absolute right-0 inline-flex items-center justify-center w-auto px-5 mt-6 text-sm font-medium transition-colors duration-100 rounded-full h-9 mr-7 hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 bg-neutral-900 disabled:pointer-events-none hover:bg-neutral-800 text-neutral-100\"><span>Follow</span></button></div><div class=\"relative pb-6 p-7\"><p class=\"mt-12 mb-6 text-neutral-500 text-\">Creator of @tailwindcss. Listener of Slayer. Austin 3:16. BTW, Pines UI is super cool!</p><div class=\"flex items-center justify-between pr-2 text-neutral-500\"><div class=\"relative flex w-16\"><img src=\"https://cdn.devdojo.com/images/august2023/caleb.jpeg\" class=\"relative z-30 w-8 h-8 border-2 border-white rounded-full\"> <img src=\"https://cdn.devdojo.com/images/august2023/taylor.jpeg\" class=\"z-20 w-8 h-8 -translate-x-4 border-2 border-white rounded-full\"> <img src=\"https://cdn.devdojo.com/images/august2023/adam.jpeg\" class=\"z-10 w-8 h-8 border-2 border-white rounded-full -translate-x-7\"></div><a href=\"https://twitter.com/adamwathan/following\" target=\"_blank\" class=\"text-sm hover:underline\"><strong class=\"text-neutral-800\">673</strong> Following</a> <a href=\"https://twitter.com/adamwathan/followers\" target=\"_blank\" class=\"text-sm hover:underline\"><strong class=\"text-neutral-800\">168.6K</strong> Followers</a></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,32 +0,0 @@
|
||||
package ui
|
||||
|
||||
|
||||
type Icons int
|
||||
|
||||
const (
|
||||
Icons_Info Icons = iota
|
||||
Icons_Error
|
||||
Icons_Success
|
||||
Icons_Warning
|
||||
)
|
||||
|
||||
func (v Icons) Render() templ.Component {
|
||||
return renderIconVariant(v)
|
||||
}
|
||||
|
||||
templ renderIconVariant(v Icons) {
|
||||
switch v {
|
||||
case Icons_Info:
|
||||
<svg class="w-5 h-5 -translate-y-0.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="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"></path></svg>
|
||||
case Icons_Error:
|
||||
<svg class="w-5 h-5 -translate-y-0.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="M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"></path></svg>
|
||||
case Icons_Success:
|
||||
<svg class="w-5 h-5 -translate-y-0.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="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
case Icons_Warning:
|
||||
<svg class="w-5 h-5 -translate-y-0.5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"></path></svg>
|
||||
}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg>
|
||||
}
|
||||
|
||||
templ SonrIcon() {
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package ui
|
||||
|
||||
//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 Icons int
|
||||
|
||||
const (
|
||||
Icons_Info Icons = iota
|
||||
Icons_Error
|
||||
Icons_Success
|
||||
Icons_Warning
|
||||
)
|
||||
|
||||
func (v Icons) Render() templ.Component {
|
||||
return renderIconVariant(v)
|
||||
}
|
||||
|
||||
func renderIconVariant(v Icons) 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 v {
|
||||
case Icons_Info:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<svg class=\"w-5 h-5 -translate-y-0.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=\"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z\"></path></svg> ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
case Icons_Error:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<svg class=\"w-5 h-5 -translate-y-0.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=\"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z\"></path></svg> ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
case Icons_Success:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<svg class=\"w-5 h-5 -translate-y-0.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=\"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"></path></svg> ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
case Icons_Warning:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<svg class=\"w-5 h-5 -translate-y-0.5\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-6 h-6\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z\"></path></svg> ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-chevron-right\"><polyline points=\"9 18 15 12 9 6\"></polyline></svg>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func SonrIcon() 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)
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,40 +0,0 @@
|
||||
package ui
|
||||
|
||||
|
||||
import "github.com/labstack/echo/v4"
|
||||
|
||||
templ Breadcrumbs() {
|
||||
<nav class="flex justify-between px-3.5 py-1 rounded-md pb-3">
|
||||
<ol class="inline-flex items-center mb-3 space-x-1 text-xs text-neutral-500 [&_.active-breadcrumb]:text-neutral-600 [&_.active-breadcrumb]:font-medium sm:mb-0">
|
||||
<li class="flex items-center h-full">
|
||||
<a href="#_" class="py-1 hover:text-neutral-900">
|
||||
@breadcrumbIcon()
|
||||
</a>
|
||||
</li>
|
||||
<svg class="w-5 h-5 text-gray-400/70" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="none"><path d="M10 8.013l4 4-4 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g></svg>
|
||||
@breadcrumbItem("Policy", false)
|
||||
<svg class="w-5 h-5 text-gray-400/70" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="none"><path d="M10 8.013l4 4-4 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g></svg>
|
||||
@breadcrumbItem("About You", true)
|
||||
<svg class="w-5 h-5 text-gray-400/70" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="none"><path d="M10 8.013l4 4-4 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g></svg>
|
||||
@breadcrumbItem("Generate", false)
|
||||
</ol>
|
||||
</nav>
|
||||
}
|
||||
|
||||
templ breadcrumbItem(title string, active bool) {
|
||||
if (active) {
|
||||
<li><a class="inline-flex items-center py-1 font-normal rounded cursor-default active-breadcrumb focus:outline-none">{ title }</a></li>
|
||||
} else {
|
||||
<li><a href="#_" class="inline-flex items-center py-1 font-normal hover:text-neutral-900 focus:outline-none">{ title }</a></li>
|
||||
}
|
||||
}
|
||||
|
||||
templ breadcrumbIcon() {
|
||||
<svg class="w-4 h-4" viewBox="0 0 164 164" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M71.8077 133.231C74.5054 135.928 78.1636 137.443 81.978 137.443C85.7924 137.443 89.4506 135.928 92.1483 133.231L133.219 92.1638C135.909 89.4654 137.42 85.8102 137.42 81.9998C137.42 78.1895 135.909 74.5345 133.219 71.8361L112.886 51.5272L131.665 32.7499L152.031 53.1143C159.696 60.7963 164 71.2046 164 82.0559C164 92.9072 159.696 103.315 152.031 110.997L110.95 152.065C107.154 155.869 102.642 158.883 97.6739 160.931C92.7059 162.98 87.3809 164.023 82.0071 164L82.0052 164C76.622 164.019 71.2886 162.969 66.3145 160.91C61.3405 158.852 56.8247 155.826 53.0294 152.009L53.0289 152.008L48.7187 147.699L67.4974 128.921L71.8077 133.231Z" fill="currentColor"></path>
|
||||
<path d="M110.95 11.9912L115.26 16.3011L96.481 35.0785L92.1707 30.7685C89.4731 28.072 85.8148 26.5572 82.0004 26.5572C78.186 26.5572 74.5277 28.072 71.8301 30.7685L30.7597 71.8359C29.4247 73.1706 28.3658 74.7552 27.6433 76.4991C26.9208 78.2431 26.549 80.1122 26.549 81.9999C26.549 83.8876 26.9208 85.7567 27.6433 87.5007C28.3658 89.2446 29.4247 90.8292 30.7597 92.1639L51.1256 112.528L32.3138 131.306L11.9923 110.941C8.19043 107.141 5.17433 102.629 3.1167 97.6635C1.05907 92.6976 0 87.3751 0 81.9999C0 76.6247 1.05907 71.3022 3.1167 66.3363C5.17433 61.3705 8.19021 56.8587 11.9921 53.0586L53.0625 11.9912C56.8629 8.18964 61.3751 5.17395 66.3413 3.11647C71.3075 1.05899 76.6304 0 82.006 0C87.3816 0 92.7045 1.05899 97.6707 3.11647C102.637 5.17395 107.149 8.18964 110.95 11.9912Z" fill="currentColor"></path>
|
||||
<path d="M55.603 76.6744L76.6993 55.5798C79.6327 52.6465 84.3888 52.6465 87.3223 55.5797L108.419 76.6744C111.352 79.6077 111.352 84.3634 108.419 87.2966L87.3223 108.391C84.3888 111.325 79.6327 111.325 76.6993 108.391L55.603 87.2966C52.6696 84.3634 52.6696 79.6077 55.603 76.6744Z" fill="currentColor"></path>
|
||||
</svg>
|
||||
}
|
||||
templ Panel(c echo.Context, id string) {
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package ui
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import "github.com/labstack/echo/v4"
|
||||
|
||||
func Breadcrumbs() 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("<nav class=\"flex justify-between px-3.5 py-1 rounded-md pb-3\"><ol class=\"inline-flex items-center mb-3 space-x-1 text-xs text-neutral-500 [&_.active-breadcrumb]:text-neutral-600 [&_.active-breadcrumb]:font-medium sm:mb-0\"><li class=\"flex items-center h-full\"><a href=\"#_\" class=\"py-1 hover:text-neutral-900\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = breadcrumbIcon().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li><svg class=\"w-5 h-5 text-gray-400/70\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><g fill=\"none\" stroke=\"none\"><path d=\"M10 8.013l4 4-4 4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></g></svg>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = breadcrumbItem("Policy", false).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<svg class=\"w-5 h-5 text-gray-400/70\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><g fill=\"none\" stroke=\"none\"><path d=\"M10 8.013l4 4-4 4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></g></svg>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = breadcrumbItem("About You", true).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<svg class=\"w-5 h-5 text-gray-400/70\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><g fill=\"none\" stroke=\"none\"><path d=\"M10 8.013l4 4-4 4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></g></svg>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = breadcrumbItem("Generate", false).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</ol></nav>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func breadcrumbItem(title string, active bool) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var2 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var2 == nil {
|
||||
templ_7745c5c3_Var2 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
if active {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li><a class=\"inline-flex items-center py-1 font-normal rounded cursor-default active-breadcrumb focus:outline-none\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/panel.templ`, Line: 26, Col: 126}
|
||||
}
|
||||
_, 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("</a></li>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li><a href=\"#_\" class=\"inline-flex items-center py-1 font-normal hover:text-neutral-900 focus:outline-none\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/panel.templ`, Line: 28, Col: 118}
|
||||
}
|
||||
_, 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("</a></li>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func breadcrumbIcon() 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_Var5 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var5 == nil {
|
||||
templ_7745c5c3_Var5 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<svg class=\"w-4 h-4\" viewBox=\"0 0 164 164\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M71.8077 133.231C74.5054 135.928 78.1636 137.443 81.978 137.443C85.7924 137.443 89.4506 135.928 92.1483 133.231L133.219 92.1638C135.909 89.4654 137.42 85.8102 137.42 81.9998C137.42 78.1895 135.909 74.5345 133.219 71.8361L112.886 51.5272L131.665 32.7499L152.031 53.1143C159.696 60.7963 164 71.2046 164 82.0559C164 92.9072 159.696 103.315 152.031 110.997L110.95 152.065C107.154 155.869 102.642 158.883 97.6739 160.931C92.7059 162.98 87.3809 164.023 82.0071 164L82.0052 164C76.622 164.019 71.2886 162.969 66.3145 160.91C61.3405 158.852 56.8247 155.826 53.0294 152.009L53.0289 152.008L48.7187 147.699L67.4974 128.921L71.8077 133.231Z\" fill=\"currentColor\"></path> <path d=\"M110.95 11.9912L115.26 16.3011L96.481 35.0785L92.1707 30.7685C89.4731 28.072 85.8148 26.5572 82.0004 26.5572C78.186 26.5572 74.5277 28.072 71.8301 30.7685L30.7597 71.8359C29.4247 73.1706 28.3658 74.7552 27.6433 76.4991C26.9208 78.2431 26.549 80.1122 26.549 81.9999C26.549 83.8876 26.9208 85.7567 27.6433 87.5007C28.3658 89.2446 29.4247 90.8292 30.7597 92.1639L51.1256 112.528L32.3138 131.306L11.9923 110.941C8.19043 107.141 5.17433 102.629 3.1167 97.6635C1.05907 92.6976 0 87.3751 0 81.9999C0 76.6247 1.05907 71.3022 3.1167 66.3363C5.17433 61.3705 8.19021 56.8587 11.9921 53.0586L53.0625 11.9912C56.8629 8.18964 61.3751 5.17395 66.3413 3.11647C71.3075 1.05899 76.6304 0 82.006 0C87.3816 0 92.7045 1.05899 97.6707 3.11647C102.637 5.17395 107.149 8.18964 110.95 11.9912Z\" fill=\"currentColor\"></path> <path d=\"M55.603 76.6744L76.6993 55.5798C79.6327 52.6465 84.3888 52.6465 87.3223 55.5797L108.419 76.6744C111.352 79.6077 111.352 84.3634 108.419 87.2966L87.3223 108.391C84.3888 111.325 79.6327 111.325 76.6993 108.391L55.603 87.2966C52.6696 84.3634 52.6696 79.6077 55.603 76.6744Z\" fill=\"currentColor\"></path></svg>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Panel(c echo.Context, id 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_Var6 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var6 == nil {
|
||||
templ_7745c5c3_Var6 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,28 +0,0 @@
|
||||
package models
|
||||
|
||||
type Button struct {
|
||||
Text string
|
||||
Href string
|
||||
}
|
||||
|
||||
type Image struct {
|
||||
Src string
|
||||
Width string
|
||||
Height string
|
||||
}
|
||||
|
||||
type Stat struct {
|
||||
Value string
|
||||
Label string
|
||||
}
|
||||
|
||||
type Hero struct {
|
||||
TitleFirst string
|
||||
TitleEmphasis string
|
||||
TitleSecond string
|
||||
Subtitle string
|
||||
PrimaryButton *Button
|
||||
SecondaryButton *Button
|
||||
Image *Image
|
||||
Stats []*Stat
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package nebula
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
//go:embed assets
|
||||
var embeddedFiles embed.FS
|
||||
|
||||
func getHTTPFS() (http.FileSystem, error) {
|
||||
fsys, err := fs.Sub(embeddedFiles, "assets")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return http.FS(fsys), nil
|
||||
}
|
||||
|
||||
// UseAssets is a middleware that serves static files from the embedded assets
|
||||
func UseAssets(e *echo.Echo) error {
|
||||
fsys, err := getHTTPFS()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
assets := http.FileServer(fsys)
|
||||
e.GET("/", echo.WrapHandler(assets))
|
||||
e.GET("/assets/*", echo.WrapHandler(http.StripPrefix("/assets/", assets)))
|
||||
return nil
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "@onsonr/nebula",
|
||||
"version": "0.0.2",
|
||||
"scripts": {
|
||||
"fetch:deps": "bun run .deps.mjs",
|
||||
"build:css": "bunx tailwindcss -i ./global/styles/globals.css -o ./assets/css/styles.css",
|
||||
"build": "bun run fetch:deps && bun run build:css",
|
||||
"watch": "bunx tailwindcss -i ./global/styles/globals.css -o ./assets/css/styles.css --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-fetch": "^3.3.2",
|
||||
"@tailwindcss/forms": "^0.5.7",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"sonr-es": "^0.5.3",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"tailwindcss-motion": "^0.3.0-beta"
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/state"
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
)
|
||||
|
||||
templ IndexFile() {
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@styles.Alpine()
|
||||
@styles.Htmx()
|
||||
@styles.Styles()
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Sonr DWN</title>
|
||||
@state.RegisterServiceWorker()
|
||||
</head>
|
||||
<body class="flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4">
|
||||
<main class="flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3">
|
||||
<div id="output">Loading...</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package routes
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/state"
|
||||
"github.com/onsonr/sonr/pkg/nebula/global/styles"
|
||||
)
|
||||
|
||||
func IndexFile() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = styles.Alpine().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = styles.Htmx().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = styles.Styles().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<meta charset=\"UTF-8\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>Sonr DWN</title>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = state.RegisterServiceWorker().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</head><body class=\"flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4\"><main class=\"flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3\"><div id=\"output\">Loading...</div></main></body></html>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,72 +0,0 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
"github.com/labstack/echo/v4"
|
||||
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/auth"
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/home"
|
||||
)
|
||||
|
||||
// ╭───────────────────────────────────────────────────────────╮
|
||||
// │ Marketing Pages │
|
||||
// ╰───────────────────────────────────────────────────────────╯
|
||||
|
||||
func Home(c echo.Context) error {
|
||||
return render(c, home.View())
|
||||
}
|
||||
|
||||
// ╭───────────────────────────────────────────────────────────╮
|
||||
// │ Authentication Views │
|
||||
// ╰───────────────────────────────────────────────────────────╯
|
||||
|
||||
func AuthorizeStart(c echo.Context) error {
|
||||
return render(c, auth.Modal(c))
|
||||
}
|
||||
|
||||
func AuthorizeFinish(c echo.Context) error {
|
||||
return render(c, auth.Modal(c))
|
||||
}
|
||||
|
||||
func LoginDevice(c echo.Context) error {
|
||||
return render(c, auth.Modal(c))
|
||||
}
|
||||
|
||||
func LoginStart(c echo.Context) error {
|
||||
return render(c, auth.Modal(c))
|
||||
}
|
||||
|
||||
func LoginFinish(c echo.Context) error {
|
||||
return render(c, auth.Modal(c))
|
||||
}
|
||||
|
||||
func RegisterStart(c echo.Context) error {
|
||||
return render(c, auth.Modal(c))
|
||||
}
|
||||
|
||||
func RegisterFinish(c echo.Context) error {
|
||||
return render(c, auth.Modal(c))
|
||||
}
|
||||
|
||||
// ╭───────────────────────────────────────────────────────────╮
|
||||
// │ Helper Methods │
|
||||
// ╰───────────────────────────────────────────────────────────╯
|
||||
|
||||
func render(c echo.Context, cmp templ.Component) error {
|
||||
// Create a buffer to store the rendered HTML
|
||||
buf := &bytes.Buffer{}
|
||||
// Render the component to the buffer
|
||||
err := cmp.Render(c.Request().Context(), buf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Set the content type
|
||||
c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML)
|
||||
|
||||
// Write the buffered content to the response
|
||||
_, err = c.Response().Write(buf.Bytes())
|
||||
return err
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
// tailwind.config.js
|
||||
module.exports = {
|
||||
content: [
|
||||
"./components/**/*.{templ,html}",
|
||||
"./global/**/*.{templ,html}",
|
||||
"./src/**/*.ts",
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
inter: ["Inter", "sans-serif"],
|
||||
"inter-tight": ["Inter Tight", "sans-serif"],
|
||||
},
|
||||
fontSize: {
|
||||
xs: ["0.75rem", { lineHeight: "1.5" }],
|
||||
sm: ["0.875rem", { lineHeight: "1.5715" }],
|
||||
base: ["1rem", { lineHeight: "1.5", letterSpacing: "-0.017em" }],
|
||||
lg: ["1.125rem", { lineHeight: "1.5", letterSpacing: "-0.017em" }],
|
||||
xl: ["1.25rem", { lineHeight: "1.5", letterSpacing: "-0.017em" }],
|
||||
"2xl": ["1.5rem", { lineHeight: "1.415", letterSpacing: "-0.017em" }],
|
||||
"3xl": ["2rem", { lineHeight: "1.3125", letterSpacing: "-0.017em" }],
|
||||
"4xl": ["2.5rem", { lineHeight: "1.25", letterSpacing: "-0.017em" }],
|
||||
"5xl": ["3.25rem", { lineHeight: "1.2", letterSpacing: "-0.017em" }],
|
||||
"6xl": ["3.75rem", { lineHeight: "1.1666", letterSpacing: "-0.017em" }],
|
||||
"7xl": ["4.5rem", { lineHeight: "1.1666", letterSpacing: "-0.017em" }],
|
||||
},
|
||||
animation: {
|
||||
"infinite-scroll": "infinite-scroll 60s linear infinite",
|
||||
"infinite-scroll-inverse":
|
||||
"infinite-scroll-inverse 60s linear infinite",
|
||||
},
|
||||
keyframes: {
|
||||
"infinite-scroll": {
|
||||
from: { transform: "translateX(0)" },
|
||||
to: { transform: "translateX(-100%)" },
|
||||
},
|
||||
"infinite-scroll-inverse": {
|
||||
from: { transform: "translateX(-100%)" },
|
||||
to: { transform: "translateX(0)" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [require("@tailwindcss/typography"), require("@tailwindcss/forms"), require('tailwindcss-motion')],
|
||||
};
|
||||
@@ -1,43 +0,0 @@
|
||||
package worker
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-webauthn/webauthn/protocol"
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func CheckSubjectIsValid(e echo.Context) error {
|
||||
credentialID := e.FormValue("credentialID")
|
||||
return e.JSON(200, credentialID)
|
||||
}
|
||||
|
||||
func HandleCredentialAssertion(e echo.Context) error {
|
||||
return e.JSON(200, "HandleCredentialAssertion")
|
||||
}
|
||||
|
||||
func HandleCredentialCreation(e echo.Context) error {
|
||||
// Get the serialized credential data from the form
|
||||
credentialDataJSON := e.FormValue("credentialData")
|
||||
|
||||
// Deserialize the JSON into a temporary struct
|
||||
var ccr protocol.CredentialCreationResponse
|
||||
err := json.Unmarshal([]byte(credentialDataJSON), &ccr)
|
||||
if err != nil {
|
||||
return e.JSON(500, err.Error())
|
||||
}
|
||||
//
|
||||
// // Parse the CredentialCreationResponse
|
||||
// parsedData, err := ccr.Parse()
|
||||
// if err != nil {
|
||||
// return e.JSON(500, err.Error())
|
||||
// }
|
||||
//
|
||||
// // Create the Credential
|
||||
// // credential := orm.NewCredential(parsedData, e.Request().Host, "")
|
||||
//
|
||||
// // Set additional fields
|
||||
// credential.Controller = "" // Set this to the appropriate controller value
|
||||
return e.JSON(200, fmt.Sprintf("REGISTER: %s", string(ccr.ID)))
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package worker
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func GrantAuthorization(e echo.Context) error {
|
||||
// Implement authorization endpoint using passkey authentication
|
||||
// Store session data in cache
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetJWKS(e echo.Context) error {
|
||||
// Implement token endpoint
|
||||
// Use cached session data for validation
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetToken(e echo.Context) error {
|
||||
// Implement token endpoint
|
||||
// Use cached session data for validation
|
||||
return nil
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package worker
|
||||
|
||||
import "github.com/labstack/echo/v4"
|
||||
|
||||
func GetDatabaseSchema(e echo.Context) error {
|
||||
// Implement database schema endpoint
|
||||
return nil
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Account struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
||||
|
||||
Name string `pkl:"name" json:"name,omitempty"`
|
||||
|
||||
Address any `pkl:"address" json:"address,omitempty"`
|
||||
|
||||
PublicKey string `pkl:"publicKey" json:"publicKey,omitempty"`
|
||||
|
||||
ChainCode uint `pkl:"chainCode" json:"chainCode,omitempty"`
|
||||
|
||||
Index int `pkl:"index" json:"index,omitempty"`
|
||||
|
||||
Controller string `pkl:"controller" json:"controller,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Asset struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
||||
|
||||
Name string `pkl:"name" json:"name,omitempty"`
|
||||
|
||||
Symbol string `pkl:"symbol" json:"symbol,omitempty"`
|
||||
|
||||
Decimals int `pkl:"decimals" json:"decimals,omitempty"`
|
||||
|
||||
ChainCode uint `pkl:"chainCode" json:"chainCode,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Chain struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
||||
|
||||
Name string `pkl:"name" json:"name,omitempty"`
|
||||
|
||||
NetworkId string `pkl:"networkId" json:"networkId,omitempty"`
|
||||
|
||||
ChainCode uint `pkl:"chainCode" json:"chainCode,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Credential struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
||||
|
||||
Subject string `pkl:"subject" json:"subject,omitempty"`
|
||||
|
||||
Controller string `pkl:"controller" json:"controller,omitempty"`
|
||||
|
||||
AttestationType string `pkl:"attestationType" json:"attestationType,omitempty"`
|
||||
|
||||
Origin string `pkl:"origin" json:"origin,omitempty"`
|
||||
|
||||
Label *string `pkl:"label" json:"label,omitempty"`
|
||||
|
||||
DeviceId *string `pkl:"deviceId" json:"deviceId,omitempty"`
|
||||
|
||||
CredentialId string `pkl:"credentialId" json:"credentialId,omitempty"`
|
||||
|
||||
PublicKey string `pkl:"publicKey" json:"publicKey,omitempty"`
|
||||
|
||||
Transport []string `pkl:"transport" json:"transport,omitempty"`
|
||||
|
||||
SignCount uint `pkl:"signCount" json:"signCount,omitempty"`
|
||||
|
||||
UserPresent bool `pkl:"userPresent" json:"userPresent,omitempty"`
|
||||
|
||||
UserVerified bool `pkl:"userVerified" json:"userVerified,omitempty"`
|
||||
|
||||
BackupEligible bool `pkl:"backupEligible" json:"backupEligible,omitempty"`
|
||||
|
||||
BackupState bool `pkl:"backupState" json:"backupState,omitempty"`
|
||||
|
||||
CloneWarning bool `pkl:"cloneWarning" json:"cloneWarning,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
|
||||
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"`
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/orm/keyalgorithm"
|
||||
"github.com/onsonr/sonr/pkg/orm/keycurve"
|
||||
"github.com/onsonr/sonr/pkg/orm/keyencoding"
|
||||
"github.com/onsonr/sonr/pkg/orm/keyrole"
|
||||
"github.com/onsonr/sonr/pkg/orm/keytype"
|
||||
)
|
||||
|
||||
type DID struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
||||
|
||||
Role keyrole.KeyRole `pkl:"role"`
|
||||
|
||||
Algorithm keyalgorithm.KeyAlgorithm `pkl:"algorithm"`
|
||||
|
||||
Encoding keyencoding.KeyEncoding `pkl:"encoding"`
|
||||
|
||||
Curve keycurve.KeyCurve `pkl:"curve"`
|
||||
|
||||
KeyType keytype.KeyType `pkl:"key_type"`
|
||||
|
||||
Raw string `pkl:"raw"`
|
||||
|
||||
Jwk *JWK `pkl:"jwk"`
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Grant struct {
|
||||
Id uint `pkl:"id" json:"id,omitempty" query:"id"`
|
||||
|
||||
Subject string `pkl:"subject" json:"subject,omitempty"`
|
||||
|
||||
Controller string `pkl:"controller" json:"controller,omitempty"`
|
||||
|
||||
Origin string `pkl:"origin" json:"origin,omitempty"`
|
||||
|
||||
Token string `pkl:"token" json:"token,omitempty"`
|
||||
|
||||
Scopes []string `pkl:"scopes" json:"scopes,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
|
||||
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"`
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type JWK struct {
|
||||
Kty string `pkl:"kty" json:"kty,omitempty"`
|
||||
|
||||
Crv string `pkl:"crv" json:"crv,omitempty"`
|
||||
|
||||
X string `pkl:"x" json:"x,omitempty"`
|
||||
|
||||
Y string `pkl:"y" json:"y,omitempty"`
|
||||
|
||||
N string `pkl:"n" json:"n,omitempty"`
|
||||
|
||||
E string `pkl:"e" json:"e,omitempty"`
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Keyshare struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
||||
|
||||
Data string `pkl:"data" json:"data,omitempty"`
|
||||
|
||||
Role int `pkl:"role" json:"role,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
|
||||
LastRefreshed *string `pkl:"lastRefreshed" json:"lastRefreshed,omitempty"`
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/apple/pkl-go/pkl"
|
||||
)
|
||||
|
||||
type Orm struct {
|
||||
DbName string `pkl:"db_name"`
|
||||
|
||||
DbVersion int `pkl:"db_version"`
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Orm
|
||||
func LoadFromPath(ctx context.Context, path string) (ret *Orm, err error) {
|
||||
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
cerr := evaluator.Close()
|
||||
if err == nil {
|
||||
err = cerr
|
||||
}
|
||||
}()
|
||||
ret, err = Load(ctx, evaluator, pkl.FileSource(path))
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Orm
|
||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Orm, error) {
|
||||
var ret Orm
|
||||
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ret, nil
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Profile struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
||||
|
||||
Subject string `pkl:"subject" json:"subject,omitempty"`
|
||||
|
||||
Controller string `pkl:"controller" json:"controller,omitempty"`
|
||||
|
||||
OriginUri *string `pkl:"originUri" json:"originUri,omitempty"`
|
||||
|
||||
PublicMetadata *string `pkl:"publicMetadata" json:"publicMetadata,omitempty"`
|
||||
|
||||
PrivateMetadata *string `pkl:"privateMetadata" json:"privateMetadata,omitempty"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
|
||||
|
||||
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"`
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package assettype
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type AssetType string
|
||||
|
||||
const (
|
||||
Native AssetType = "native"
|
||||
Wrapped AssetType = "wrapped"
|
||||
Staking AssetType = "staking"
|
||||
Pool AssetType = "pool"
|
||||
Ibc AssetType = "ibc"
|
||||
Cw20 AssetType = "cw20"
|
||||
)
|
||||
|
||||
// String returns the string representation of AssetType
|
||||
func (rcv AssetType) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(AssetType)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for AssetType.
|
||||
func (rcv *AssetType) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "native":
|
||||
*rcv = Native
|
||||
case "wrapped":
|
||||
*rcv = Wrapped
|
||||
case "staking":
|
||||
*rcv = Staking
|
||||
case "pool":
|
||||
*rcv = Pool
|
||||
case "ibc":
|
||||
*rcv = Ibc
|
||||
case "cw20":
|
||||
*rcv = Cw20
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid AssetType`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package didmethod
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type DIDMethod string
|
||||
|
||||
const (
|
||||
Ipfs DIDMethod = "ipfs"
|
||||
Sonr DIDMethod = "sonr"
|
||||
Bitcoin DIDMethod = "bitcoin"
|
||||
Ethereum DIDMethod = "ethereum"
|
||||
Ibc DIDMethod = "ibc"
|
||||
Webauthn DIDMethod = "webauthn"
|
||||
Dwn DIDMethod = "dwn"
|
||||
Service DIDMethod = "service"
|
||||
)
|
||||
|
||||
// String returns the string representation of DIDMethod
|
||||
func (rcv DIDMethod) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(DIDMethod)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for DIDMethod.
|
||||
func (rcv *DIDMethod) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "ipfs":
|
||||
*rcv = Ipfs
|
||||
case "sonr":
|
||||
*rcv = Sonr
|
||||
case "bitcoin":
|
||||
*rcv = Bitcoin
|
||||
case "ethereum":
|
||||
*rcv = Ethereum
|
||||
case "ibc":
|
||||
*rcv = Ibc
|
||||
case "webauthn":
|
||||
*rcv = Webauthn
|
||||
case "dwn":
|
||||
*rcv = Dwn
|
||||
case "service":
|
||||
*rcv = Service
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid DIDMethod`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
func init() {
|
||||
pkl.RegisterMapping("orm", Orm{})
|
||||
pkl.RegisterMapping("orm#Account", Account{})
|
||||
pkl.RegisterMapping("orm#Asset", Asset{})
|
||||
pkl.RegisterMapping("orm#Chain", Chain{})
|
||||
pkl.RegisterMapping("orm#Credential", Credential{})
|
||||
pkl.RegisterMapping("orm#DID", DID{})
|
||||
pkl.RegisterMapping("orm#JWK", JWK{})
|
||||
pkl.RegisterMapping("orm#Grant", Grant{})
|
||||
pkl.RegisterMapping("orm#Keyshare", Keyshare{})
|
||||
pkl.RegisterMapping("orm#Profile", Profile{})
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package keyalgorithm
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type KeyAlgorithm string
|
||||
|
||||
const (
|
||||
Es256 KeyAlgorithm = "es256"
|
||||
Es384 KeyAlgorithm = "es384"
|
||||
Es512 KeyAlgorithm = "es512"
|
||||
Eddsa KeyAlgorithm = "eddsa"
|
||||
Es256k KeyAlgorithm = "es256k"
|
||||
Ecdsa KeyAlgorithm = "ecdsa"
|
||||
)
|
||||
|
||||
// String returns the string representation of KeyAlgorithm
|
||||
func (rcv KeyAlgorithm) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(KeyAlgorithm)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyAlgorithm.
|
||||
func (rcv *KeyAlgorithm) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "es256":
|
||||
*rcv = Es256
|
||||
case "es384":
|
||||
*rcv = Es384
|
||||
case "es512":
|
||||
*rcv = Es512
|
||||
case "eddsa":
|
||||
*rcv = Eddsa
|
||||
case "es256k":
|
||||
*rcv = Es256k
|
||||
case "ecdsa":
|
||||
*rcv = Ecdsa
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid KeyAlgorithm`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package keycurve
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type KeyCurve string
|
||||
|
||||
const (
|
||||
P256 KeyCurve = "p256"
|
||||
P384 KeyCurve = "p384"
|
||||
P521 KeyCurve = "p521"
|
||||
X25519 KeyCurve = "x25519"
|
||||
X448 KeyCurve = "x448"
|
||||
Ed25519 KeyCurve = "ed25519"
|
||||
Ed448 KeyCurve = "ed448"
|
||||
Secp256k1 KeyCurve = "secp256k1"
|
||||
Bls12381 KeyCurve = "bls12381"
|
||||
Keccak256 KeyCurve = "keccak256"
|
||||
)
|
||||
|
||||
// String returns the string representation of KeyCurve
|
||||
func (rcv KeyCurve) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(KeyCurve)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyCurve.
|
||||
func (rcv *KeyCurve) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "p256":
|
||||
*rcv = P256
|
||||
case "p384":
|
||||
*rcv = P384
|
||||
case "p521":
|
||||
*rcv = P521
|
||||
case "x25519":
|
||||
*rcv = X25519
|
||||
case "x448":
|
||||
*rcv = X448
|
||||
case "ed25519":
|
||||
*rcv = Ed25519
|
||||
case "ed448":
|
||||
*rcv = Ed448
|
||||
case "secp256k1":
|
||||
*rcv = Secp256k1
|
||||
case "bls12381":
|
||||
*rcv = Bls12381
|
||||
case "keccak256":
|
||||
*rcv = Keccak256
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid KeyCurve`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package keyencoding
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type KeyEncoding string
|
||||
|
||||
const (
|
||||
Raw KeyEncoding = "raw"
|
||||
Hex KeyEncoding = "hex"
|
||||
Multibase KeyEncoding = "multibase"
|
||||
)
|
||||
|
||||
// String returns the string representation of KeyEncoding
|
||||
func (rcv KeyEncoding) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(KeyEncoding)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyEncoding.
|
||||
func (rcv *KeyEncoding) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "raw":
|
||||
*rcv = Raw
|
||||
case "hex":
|
||||
*rcv = Hex
|
||||
case "multibase":
|
||||
*rcv = Multibase
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid KeyEncoding`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package keyrole
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type KeyRole string
|
||||
|
||||
const (
|
||||
Authentication KeyRole = "authentication"
|
||||
Assertion KeyRole = "assertion"
|
||||
Delegation KeyRole = "delegation"
|
||||
Invocation KeyRole = "invocation"
|
||||
)
|
||||
|
||||
// String returns the string representation of KeyRole
|
||||
func (rcv KeyRole) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(KeyRole)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyRole.
|
||||
func (rcv *KeyRole) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "authentication":
|
||||
*rcv = Authentication
|
||||
case "assertion":
|
||||
*rcv = Assertion
|
||||
case "delegation":
|
||||
*rcv = Delegation
|
||||
case "invocation":
|
||||
*rcv = Invocation
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid KeyRole`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user