From faee9db270a22a42e45210529c7998dcede0087b Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Thu, 28 Jan 2021 00:27:36 -0800 Subject: added red board layout --- static/js/posts.js | 6 +++--- static/main.html | 42 +++++++++++++++++++++++++++++++++++++++++- static/posts.html | 2 +- 3 files changed, 45 insertions(+), 5 deletions(-) (limited to 'static') diff --git a/static/js/posts.js b/static/js/posts.js index e9feefe..a6963de 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -125,7 +125,7 @@ function convertContent(actorName, content, opid) isOP = " (OP)"; } - newContent = newContent.replace(quote, '>>' + shortURL(actorName, link) + isOP + ''); + newContent = newContent.replace(quote, '>>' + shortURL(actorName, link) + isOP + ''); }) } @@ -136,7 +136,7 @@ function convertContent(actorName, content, opid) if(match) { match.forEach(function(quote, i) { - newContent = newContent.replace(quote, '' + quote + ''); + newContent = newContent.replace(quote, '' + quote + ''); }) } @@ -176,7 +176,7 @@ function quote(actorName, opid, id) var w = window.innerWidth / 2 - 200; var h = document.getElementById(id + "-content").offsetTop - 448; - box.setAttribute("style", "display: block; position: absolute; background-color: #eff5ff; width: 400px; height: 550px; z-index: 9; top: " + h + "px; left: " + w + "px; padding: 5px; border: 4px solid #d3caf0;"); + box.setAttribute("style", "display: block; position: absolute; width: 400px; height: 550px; z-index: 9; top: " + h + "px; left: " + w + "px; padding: 5px;"); if (inReplyTo.value != opid) diff --git a/static/main.html b/static/main.html index f4007d1..180e91f 100644 --- a/static/main.html +++ b/static/main.html @@ -16,10 +16,50 @@ a:hover { color: #de0808; } + + body { + {{ if .Board.Restricted }} + background-color: #eef2fe; + color: black; + {{ else }} + background-color: #ffffee; + color: #820404 + {{ end }} + } + + #reply-box { + {{ if .Board.Restricted }} + border: 4px solid #d3caf0; + background-color: #eff5ff; + {{ else }} + border: 4px solid #f0e2d9; + background-color: #f9f9e0; + {{ end }} + } + + .quote { + color: #789922; + } + + .reply { + {{ if .Board.Restricted }} + color:#af0a0f; + {{ else }} + color:#000080; + {{ end }} + } + + .post { + {{ if .Board.Restricted }} + background-color: #d5daf0; + {{ else }} + background-color: #f0e0d6; + {{ end }} + } {{ template "header" . }} -
+