aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates
diff options
context:
space:
mode:
authorConfuSomu2023-07-18 00:00:20 +0200
committerConfuSomu2023-07-18 00:00:20 +0200
commit5ed7d9b53a65aec1f4793f62ac15195c44224b39 (patch)
tree20f59b643ab185abc8eeecb6338d565ed36febda /src/templates
parente322946df7c33f76dbee46ec5b8e2118fbae8a26 (diff)
downloadActorViewer-5ed7d9b53a65aec1f4793f62ac15195c44224b39.tar
ActorViewer-5ed7d9b53a65aec1f4793f62ac15195c44224b39.tar.gz
ActorViewer-5ed7d9b53a65aec1f4793f62ac15195c44224b39.zip
Implement Question object type support
This commit adds support for dealing with ActivityPub Questions, which are polls. They are like Notes (posts) but contain a few more keys that record information about the poll options, number of votes and poll closure date.
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/appoll.html9
-rw-r--r--src/templates/appoll_item.html1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/templates/appoll.html b/src/templates/appoll.html
new file mode 100644
index 0000000..7d5bb87
--- /dev/null
+++ b/src/templates/appoll.html
@@ -0,0 +1,9 @@
+<h2>Poll</h2>
+<ul>
+ <li id="poll-end-time"><b>End time:</b> {{end-time}}</li>
+ <li id="poll-closed-time"><b>Closed:</b> {{closed-time}}</li>
+ <li id="poll-votes"><b>Total votes:</b> {{total-votes}}</li>
+</ul>
+
+<h3>Poll options</h3>
+<ul id="poll-choices">{{options}}</ul>
diff --git a/src/templates/appoll_item.html b/src/templates/appoll_item.html
new file mode 100644
index 0000000..2ce6967
--- /dev/null
+++ b/src/templates/appoll_item.html
@@ -0,0 +1 @@
+<li><b>{{name}}</b> {{votes}} votes ({{votes-percent}}%)</li>