From 638a03b458b71564b1db439e6386d7dbf2a5181c Mon Sep 17 00:00:00 2001 From: knotteye Date: Thu, 1 Jul 2021 14:39:44 -0500 Subject: linkify text and use imageboard name to identify it --- static/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'static') diff --git a/static/index.html b/static/index.html index 502e527..19c5da2 100644 --- a/static/index.html +++ b/static/index.html @@ -1,6 +1,6 @@ {{ define "header" }} {{ .Title }} - + @@ -8,10 +8,10 @@ - + - + {{ end }} @@ -20,7 +20,7 @@ {{ define "content" }}

{{ .Title }}

-

{{.Message}}

+

{{ .PreferredUsername }} is a federated image board based on activitypub. The current version of the code running the server is still a work in progress, expect a bumpy ride for the time being. Get the server code here.

@@ -30,7 +30,7 @@ {{ range .InstanceIndex }} - + {{ end }}
{{ .Id }}{{ .Id }}
-- cgit v1.2.3 From 4e3848cadbb3fd89b94a7ef24838173939d198db Mon Sep 17 00:00:00 2001 From: knotteye Date: Thu, 1 Jul 2021 17:56:04 -0500 Subject: Add a list of local boards and server news --- static/index.html | 28 ++++++++++++++++++++++++++++ static/nadmin.html | 8 ++++++++ 2 files changed, 36 insertions(+) (limited to 'static') diff --git a/static/index.html b/static/index.html index 19c5da2..de06c6c 100644 --- a/static/index.html +++ b/static/index.html @@ -22,6 +22,34 @@

{{ .Title }}

{{ .PreferredUsername }} is a federated image board based on activitypub. The current version of the code running the server is still a work in progress, expect a bumpy ride for the time being. Get the server code here.

+
+ + Local boards + + + {{ range .Boards }} + + + + {{ end }} +
+
{{.Name}} - {{.PrefName}}
+
+ +
+ + {{ .PreferredUsername }} news + + + {{ range .NewsItems }} + + + + {{ end }} +
+

{{.Time}} - {{.Title}}
{{.Content}}

+
+
- + {{ end }}
diff --git a/static/nadmin.html b/static/nadmin.html index 984eb76..877e1e5 100644 --- a/static/nadmin.html +++ b/static/nadmin.html @@ -17,6 +17,14 @@ + +

Post News

+
+
+
+
+
+
  • Subscribed
  • -- cgit v1.2.3 From 168225daa21fe494bcd74ab6c90d6498ecf9f1e3 Mon Sep 17 00:00:00 2001 From: knotteye Date: Thu, 1 Jul 2021 20:26:49 -0500 Subject: Make news list links to full page news articles --- static/index.html | 2 +- static/news.html | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 static/news.html (limited to 'static') diff --git a/static/index.html b/static/index.html index de06c6c..05197c0 100644 --- a/static/index.html +++ b/static/index.html @@ -44,7 +44,7 @@ {{ range .NewsItems }}

{{.Time}} - {{.Title}}
{{.Content}}

{{unixtoreadable .Time}} - {{.Title}}
diff --git a/static/news.html b/static/news.html new file mode 100644 index 0000000..757c420 --- /dev/null +++ b/static/news.html @@ -0,0 +1,32 @@ +{{ define "header" }} +{{ .Title }} + + + + + + + + + + + + + + +{{ end }} + +{{ define "top" }}{{ end }} +{{ define "content" }} +
+ + {{ range .NewsItems }} +

{{unixtoreadable .Time}} - {{.Title}}


{{.Content}}

+ {{ end }} + +
+{{ end }} +{{ define "bottom" }}{{ end }} + +{{ define "script" }} +{{ end }} -- cgit v1.2.3 From d98441da108725a76d697e358d161c06783cb066 Mon Sep 17 00:00:00 2001 From: knotteye Date: Fri, 2 Jul 2021 07:43:54 -0500 Subject: Display most recents news item and create a table for boards --- static/index.html | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'static') diff --git a/static/index.html b/static/index.html index 05197c0..518c012 100644 --- a/static/index.html +++ b/static/index.html @@ -23,17 +23,17 @@

