aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorknotteye <knotteye@airmail.cc>2021-07-02 14:20:16 -0500
committerknotteye <knotteye@airmail.cc>2021-07-02 14:20:16 -0500
commitfaae38726dd804e3246514d88f93794c23a0cdb2 (patch)
tree4671606919340098b81c398e8478ba616a0432b1 /static
parentad5f4e9ff7e7ab0abab4a964cbf1626d0cdc3365 (diff)
show only the last 3 news items on index, link to a page with all news items
Diffstat (limited to 'static')
-rw-r--r--static/anews.html44
-rw-r--r--static/index.html2
2 files changed, 45 insertions, 1 deletions
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>{{ .Title }}</title>
+<meta name="description" content="{{ .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: https://github.com/FChannel0.">
+
+<meta property="og:locale" content="en_US" />
+<meta property="og:type" content="website" />
+<meta property="og:url" content="{{ .Board.Domain }}">
+<meta property="og:site_name" content="{{ .Board.Actor.PreferredUsername }}" />
+
+<meta property="og:title" content="{{ .Title }}">
+<meta property="og:description" content="{{ .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: https://github.com/FChannel0.">
+
+<meta name="twitter:title" content="{{ .Title }}">
+<meta name="twitter:description" content="{{ .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: https://github.com/FChannel0.">
+<meta name="twitter:card" content="summary_large_image">
+
+{{ end }}
+
+{{ define "top" }}{{ end }}
+{{ define "content" }}
+<div style="text-align: center; max-width: 800px; margin: 0 auto;">
+ <h1>{{ .Title }}</h1>
+
+ <div style="margin-top:50px;">
+ <table align="center" style="text-align: left;">
+
+ {{ range $i, $e := .NewsItems }}
+ <tr>
+ <td><a href="/news/{{.Time}}">{{unixtoreadable $e.Time}} - {{$e.Title}}</a>
+ {{ if eq $i 0 }}
+ <br><p>{{$e.Content}}</p>
+ {{ end }}
+ </td>
+ </tr>
+ {{ end }}
+ </table>
+ </div>
+
+</div>
+{{ 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 @@
<div style="margin-top:50px;">
<table align="center" style="text-align: left;">
<th>
- <tr>{{ .PreferredUsername }} news</tr>
+ <tr><a href="/news">{{ .PreferredUsername }} news</a></tr>
</th>
{{ range $i, $e := .NewsItems }}