From 1d75bf7489527925217bd5611ba7910c0ffe077c Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Tue, 9 Apr 2024 18:39:14 -0400 Subject: profiles (#7) Reviewed-on: https://git.hatecomputers.club/hatecomputers/hatecomputers.club/pulls/7 Co-authored-by: Elizabeth Co-committed-by: Elizabeth --- templates/api_keys.html | 7 ------- templates/base.html | 15 ++++++++++++++- templates/dns.html | 14 +------------- templates/guestbook.html | 9 --------- templates/home.html | 18 +++++++++++++++++- templates/profile.html | 24 ++++++++++++++++++++++++ 6 files changed, 56 insertions(+), 31 deletions(-) create mode 100644 templates/profile.html (limited to 'templates') diff --git a/templates/api_keys.html b/templates/api_keys.html index cd4d274..018fda3 100644 --- a/templates/api_keys.html +++ b/templates/api_keys.html @@ -28,12 +28,5 @@

generate key.


- {{ if .FormError }} - {{ if (len .FormError.Errors) }} - {{ range $error := .FormError.Errors }} -
{{ $error }}
- {{ end }} - {{ end }} - {{ end }} {{ end }} diff --git a/templates/base.html b/templates/base.html index 9f5a903..89d6dd2 100644 --- a/templates/base.html +++ b/templates/base.html @@ -37,7 +37,9 @@ | api keys. | - logout, {{ .User.DisplayName }}. + {{ .User.DisplayName }}. + | + logout. {{ else }} login. @@ -46,6 +48,17 @@
+ {{ if and .Success (gt (len .Success.Messages) 0) }} + {{ range $message := .Success.Messages }} +
{{ $message }}
+ {{ end }} + {{ end }} + {{ if and .Error (gt (len .Error.Messages) 0) }} + {{ range $error := .Error.Messages }} +
{{ $error }}
+ {{ end }} + {{ end }} + {{ template "content" . }}
diff --git a/templates/dns.html b/templates/dns.html index d16ed89..2f3f0a7 100644 --- a/templates/dns.html +++ b/templates/dns.html @@ -76,18 +76,6 @@ {{ end }} /> - - - - - {{ if .FormError }} - {{ if (len .FormError.Errors) }} - {{ range $error := .FormError.Errors }} -
{{ $error }}
- {{ end }} - {{ end }} - {{ end }} + - - {{ end }} diff --git a/templates/guestbook.html b/templates/guestbook.html index 85727c7..d1f4417 100644 --- a/templates/guestbook.html +++ b/templates/guestbook.html @@ -21,18 +21,9 @@

-
- {{ if .FormError }} - {{ if (len .FormError.Errors) }} - {{ range $error := .FormError.Errors }} -
{{ $error }}
- {{ end }} - {{ end }} - {{ end }}
diff --git a/templates/home.html b/templates/home.html index 1c03377..76bbc6a 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,3 +1,19 @@ {{ define "content" }} -

under construction!

+

hello there!

+

current peeps in the club :D

+
+ {{ range $user := .Users }} +
+
+
+
+
+
name: {{ $user.Username }}
+
pronouns: {{ $user.Pronouns }}
+ +
{{ $user.Bio }}
+
+
+ {{ end }} +
{{ end }} diff --git a/templates/profile.html b/templates/profile.html new file mode 100644 index 0000000..a6e1b68 --- /dev/null +++ b/templates/profile.html @@ -0,0 +1,24 @@ +{{ define "content" }} + +

hey {{ .Profile.DisplayName }}

+
+
+ + + + + + + + + + + + + + + + +
+ +{{ end }} -- cgit v1.2.3-70-g09d2