From 24b132b49749a85042a988a4ffcea08506ce1c5c Mon Sep 17 00:00:00 2001 From: Thomas Miceli Date: Wed, 15 Mar 2023 12:59:18 +0100 Subject: [PATCH] Better responsive gist header --- templates/base/gist_header.html | 171 +++++++++++++++----------------- templates/pages/all.html | 24 ++--- templates/pages/edit.html | 44 ++++++-- 3 files changed, 127 insertions(+), 112 deletions(-) diff --git a/templates/base/gist_header.html b/templates/base/gist_header.html index 6c2f6f0..1299d65 100644 --- a/templates/base/gist_header.html +++ b/templates/base/gist_header.html @@ -1,113 +1,98 @@ {{ define "gist_header" }}
-
- -

- {{ .gist.User.Username }} / {{ .gist.Title }} -

- {{ if .userLogged }} -
- {{ .csrfHtml }} - + + {{ .gist.NbLikes }} + +
+ {{ if ne .userLogged.ID .gist.User.ID }} + + {{ end }} + {{ else }} + + + {{ end }} + {{ if .userLogged }}{{ if eq .gist.User.Username .userLogged.Username }} + + + {{ .csrfHtml }} + - {{ else }} - - - {{ end }} - {{ if .userLogged }}{{ if eq .gist.User.Username .userLogged.Username }} -
- {{ .csrfHtml }} - -
- - -
- - - - - Edit - -
-
- {{ .csrfHtml }} - -
- {{ end }}{{ end }} + {{ end }}{{ end }} +
{{ if .gist.Forked }}

Forked from {{ .gist.Forked.User.Username }}/{{ .gist.Forked.Title }}

{{ end }} -

Last active {{ .gist.UpdatedAt }} • - {{ if .gist.Private }} Unlisted - {{else}} Public {{ end }} +

Last active {{ .gist.UpdatedAt }} + {{ if .gist.Private }} • Unlisted {{ end }}

{{ .gist.Description }}

@@ -144,7 +129,7 @@
- + Download ZIP diff --git a/templates/pages/all.html b/templates/pages/all.html index fbb9360..f408413 100644 --- a/templates/pages/all.html +++ b/templates/pages/all.html @@ -7,7 +7,7 @@
- + +
+ {{ .csrfHtml }} + +
+
+
-
+
-
+