diff options
author | WeedSmokingJew <59340248+KushBlazingJudah@users.noreply.github.com> | 2021-08-17 20:15:44 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-17 20:15:44 -0300 |
commit | 17e54854794dacac8409cd10ffb77005d74b8dbe (patch) | |
tree | 1ef3612a0063e3c8bc4293e5ba31dc50097f7c7e /client.go | |
parent | 21917eb2ea72fe40d70c2c991e821aace5430c23 (diff) | |
parent | 9552ec24b1631032acbf1efbe21479ff44b29a63 (diff) |
Merge pull request #1 from KushBlazingJudah/darkmode
merge in darkmode
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -216,7 +216,7 @@ func OutboxGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection Co "parseReplyLink": func(actorId string, op string, id string, content string) template.HTML { actor := FingerActor(actorId) title := strings.ReplaceAll(ParseLinkTitle(actor.Id, op, content), `/\<`, ">") - link := "<a href=\"" + actor.Name + "/" + shortURL(actor.Outbox, op) + "#" + shortURL(actor.Outbox, id) + "\" title=\"" + title + "\">>>" + shortURL(actor.Outbox, id) + "</a>" + link := "<a href=\"" + actor.Name + "/" + shortURL(actor.Outbox, op) + "#" + shortURL(actor.Outbox, id) + "\" title=\"" + title + "\" class=\"replyLink\">>>" + shortURL(actor.Outbox, id) + "</a>" return template.HTML(link) }, "add": func(i, j int) int { @@ -403,7 +403,7 @@ func PostGet(w http.ResponseWriter, r *http.Request, db *sql.DB) { "parseReplyLink": func(actorId string, op string, id string, content string) template.HTML { actor := FingerActor(actorId) title := strings.ReplaceAll(ParseLinkTitle(actor.Id, op, content), `/\<`, ">") - link := "<a href=\"" + actor.Name + "/" + shortURL(actor.Outbox, op) + "#" + shortURL(actor.Outbox, id) + "\" title=\"" + title + "\">>>" + shortURL(actor.Outbox, id) + "</a>" + link := "<a href=\"" + actor.Name + "/" + shortURL(actor.Outbox, op) + "#" + shortURL(actor.Outbox, id) + "\" title=\"" + title + "\" class=\"replyLink\">>>" + shortURL(actor.Outbox, id) + "</a>" return template.HTML(link) }, "sub": func(i, j int) int { return i - j }}).ParseFiles("./static/main.html", "./static/npost.html", "./static/top.html", "./static/bottom.html", "./static/posts.html")) @@ -886,17 +886,12 @@ func ParseLinkComments(db *sql.DB, board Actor, op string, content string, threa } } - var style string - if board.Restricted { - style = "color: #af0a0f;" - } - //replace link with quote format replyID, isReply := IsReplyToOP(db, op, parsedLink) if isReply { id := shortURL(board.Outbox, replyID) - content = strings.Replace(content, match[i][0], "<a class=\"reply\" style=\""+style+"\" title=\""+quoteTitle+"\" href=\"/"+board.Name+"/"+shortURL(board.Outbox, op)+"#"+id+"\">>>"+id+""+isOP+"</a>", -1) + content = strings.Replace(content, match[i][0], "<a class=\"reply\" title=\""+quoteTitle+"\" href=\"/"+board.Name+"/"+shortURL(board.Outbox, op)+"#"+id+"\">>>"+id+""+isOP+"</a>", -1) } else { @@ -909,7 +904,7 @@ func ParseLinkComments(db *sql.DB, board Actor, op string, content string, threa } if actor.Id != "" { - content = strings.Replace(content, match[i][0], "<a class=\"reply\" style=\""+style+"\" title=\""+quoteTitle+"\" href=\""+link+"\">>>"+shortURL(board.Outbox, parsedLink)+isOP+" →</a>", -1) + content = strings.Replace(content, match[i][0], "<a class=\"reply\" title=\""+quoteTitle+"\" href=\""+link+"\">>>"+shortURL(board.Outbox, parsedLink)+isOP+" →</a>", -1) } } } |