fix: remove line-clamp from tailwind config

This commit is contained in:
Prad Nukala 2024-12-08 21:45:37 -05:00
parent 38ca7b246b
commit 5c3966a9d6
10 changed files with 162 additions and 37 deletions

View File

@ -40,10 +40,16 @@
"gum spin --title='Uploading to Bucket' -- make deploy-cdn"
],
"devnet:start": [
"process-compose up -f deploy/devnet/process-compose.yaml --detached --hide-disabled"
"process-compose up -f deploy/devnet/process-compose.yaml"
],
"devnet:attach": [
"cd deploy/devnet",
"process-compose attach"
],
"devnet:stop": [
"cd deploy/devnet",
"process-compose down "
],
"devnet:attach": ["cd deploy/devnet", "process-compose attach"],
"devnet:stop": ["cd deploy/devnet", "process-compose down "],
"testnet:start": [
"process-compose up -f deploy/testnet/process-compose.yaml --detached --hide-disabled"
],

View File

@ -0,0 +1,31 @@
package cards
templ ProfileCard(address string, handle string, name string, chainID string, creationBlock string) {
<div class="profile-card">
<div class="text-white max-w-xs my-auto mx-auto bg-gradient-to-r from-blue-900 to-blue-500 p-4 py-5 px-5 rounded-xl">
<div class="flex justify-between">
<div>
<h2>{ chainID }</h2>
<p class="text-2xl font-bold">{ handle }</p>
</div>
<div class="flex items-center ">
<div class="p-5 bg-gray-200 bg-opacity-40 rounded-full"></div>
<div class="p-5 bg-gray-200 bg-opacity-30 rounded-full -ml-4"></div>
</div>
</div>
<div class="mt-5 flex justify-between items-center w-52">
<span class="text-lg">{ address }</span>
</div>
<div class="flex justify-between mt-5 w-48 ">
<div>
<h3 class="text-xs">Block Created </h3>
<p class="font-bold"><span>#</span>{ creationBlock }</p>
</div>
<div>
<h3 class="text-xs">Issued to</h3>
<p class="font-bold">{ name }</p>
</div>
</div>
</div>
</div>
}

View File

