Compare commits
No commits in common. "f67346231d7b49858ceeee45c6043780bc2dd555" and "aa95418b7074effb4ea000dc5eb862a887fa2707" have entirely different histories.
f67346231d
...
aa95418b70
2
base.inc
2
base.inc
@ -50,7 +50,7 @@
|
|||||||
</header>
|
</header>
|
||||||
<main>{% content() %}</main>
|
<main>{% content() %}</main>
|
||||||
<footer>
|
<footer>
|
||||||
<p>Running <a href="https://mid.net.ua/ikibooru.html">Ikibooru</a> v0.0.0.1</p>
|
<p>Running Ikibooru v0.1</p>
|
||||||
</footer>
|
</footer>
|
||||||
<script defer src="/static/datetimes.js"></script>
|
<script defer src="/static/datetimes.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
4
core.lua
4
core.lua
@ -192,9 +192,9 @@ local handler = function(req, res)
|
|||||||
|
|
||||||
local succ, val
|
local succ, val
|
||||||
if _ENV then
|
if _ENV then
|
||||||
succ, val = xpcall(Lyre.render, debug.traceback, tmpl, env, true)
|
succ, val = xpcall(Lyre.render, debug.traceback, tmpl, env)
|
||||||
else
|
else
|
||||||
succ, val = pcall(Lyre.render, tmpl, env, true)
|
succ, val = pcall(Lyre.render, tmpl, env)
|
||||||
end
|
end
|
||||||
|
|
||||||
if succ then
|
if succ then
|
||||||
|
13
index.html.l
13
index.html.l
@ -67,25 +67,16 @@
|
|||||||
var box = document.getElementById("alltags")
|
var box = document.getElementById("alltags")
|
||||||
var datags = []
|
var datags = []
|
||||||
ajax.responseText.split("\n").slice(0, -1).forEach(function(line) {
|
ajax.responseText.split("\n").slice(0, -1).forEach(function(line) {
|
||||||
var tagID = line.split(",")[0]
|
|
||||||
|
|
||||||
var newtag = document.createElement("div")
|
var newtag = document.createElement("div")
|
||||||
newtag.classList.toggle("tag")
|
newtag.classList.toggle("tag")
|
||||||
newtag.classList.toggle("tc" + line.split(",")[2])
|
newtag.classList.toggle("tc" + line.split(",")[2])
|
||||||
newtag.setAttribute("data-tagid", tagID)
|
newtag.setAttribute("data-tagid", line.split(",")[0])
|
||||||
newtag.setAttribute("data-tc", line.split(",")[2])
|
newtag.setAttribute("data-tc", line.split(",")[2])
|
||||||
newtag.innerText = line.split(",")[1]
|
newtag.innerText = line.split(",")[1]
|
||||||
|
|
||||||
datags.push(newtag)
|
datags.push(newtag)
|
||||||
})
|
})
|
||||||
datags.sort(function(a, b) {return a.getAttribute("data-tc") - b.getAttribute("data-tc")})
|
datags.sort(function(a, b) {return a.getAttribute("data-tc") - b.getAttribute("data-tc")})
|
||||||
datags.forEach(function(x) {
|
datags.forEach(function(x) { box.insertBefore(x, null) })
|
||||||
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()
|
ajax.send()
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div>
|
<div>
|
||||||
{% for _,tag in pairs(DB.getobjtags(obj.id)) do %}
|
{% for _,tag in pairs(DB.getobjtags(obj.id)) do %}
|
||||||
<a href="/search?n=&t={{ tag.id }}&o"><div class="tag tc{{ tag.category }}" data-tagid="{{ tag.id }}">{{ Escapes.htmlescape(tag.name) }}</div></a>
|
<div class="tag tc{{ tag.category }}" data-tagid="{{ tag.id }}">{{ Escapes.htmlescape(tag.name) }}</div>
|
||||||
{% end %}
|
{% end %}
|
||||||
</div>
|
</div>
|
||||||
{% if verified and verified.privs >= DB.USER_PRIVS_APPROVED then %}
|
{% if verified and verified.privs >= DB.USER_PRIVS_APPROVED then %}
|
||||||
|
@ -22,7 +22,6 @@ div.tag {
|
|||||||
border: 1px solid blue;
|
border: 1px solid blue;
|
||||||
padding: 0.1em;
|
padding: 0.1em;
|
||||||
margin: 0.1em;
|
margin: 0.1em;
|
||||||
color: black;
|
|
||||||
}
|
}
|
||||||
div.tag.selected {
|
div.tag.selected {
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
|
Loading…
Reference in New Issue
Block a user