diff options
author | FChannel0 <77419041+FChannel0@users.noreply.github.com> | 2021-07-03 16:16:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 16:16:22 -0700 |
commit | 875ee4c53d79918ac87d1ce3e208ad27db6c0a90 (patch) | |
tree | fef9e3a94b09f356711fce887a42d405338dffb8 /static | |
parent | 9bd4e03d926c045dc82ce844cb02b078843ce787 (diff) | |
parent | fc8b4d6517213a371e26938ff2c0319d5e5f459a (diff) |
Merge pull request #27 from knotteye/master
Home page improvements and news system
Diffstat (limited to 'static')
-rw-r--r-- | static/anews.html | 46 | ||||
-rw-r--r-- | static/index.html | 41 | ||||
-rw-r--r-- | static/nadmin.html | 8 | ||||
-rw-r--r-- | static/news.html | 32 |
4 files changed, 123 insertions, 4 deletions
diff --git a/static/anews.html b/static/anews.html new file mode 100644 index 0000000..127760a --- /dev/null +++ b/static/anews.html @@ -0,0 +1,46 @@ +{{ 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> + {{ if $.Board.ModCred }}<a href="/{{ $.Key }}/newsdelete/{{ $e.Time }}">[Delete] </a>{{end}} + <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 ab0bea0..61aeab8 100644 --- a/static/index.html +++ b/static/index.html @@ -1,6 +1,6 @@ {{ define "header" }} <title>{{ .Title }}</title> -<meta name="description" content="{{ .Message }}"> +<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" /> @@ -8,10 +8,10 @@ <meta property="og:site_name" content="{{ .Board.Actor.PreferredUsername }}" /> <meta property="og:title" content="{{ .Title }}"> -<meta property="og:description" content="{{ .Message }}"> +<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="{{ .Message }}"> +<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 }} @@ -20,7 +20,40 @@ {{ define "content" }} <div style="text-align: center; max-width: 800px; margin: 0 auto;"> <h1>{{ .Title }}</h1> - <p style="text-align: justify">{{.MessageHTML}}</p> + <p style="text-align: justify">{{ .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 <a href="https://github.com/FChannel0">here</a>.</p> + + <div style="margin-top:50px;"> + + <div style="display: grid;border-right: 2px solid #820404"> + <div style="display: inline-grid;grid-column: 1 / 4;border-bottom: 2px solid #820404;border-left: 2px solid #820404;border-top: 2px solid #820404;"><span style="font-size: 1.5em;font-weight: bold;">Local boards</span></div> + {{ range .Boards }} + <div style="whitespace: nowrap;display: inline-grid;text-align: left;padding: 5px;border-bottom: 2px solid #820404;border-left: 2px solid #820404;"><a href="{{.Location}}">{{.Name}} - {{.PrefName}}</a></div> + {{ end }} + {{ range .BoardRemainer }} + <div style="whitespace: nowrap;display: inline-grid;text-align: left;padding: 5px;border-bottom: 2px solid #820404;border-left: 2px solid #820404;"></div> + {{ end }} + </div> + + </div> + + <div style="margin-top:50px;"> + <table align="center" style="text-align: left;"> + <th> + <tr><a href="/news">{{ .PreferredUsername }} news</a></tr> + </th> + + {{ range $i, $e := .NewsItems }} + <tr> + <td>{{ if $.Board.ModCred }}<a href="/{{ $.Key }}/newsdelete/{{ $e.Time }}">[Delete] </a>{{end}} + <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 style="margin-top:50px;"> <table align="center" style="text-align: left;"> 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 @@ <option value="False">False</option> </select> </form> + + <h3>Post News</h3> + <form id="news" action="/{{ .Key }}/postnews" method="post" enctype="application/x-www-form-urlencoded"> + <label>Title:</label><br> + <input type="text" name="title" placeholder="{{.Actor}} was created!" required><input type="submit" value="Post"><br> + <label>Content:</label><br> + <textarea name="summary" rows="8" cols="50"></textarea><br> + </form> <ul style="display: inline-block; padding: 0;"> <li style="display: inline-block;"><a href="#following">Subscribed</a></li> 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>{{ .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: left; max-width: 800px; margin: 0 auto;"> + + {{ range .NewsItems }} + <p><h1>{{unixtoreadable .Time}} - {{.Title}}</h1><br>{{.Content}}</p> + {{ end }} + +</div> +{{ end }} +{{ define "bottom" }}{{ end }} + +{{ define "script" }} +{{ end }} |