root 2021-09-06 02:00:41 +02:00
parent 54d846c0f8
commit 4cb8a681c1
8 changed files with 33 additions and 14 deletions

View File

@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>derzombiiie.com - home</title>
<title>home</title>
<link rel="stylesheet" href="/static/style/fonts.css">
<link rel="stylesheet" href="/static/style/main.css">
<script src="/static/js/jq.js"></script>

View File

@ -2,6 +2,7 @@
$(document).ready(() => {
content = new entry(postDATA.title, postDATA.author, marked(postDATA.content), postDATA.href, postDATA.tags, postDATA.id, postDATA.rating)
content.appendto(".content")
$("title").html(postDATA.title)
// rating bit:
$(".upvote") .on("click", () => { vote("+", $(".upvote"), $(".downvote")) })

View File

@ -10,10 +10,11 @@ $(document).ready(() => {
a = d[i] ? a : ""
}
desc += a
results.push( new entry( searchDATA.sd[i].title, searchDATA.sd[i].author, desc, "", searchDATA.sd[i].tags, searchDATA.sd[i].id, searchDATA.sd[i].rating ) )
results[results.length-1].appendto(".content")
}
$(".subtitle.search").html(searchDATA.arg.join(", "))
$(".subtitle.search").html((searchDATA.arg.join(", ").replace(/</g, "&lt;")))
$("title").html(("search - " + searchDATA.arg.join(", ")).replace(/</g, "&lt;"))
})

View File

@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>derzombiiie.com - home</title>
<title>view post</title>
<link rel="stylesheet" href="/static/style/fonts.css">
<link rel="stylesheet" href="/static/style/main.css">
<script src="/static/js/jq.js"></script>

View File

@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>derzombiiie.com - home</title>
<title>post listing</title>
<link rel="stylesheet" href="/static/style/fonts.css">
<link rel="stylesheet" href="/static/style/main.css">
<script src="/static/js/jq.js"></script>

View File

@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>derzombiiie.com - home</title>
<title>search - </title>
<link rel="stylesheet" href="/static/style/fonts.css">
<link rel="stylesheet" href="/static/style/main.css">
<script src="/static/js/jq.js"></script>

View File

@ -50,6 +50,7 @@ con.registercmd( "appeval", (arg) => {try {console.log(eval(arg.join(" ")))} cat
con.registercmd( "comment", (arg => {
let t
let body
let time
sw:
switch (arg[0]) {
case "get":
@ -76,7 +77,7 @@ con.registercmd( "comment", (arg => {
body.shift()
body.shift()
let time = arg[2]
time = arg[2]
if (arg[2] == "auto") {
time = new Date().getTime()
console.log( "Auto-time: using time: " + time)
@ -95,15 +96,31 @@ con.registercmd( "comment", (arg => {
console.log(comments.delete( arg[1], arg[2] ))
break
case "set": // DONT USE! its broken
if ( !arg[1] ) return console.log("No post ID specified!")
if ( !arg[2] ) return console.log("No comment specified!")
case "set": // DONT USE! its partially rewritten!
if (!arg[1] || !arg[2] || !arg[3] || !arg[4] || !arg[5]) {
return console.log("Not all args specified!\nUsage: comment set <post> <comment> <time> <author> <content>...")
}
let oldpost = commentDB.get(arg[1]+"-"+arg[2])
body = Object.assign([], arg[3])
body = Object.assign([], arg)
body.shift()
body.shift()
body.shift()
body.shift()
body.shift()
console.log( comments.set( arg[1], arg[2], { "body":body.join(" ") } ) )
time = arg[3]
if (arg[3] == "auto") {
time = new Date().getTime()
console.log( "Auto-time: using time: " + time)
}
console.log( comments.set(arg[1], arg[2], {
"time": time == "keep" ? oldpost.time : time,
"author":arg[4] == "keep" ? oldpost.author : arg[4].replace(/%20/g, " "),
"authorinfo":{"origin":"console"},
"body": body == "keep" ? oldpost.body : body.join(" ").replace(/\\n/g, "\n")
}) )
break
case "sync":

View File

@ -10,11 +10,11 @@
"-": 0
},
"tags": [
"first-post",
".info",
"first-post",
"meta"
],
"title": "what this is about"
},
"len": 1
}
}