@ -0,0 +1,105 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.793
package cards
//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 ProfileCard(address string, handle string, name string, chainID string, creationBlock 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 class=\"profile-card\"><div class=\"text-white max-w-xs my-auto mx-auto bg-gradient-to-r from-blue-900 to-blue-500 p-4 py-5 px-5 rounded-xl\"><div class=\"flex justify-between\"><div><h2>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(chainID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile-card.templ`, Line: 8, Col: 18}
}
_, 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("</h2><p class=\"text-2xl font-bold\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(handle)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile-card.templ`, Line: 9, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p></div><div class=\"flex items-center \"><div class=\"p-5 bg-gray-200 bg-opacity-40 rounded-full\"></div><div class=\"p-5 bg-gray-200 bg-opacity-30 rounded-full -ml-4\"></div></div></div><div class=\"mt-5 flex justify-between items-center w-52\"><span class=\"text-lg\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(address)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile-card.templ`, Line: 17, Col: 35}
}
_, 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("</span></div><div class=\"flex justify-between mt-5 w-48 \"><div><h3 class=\"text-xs\">Block Created </h3><p class=\"font-bold\"><span>#</span>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(creationBlock)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile-card.templ`, Line: 22, Col: 55}
}
_, 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><div><h3 class=\"text-xs\">Issued to</h3><p class=\"font-bold\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/blocks/cards/profile-card.templ`, Line: 26, Col: 32}
}
_, 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("</p></div></div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate

View File

@ -18,7 +18,7 @@ var (
// Tailwind css dependencies
templ Tailwind() {
@tailwindHandle.Once() {
<script src="https://cdn.tailwindcss.com?plugins=typography,aspect-ratio,line-clamp,container-queries"></script>
<script src="https://cdn.tailwindcss.com?plugins=typography,aspect-ratio,container-queries"></script>
<script src="https://kit.fontawesome.com/9909219bb5.js" crossorigin="anonymous"></script>
}
}

View File

@ -57,7 +57,7 @@ func Tailwind() templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script src=\"https://cdn.tailwindcss.com?plugins=typography,aspect-ratio,line-clamp,container-queries\"></script> <script src=\"https://kit.fontawesome.com/9909219bb5.js\" crossorigin=\"anonymous\"></script>")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script src=\"https://cdn.tailwindcss.com?plugins=typography,aspect-ratio,container-queries\"></script> <script src=\"https://kit.fontawesome.com/9909219bb5.js\" crossorigin=\"anonymous\"></script>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View File

@ -1,8 +1,6 @@
package handlers
import (
"net/http"
"github.com/labstack/echo/v4"
"github.com/onsonr/sonr/pkg/common/response"
"github.com/onsonr/sonr/pkg/gateway/internal/pages/index"
@ -10,13 +8,10 @@ import (
)
func HandleIndex(c echo.Context) error {
if isInitial(c) {
return response.TemplEcho(c, index.InitialView())
}
if isExpired(c) {
return response.TemplEcho(c, index.ReturningView())
}
return c.Render(http.StatusOK, "index.templ", nil)
return response.TemplEcho(c, index.InitialView())
}
// ╭─────────────────────────────────────────────────────────╮

View File

@ -28,8 +28,7 @@ func HandleRegisterStart(c echo.Context) error {
return echo.NewHTTPError(http.StatusInternalServerError, err.Error())
}
req := getLinkCredentialRequest(c, ks.Address(), handle, ks.UserJSON())
return response.TemplEcho(c, register.LinkCredentialView(req))
return response.TemplEcho(c, register.LinkCredentialView(ks.Address(), handle))
}
func HandleRegisterFinish(c echo.Context) error {

View File

@ -21,16 +21,14 @@ templ ProfileFormView(turnstileSiteKey string) {
}
}
templ LinkCredentialView(req LinkCredentialRequest) {
templ LinkCredentialView(addr string, handle string) {
@layout.Root("Register | Sonr.ID") {
@layout.Container() {
@text.Header("Link a PassKey", "This will be used to login to your vault.")
@form.Form("/register/finish", "POST", form.PasskeyInput("passkey"), "65", false) {
@details.PropertyList() {
@details.Property("Address", req.Address, "wallet")
@details.Property("Handle", req.Handle, "at-sign")
@details.Property("Platform", req.Platform, "device-iphone")
@details.Property("Model", req.DeviceModel, "laptop")
@details.Property("Address", addr, "wallet")
@details.Property("Handle", handle, "at-sign")
}
}
}

View File

@ -122,7 +122,7 @@ func ProfileFormView(turnstileSiteKey string) templ.Component {
})
}
func LinkCredentialView(req LinkCredentialRequest) templ.Component {
func LinkCredentialView(addr string, handle 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 {
@ -199,7 +199,7 @@ func LinkCredentialView(req LinkCredentialRequest) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = details.Property("Address", req.Address, "wallet").Render(ctx, templ_7745c5c3_Buffer)
templ_7745c5c3_Err = details.Property("Address", addr, "wallet").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -207,23 +207,7 @@ func LinkCredentialView(req LinkCredentialRequest) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = details.Property("Handle", req.Handle, "at-sign").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 = details.Property("Platform", req.Platform, "device-iphone").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 = details.Property("Model", req.DeviceModel, "laptop").Render(ctx, templ_7745c5c3_Buffer)
templ_7745c5c3_Err = details.Property("Handle", handle, "at-sign").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View File

@ -1,6 +1,7 @@
package session
import (
"fmt"
"regexp"
"strings"
@ -33,6 +34,12 @@ func (s *HTTPContext) InitSession() error {
return err
}
}
fmt.Println(sess.BrowserName)
fmt.Println(sess.BrowserVersion)
fmt.Println(sess.UserArchitecture)
fmt.Println(sess.Platform)
fmt.Println(sess.PlatformVersion)
fmt.Println(sess.DeviceModel)
s.sess = &sess
return nil