diff --git a/base.inc b/base.inc index 7f50dff..a79a2cb 100644 --- a/base.inc +++ b/base.inc @@ -50,7 +50,7 @@
{% content() %}
diff --git a/index.html.l b/index.html.l index e6284f0..f4e2e7c 100644 --- a/index.html.l +++ b/index.html.l @@ -67,16 +67,25 @@ var box = document.getElementById("alltags") var datags = [] ajax.responseText.split("\n").slice(0, -1).forEach(function(line) { + var tagID = line.split(",")[0] + var newtag = document.createElement("div") newtag.classList.toggle("tag") newtag.classList.toggle("tc" + line.split(",")[2]) - newtag.setAttribute("data-tagid", line.split(",")[0]) + newtag.setAttribute("data-tagid", tagID) newtag.setAttribute("data-tc", line.split(",")[2]) newtag.innerText = line.split(",")[1] + datags.push(newtag) }) datags.sort(function(a, b) {return a.getAttribute("data-tc") - b.getAttribute("data-tc")}) - datags.forEach(function(x) { box.insertBefore(x, null) }) + datags.forEach(function(x) { + var newa = document.createElement("a") + newa.setAttribute("href", "/search?n=&t=" + x.getAttribute("data-tagid") + "&h"); + newa.appendChild(x); + + box.insertBefore(newa, null) + }) } } ajax.send() diff --git a/obj.html.l b/obj.html.l index 9511a4c..f4e7820 100644 --- a/obj.html.l +++ b/obj.html.l @@ -55,7 +55,7 @@
{% for _,tag in pairs(DB.getobjtags(obj.id)) do %} -
{{ Escapes.htmlescape(tag.name) }}
+
{{ Escapes.htmlescape(tag.name) }}
{% end %}
{% if verified and verified.privs >= DB.USER_PRIVS_APPROVED then %} diff --git a/static/style.css b/static/style.css index 0845255..c22f3f5 100644 --- a/static/style.css +++ b/static/style.css @@ -22,6 +22,7 @@ div.tag { border: 1px solid blue; padding: 0.1em; margin: 0.1em; + color: black; } div.tag.selected { border-width: 2px;