diff options
Diffstat (limited to 'static')
-rw-r--r-- | static/anews.html | 24 | ||||
-rw-r--r-- | static/css/themes/default.css | 6 | ||||
-rw-r--r-- | static/css/themes/gruvbox.css | 7 | ||||
-rw-r--r-- | static/index.html | 2 | ||||
-rw-r--r-- | static/js/posts.js | 1 | ||||
-rw-r--r-- | static/main.html | 4 | ||||
-rw-r--r-- | static/news.html | 8 | ||||
-rw-r--r-- | static/top.html | 14 |
8 files changed, 36 insertions, 30 deletions
diff --git a/static/anews.html b/static/anews.html index 5ebe1cc..355f310 100644 --- a/static/anews.html +++ b/static/anews.html @@ -1,6 +1,6 @@ {{ 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 on the server is still a work-in-progress product, expect a bumpy ride for the time being. Get the server code here: https://github.com/FChannel0."> +<meta name="description" content="{{ .PreferredUsername }} is a federated image board based on ActivityPub. The current version of the code running on the server is still a work-in-progress product, 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" /> @@ -21,23 +21,17 @@ <div style="text-align: center; max-width: 800px; margin: 0 auto;"> <h1>{{ .Title }}</h1> - <div style="margin-top:50px;"> - <table style="text-align: left;"> - + <div class="newsbox" style="margin-top:50px;padding-top:0;"> {{ range $i, $e := .NewsItems }} - <tr> - <td> - <div class="box" style="width:800px; padding: 25px; margin-bottom: 25px;"> - {{ if $.Board.ModCred }}<a href="/{{ $.Key }}/newsdelete/{{ $e.Time }}">[Delete] </a>{{end}} - <a href="/news/{{.Time}}">{{unixtoreadable $e.Time}} - {{$e.Title}}</a> - <br><p style="margin-left: 25px;">{{$e.Content}}</p> - </div> - </td> - </tr> + <div class="newsbox-news"> + <h3><a href="/news/{{.Time}}">{{unixtoreadable $e.Time}} - {{$e.Title}}</a>{{ if $.Board.ModCred }} <a href="/{{ $.Key }}/newsdelete/{{ $e.Time }}">[Delete] </a>{{end}}</h3> + <br> + + <p>{{$e.Content}}</p> + </div> {{ end }} - </table> </div> - + </div> {{ end }} {{ define "bottom" }}{{ end }} diff --git a/static/css/themes/default.css b/static/css/themes/default.css index 24e85e6..ac332f1 100644 --- a/static/css/themes/default.css +++ b/static/css/themes/default.css @@ -151,7 +151,6 @@ a.reply { .newsbox-news { text-align: left; - margin-left: 25px; margin-top: 25px; padding: 25px; } @@ -160,3 +159,8 @@ a.reply { .newsbox-news h3 { margin: 0; } + +#stopTablePost { + float: right; + display: none; +} diff --git a/static/css/themes/gruvbox.css b/static/css/themes/gruvbox.css index fb40267..681991c 100644 --- a/static/css/themes/gruvbox.css +++ b/static/css/themes/gruvbox.css @@ -107,6 +107,7 @@ input[type="text"] { width: min-content; z-index: 9; display: block; + min-width: 300px; } /* TODO: rename */ @@ -129,7 +130,6 @@ input[type="text"] { .newsbox-news { text-align: left; background-color: #504945; - margin-left: 25px; margin-top: 25px; padding: 25px; } @@ -138,3 +138,8 @@ input[type="text"] { .newsbox-news h3 { margin: 0; } + +#stopTablePost { + float: right; + display: none; +} diff --git a/static/index.html b/static/index.html index 8f1d53b..b5fb93c 100644 --- a/static/index.html +++ b/static/index.html @@ -54,10 +54,8 @@ <br> <p>{{$e.Content}}</p> - </td> </div> {{ end }} - </table> </div> {{ end }} diff --git a/static/js/posts.js b/static/js/posts.js index 30f4893..39808dd 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -2,6 +2,7 @@ function startNewPost(){ var el = document.getElementById("newpostbtn"); el.style="display:none;"; el.setAttribute("state", "1"); + document.getElementById("stopTablePost").style=""; document.getElementById("newpost").style = ""; sessionStorage.setItem("newpostState", true); } diff --git a/static/main.html b/static/main.html index 794a602..2b708e9 100644 --- a/static/main.html +++ b/static/main.html @@ -10,7 +10,7 @@ <link rel="icon" type="image/png" href="/static/favicon.png"> <link rel="stylesheet" type="text/css" href="/static/css/themes/default.css" title="default"> {{ range .Themes }} - <link rel="alternate stylesheet" type="text/css" href="/static/css/themes/{{.}}.css" title="{{.}}"> + <link rel="alternate stylesheet" type="text/css" href="/static/css/themes/{{.}}.css" title="{{.}}" disabled> {{ end }} {{ template "header" . }} </head> @@ -41,9 +41,11 @@ {{ template "bottom" . }} + <br> <div style="float: right;"> Theme: <select id="themeSwitcher" onchange="setTheme(this.options[this.selectedIndex].value)"> + <option value="default">default</option> {{ range .Themes }} <option value="{{.}}">{{.}}</option> {{ end }} diff --git a/static/news.html b/static/news.html index 65ae410..a83c406 100644 --- a/static/news.html +++ b/static/news.html @@ -1,6 +1,6 @@ {{ 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 on the server is still a work-in-progress product, expect a bumpy ride for the time being. Get the server code here: https://github.com/FChannel0."> +<meta name="description" content="{{ .PreferredUsername }} is a federated image board based on ActivityPub. The current version of the code running on the server is still a work-in-progress product, 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" /> @@ -18,12 +18,14 @@ {{ define "top" }}{{ end }} {{ define "content" }} -<div style="text-align: left; max-width: 800px; margin: 0 auto;"> +<div class="newsbox" style="text-align: left; max-width: 800px; margin: 0 auto;margin-top: 50px;padding-top:0;"> {{ range .NewsItems }} + <div class="newsbox-news"> <p><h1>{{unixtoreadable .Time}} - {{.Title}}</h1><br>{{.Content}}</p> + </div> {{ end }} - + </div> {{ end }} {{ define "bottom" }}{{ end }} diff --git a/static/top.html b/static/top.html index 94abad7..0e265d8 100644 --- a/static/top.html +++ b/static/top.html @@ -1,13 +1,13 @@ {{ define "top" }} -<div style="margin: 0 auto; width: 700px; margin-bottom: 100px;"> +<div style="margin: 0 auto; width: 700px;"> <h1 style="text-align: center;">/{{ .Board.Name }}/ - {{ .Board.PrefName }}</h1> <p style="text-align: center;">{{ .Board.Summary }}</p> {{ $len := len .Posts }} {{ if eq $len 0 }} {{ if .Board.InReplyTo }} - <h3 id="newpostbtn" state="0" style="display: none;"><a href="javascript:startNewPost()">[Post a Reply]</a></h3> + <h3 id="newpostbtn" state="0" style="display: none; margin-bottom:100px;"><a href="javascript:startNewPost()">[Post a Reply]</a></h3> {{ else }} - <h3 id="newpostbtn" state="0" style="display: none;"><a href="javascript:startNewPost()">[Start a New Thread]</a></h3> + <h3 id="newpostbtn" state="0" style="display: none; margin-bottom:100px;"><a href="javascript:startNewPost()">[Start a New Thread]</a></h3> {{ end }} <!-- end if inreplyto--> <div id="newpost"> <form onsubmit="sessionStorage.setItem('element-closed-reply', true)" id="new-post" action="/post" method="post" enctype="multipart/form-data"> @@ -16,7 +16,7 @@ <tr> <td><label for="name">Name:</label></td> <td><input type="text" id="name" name="name" placeholder="Anonymous" maxlength="100"> - <a onclick="stopNewPost()" style="float: right;">[X]</a> + <a id="stopTablePost" onclick="stopNewPost()">[X]</a> </td> </tr> <tr> @@ -61,9 +61,9 @@ {{ if eq (index .Posts 0).Type "Note" }} {{ if .Board.InReplyTo }} - <h3 id="newpostbtn" state="0" style="text-align: center; margin-top: 80px; display: none;"><a href="javascript:startNewPost()">[Post a Reply]</a></h3> + <h3 id="newpostbtn" state="0" style="text-align: center; margin-top: 80px; display: none; margin-bottom:100px;"><a href="javascript:startNewPost()">[Post a Reply]</a></h3> {{ else }} - <h3 id="newpostbtn" state="0" style="text-align: center; margin-top: 80px; display: none;"><a href="javascript:startNewPost()">[Start a New Thread]</a></h3> + <h3 id="newpostbtn" state="0" style="text-align: center; margin-top: 80px; display: none; margin-bottom:100px;"><a href="javascript:startNewPost()">[Start a New Thread]</a></h3> {{ end }} <!-- end if inreplyto--> {{ $len := len .Posts }} <div id="newpost"> @@ -73,7 +73,7 @@ <tr> <td><label for="name">Name:</label></td> <td><input type="text" id="name" name="name" placeholder="Anonymous" maxlength="100"> - <a onclick="stopNewPost()" style="float: right;">[X]</a> + <a id="stopTablePost" onclick="stopNewPost()">[X]</a> </tr> <tr> <td><label for="options">Options:</label></td> |