From c390a0c32720f6afe852bc7a3a3f64c3afe9e401 Mon Sep 17 00:00:00 2001 From: r Date: Fri, 11 Feb 2022 11:18:02 +0000 Subject: Add lists --- templates/about.tmpl | 4 +-- templates/list.tmpl | 63 +++++++++++++++++++++++++++++++++++++++++++++ templates/lists.tmpl | 35 +++++++++++++++++++++++++ templates/nav.tmpl | 9 ++++--- templates/userlist.tmpl | 14 +--------- templates/userlistitem.tmpl | 15 +++++++++++ 6 files changed, 121 insertions(+), 19 deletions(-) create mode 100644 templates/list.tmpl create mode 100644 templates/lists.tmpl create mode 100644 templates/userlistitem.tmpl (limited to 'templates') diff --git a/templates/about.tmpl b/templates/about.tmpl index 54316cf..0e4d001 100644 --- a/templates/about.tmpl +++ b/templates/about.tmpl @@ -46,11 +46,11 @@ 6 - Settings + Lists 7 - Signout + Settings 8 diff --git a/templates/list.tmpl b/templates/list.tmpl new file mode 100644 index 0000000..1b15278 --- /dev/null +++ b/templates/list.tmpl @@ -0,0 +1,63 @@ +{{with .Data}} +{{template "header.tmpl" (WithContext .CommonData $.Ctx)}} +
List {{.List.Title}}
+ +
+ + + + +
+ +
Users
+{{if .Accounts}} + +{{range .Accounts}} + + + + +{{end}} +
{{template "userlistitem.tmpl" (WithContext . $.Ctx)}} +
+ + + +
+
+{{else}} +
No data found
+{{end}} + +
Add user
+
+ + + + + +
+ +{{if .Q}} +{{if .SearchAccounts}} + +{{range .SearchAccounts}} + + + + +{{end}} +
{{template "userlistitem.tmpl" (WithContext . $.Ctx)}} +
+ + + +
+
+{{else}} +
No data found
+{{end}} +{{end}} + +{{template "footer.tmpl"}} +{{end}} diff --git a/templates/lists.tmpl b/templates/lists.tmpl new file mode 100644 index 0000000..27979cb --- /dev/null +++ b/templates/lists.tmpl @@ -0,0 +1,35 @@ +{{with .Data}} +{{template "header.tmpl" (WithContext .CommonData $.Ctx)}} +
Lists
+ +{{range .Lists}} +
+ {{.Title}} timeline + - +
+ +
+ - +
+ + + +
+
+{{else}} +
No data found
+{{end}} + +
Add list
+
+ + + + + + + +
+ +{{template "footer.tmpl"}} +{{end}} diff --git a/templates/nav.tmpl b/templates/nav.tmpl index ea18a5f..e7a7981 100644 --- a/templates/nav.tmpl +++ b/templates/nav.tmpl @@ -17,16 +17,17 @@ home direct local - twkn - remote + twkn + remote search
- settings + lists + settings
- +
about
diff --git a/templates/userlist.tmpl b/templates/userlist.tmpl index b8e0e5d..f206397 100644 --- a/templates/userlist.tmpl +++ b/templates/userlist.tmpl @@ -1,19 +1,7 @@ {{with .Data}}
{{range .}} -
-
- - avatar - -
-
-
{{EmojiFilter (html .DisplayName) .Emojis}}
- -
@{{.Acct}}
-
-
-
+ {{template "userlistitem.tmpl" (WithContext . $.Ctx)}} {{else}}
No data found
{{end}} diff --git a/templates/userlistitem.tmpl b/templates/userlistitem.tmpl new file mode 100644 index 0000000..51261c8 --- /dev/null +++ b/templates/userlistitem.tmpl @@ -0,0 +1,15 @@ +{{with .Data}} +
+
+ + avatar + +
+
+
{{EmojiFilter (html .DisplayName) .Emojis}}
+ +
@{{.Acct}}
+
+
+
+{{end}} -- cgit v1.2.3