From 9566898415cd5ff0cfb7b4bb0d57944c403ffbed Mon Sep 17 00:00:00 2001
From: Anirudh Oppiliappan
Date: Fri, 14 Feb 2025 16:07:00 +0200
Subject: [PATCH] more htmxing
---
appview/pages/templates/knot.html | 4 +-
appview/pages/templates/knots.html | 67 ++++++++++++---------
appview/pages/templates/layouts/topbar.html | 57 +++++++++++++-----
appview/pages/templates/new-repo.html | 23 ++++---
appview/pages/templates/repo/settings.html | 30 ++++-----
appview/pages/templates/settings/keys.html | 33 +++++-----
appview/pages/templates/user/login.html | 7 +--
input.css | 22 +++----
8 files changed, 141 insertions(+), 102 deletions(-)
diff --git a/appview/pages/templates/knot.html b/appview/pages/templates/knot.html
index e8eb5aa9..6539382e 100644
--- a/appview/pages/templates/knot.html
+++ b/appview/pages/templates/knot.html
@@ -14,7 +14,7 @@
registered on: {{.Registration.Registered}}
{{ else }}
pending registration
-
+
{{ end }}
@@ -34,7 +34,7 @@
{{ end }}
{{end}}
diff --git a/appview/pages/templates/knots.html b/appview/pages/templates/knots.html
index 6d8aaa67..474b88aa 100644
--- a/appview/pages/templates/knots.html
+++ b/appview/pages/templates/knots.html
@@ -1,45 +1,56 @@
-{{define "title"}}knots{{end}}
+{{ define "title" }}knots{{ end }}
-{{define "content"}}
+{{ define "content" }}
knots
register
put in a domain, and use the key while booting up your knotserver
my knots
pending registrations
- {{range .Registrations}}
- {{ if not .Registered }}
- -
-
domain: {{.Domain}}
- opened by: {{.ByDid}}
- on: {{.Created}}
- pending registration
-
-
- {{ end }}
- {{else}}
+ {{ range .Registrations }}
+ {{ if not .Registered }}
+ -
+
domain:
+ {{ .Domain }}
+ opened by: {{ .ByDid }}
+ on: {{ .Created }}
+ pending registration
+
+
+ {{ end }}
+ {{ else }}
no registrations yet
- {{end}}
+ {{ end }}
-{{end}}
+{{ end }}
diff --git a/appview/pages/templates/layouts/topbar.html b/appview/pages/templates/layouts/topbar.html
index 1d1771bb..b566200d 100644
--- a/appview/pages/templates/layouts/topbar.html
+++ b/appview/pages/templates/layouts/topbar.html
@@ -1,19 +1,48 @@
{{ define "layouts/topbar" }}
-
-{{ with .LoggedInUser }}
-
-{{ else }}
-
-{{ end }}
{{ end }}
diff --git a/appview/pages/templates/new-repo.html b/appview/pages/templates/new-repo.html
index 5482f279..c82830df 100644
--- a/appview/pages/templates/new-repo.html
+++ b/appview/pages/templates/new-repo.html
@@ -1,15 +1,14 @@
-{{define "title"}}new repo{{end}}
+{{ define "title" }}new repo{{ end }}
-{{define "content"}}
-new repo
-
-{{end}}
+
+
+
+
+{{ end }}
diff --git a/appview/pages/templates/repo/settings.html b/appview/pages/templates/repo/settings.html
index f070e049..0d14ac6c 100644
--- a/appview/pages/templates/repo/settings.html
+++ b/appview/pages/templates/repo/settings.html
@@ -2,22 +2,22 @@
settings
collaborators
- {{ range .Collaborators }}
- -
- {{ index . 0 }} - {{ index . 3 }}
-
- {{ else }}
- no members
- {{ end }}
+ {{ range .Collaborators }}
+ -
+ {{ index . 0 }} -
+ {{ index . 3 }}
+
+ {{ else }}
+ no members
+ {{ end }}
{{ if .IsCollaboratorInviteAllowed }}
- add collaborator
-
+ add collaborator
+
{{ end }}
-{{end}}
-
+{{ end }}
diff --git a/appview/pages/templates/settings/keys.html b/appview/pages/templates/settings/keys.html
index 1c005800..0fa89b44 100644
--- a/appview/pages/templates/settings/keys.html
+++ b/appview/pages/templates/settings/keys.html
@@ -1,33 +1,38 @@
-{{define "title"}}settings{{end}}
+{{ define "title" }}settings{{ end }}
-{{define "content"}}
+{{ define "content" }}
settings
profile
- handle: {{.LoggedInUser.Handle}}
- did: {{.LoggedInUser.Did}}
- pds: {{.LoggedInUser.Pds}}
+ handle: {{ .LoggedInUser.Handle }}
+ did: {{ .LoggedInUser.Did }}
+ pds: {{ .LoggedInUser.Pds }}
ssh keys
existing keys
- {{range .PubKeys}}
+ {{ range .PubKeys }}
-
- {{.Name}}
- {{.Key}}
+ {{ .Name }}
+ {{ .Key }}
- {{else}}
+ {{ else }}
no ssh keys added yet
- {{end}}
+ {{ end }}
-{{end}}
+{{ end }}
diff --git a/appview/pages/templates/user/login.html b/appview/pages/templates/user/login.html
index 7451552e..547ecfe3 100644
--- a/appview/pages/templates/user/login.html
+++ b/appview/pages/templates/user/login.html
@@ -26,12 +26,7 @@
required
/>
-
+