From cc24155859b65653495747bd0b38be9bcef33298 Mon Sep 17 00:00:00 2001
From: FChannel <>
Date: Thu, 17 Jun 2021 00:21:07 -0700
Subject: added html meta data as well as basic hover effect on links
---
static/index.html | 15 +++++++++++++++
static/js/posts.js | 39 +++++++++++++++++++++++++++++++++++++--
static/main.html | 7 +++++--
static/ncatalog.html | 12 ++++++++++++
static/npost.html | 17 +++++++++++++++++
static/nposts.html | 11 +++++++++++
static/posts.html | 11 +++++++----
static/sensative.png | Bin 0 -> 3737 bytes
8 files changed, 104 insertions(+), 8 deletions(-)
create mode 100644 static/sensative.png
(limited to 'static')
diff --git a/static/index.html b/static/index.html
index 2840a83..1cd206b 100644
--- a/static/index.html
+++ b/static/index.html
@@ -1,4 +1,19 @@
{{ define "header" }}
+
{{ .Title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ end }}
{{ define "top" }}{{ end }}
diff --git a/static/js/posts.js b/static/js/posts.js
index 077b654..5be272a 100644
--- a/static/js/posts.js
+++ b/static/js/posts.js
@@ -124,8 +124,14 @@ function convertContent(actorName, content, opid)
{
isOP = " (OP)";
}
-
- newContent = newContent.replace(quote, '>>' + shortURL(actorName, link) + isOP + '');
+
+ var q = link
+
+ if(document.getElementById(link + "-content") != null) {
+ q = document.getElementById(link + "-content").innerText;
+ }
+
+ newContent = newContent.replace(quote, '>>' + shortURL(actorName, link) + isOP + '');
})
}
@@ -143,6 +149,35 @@ function convertContent(actorName, content, opid)
return newContent
}
+function convertContentNoLink(actorName, content, opid)
+{
+ var re = /(>>)(https?:\/\/)?(www\.)?.+\/\w+/gm;
+ var match = content.match(re);
+ var newContent = content;
+ if(match)
+ {
+ match.forEach(function(quote, i){
+ var link = quote.replace('>>', '')
+ var isOP = ""
+ if(link == opid)
+ {
+ isOP = " (OP)";
+ }
+
+ var q = link
+
+ if(document.getElementById(link + "-content") != null) {
+ q = document.getElementById(link + "-content").innerText;
+ }
+
+ newContent = newContent.replace(quote, '>>>' + shortURL(actorName, link) + isOP);
+
+ })
+ }
+
+ return newContent
+}
+
function closeReply()
{
document.getElementById("reply-box").style.display = "none";
diff --git a/static/main.html b/static/main.html
index 1cd2aff..172f90b 100644
--- a/static/main.html
+++ b/static/main.html
@@ -1,10 +1,13 @@
{{ define "layout" }}
-
+
+
+
+
+
- {{ .Title }}