{{ .PreferredUsername }} is a federated image board based on activitypub. The current version of the code running the server is still a work in progress, expect a bumpy ride for the time being. Get the server code here.

- - Local boards - +
+
Local boards
{{ range .Boards }} -
- - + {{ end }} -
-
{{.Name}} - {{.PrefName}}
+ {{ range .BoardRemainer }} +
+ {{ end }} +
+
@@ -42,9 +42,13 @@ {{ .PreferredUsername }} news - {{ range .NewsItems }} + {{ range $i, $e := .NewsItems }} - {{unixtoreadable .Time}} - {{.Title}} + {{unixtoreadable $e.Time}} - {{$e.Title}} + {{ if eq $i 0 }} +

{{$e.Content}}

+ {{ end }} + {{ end }} -- cgit v1.2.3 From faae38726dd804e3246514d88f93794c23a0cdb2 Mon Sep 17 00:00:00 2001 From: knotteye Date: Fri, 2 Jul 2021 14:20:16 -0500 Subject: show only the last 3 news items on index, link to a page with all news items --- static/anews.html | 44 ++++++++++++++++++++++++++++++++++++++++++++ static/index.html | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 static/anews.html (limited to 'static') diff --git a/static/anews.html b/static/anews.html new file mode 100644 index 0000000..6527ce5 --- /dev/null +++ b/static/anews.html @@ -0,0 +1,44 @@ +{{ define "header" }} +{{ .Title }} + + + + + + + + + + + + + + +{{ end }} + +{{ define "top" }}{{ end }} +{{ define "content" }} +
+

{{ .Title }}

+ +
+ + + {{ range $i, $e := .NewsItems }} + + + + {{ end }} +
{{unixtoreadable $e.Time}} - {{$e.Title}} + {{ if eq $i 0 }} +

{{$e.Content}}

+ {{ end }} +
+
+ +
+{{ end }} +{{ define "bottom" }}{{ end }} + +{{ define "script" }} +{{ end }} diff --git a/static/index.html b/static/index.html index 518c012..106a6b3 100644 --- a/static/index.html +++ b/static/index.html @@ -39,7 +39,7 @@
{{ .PreferredUsername }} news + {{ .PreferredUsername }} news {{ range $i, $e := .NewsItems }} -- cgit v1.2.3 From fab8de7187571a4f3f8a30966057d661a858b645 Mon Sep 17 00:00:00 2001 From: knotteye Date: Fri, 2 Jul 2021 15:10:49 -0500 Subject: add deletion of news items --- static/anews.html | 4 +++- static/index.html | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'static') diff --git a/static/anews.html b/static/anews.html index 6527ce5..127760a 100644 --- a/static/anews.html +++ b/static/anews.html @@ -26,7 +26,9 @@ {{ range $i, $e := .NewsItems }} - -
-
{{unixtoreadable $e.Time}} - {{$e.Title}} + + {{ if $.Board.ModCred }}[Delete] {{end}} + {{unixtoreadable $e.Time}} - {{$e.Title}} {{ if eq $i 0 }}

{{$e.Content}}

{{ end }} diff --git a/static/index.html b/static/index.html index 106a6b3..61aeab8 100644 --- a/static/index.html +++ b/static/index.html @@ -44,7 +44,8 @@ {{ range $i, $e := .NewsItems }}
{{unixtoreadable $e.Time}} - {{$e.Title}} + {{ if $.Board.ModCred }}[Delete] {{end}} + {{unixtoreadable $e.Time}} - {{$e.Title}} {{ if eq $i 0 }}

{{$e.Content}}

{{ end }} -- cgit v1.2.3