mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
* **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>
125 lines
4.0 KiB
Templ
125 lines
4.0 KiB
Templ
package styles
|
|
|
|
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>
|
|
@Fonts()
|
|
@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>
|
|
@Fonts()
|
|
@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>
|
|
}
|