misc
This commit is contained in:
parent
5fc0c1cf36
commit
a87273cea0
|
@ -35,7 +35,7 @@ html[theme='f0ck'] {
|
|||
--posts-meta-bg: #000000b8;
|
||||
--badge-sfw: #68a728;
|
||||
--badge-nsfw: #a72828;
|
||||
--badge-tag: #6c6c6c;
|
||||
--badge-tag: #090909;
|
||||
--scrollbar-color: #2b2b2b;
|
||||
--scroller-bg: #424242;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ html[theme='p1nk'] {
|
|||
--badge-bg: #171717;
|
||||
--badge-sfw: #68a728;
|
||||
--badge-nsfw: #a72828;
|
||||
--badge-tag: #6c6c6c;
|
||||
--badge-tag: #090909;
|
||||
--metadata-bg: #0d0d0d;
|
||||
--posts-meta-bg: #000000b8;
|
||||
--scrollbar-color: #2b2b2b;
|
||||
|
@ -100,12 +100,12 @@ html[theme='orange'] {
|
|||
--pagination-anchor-box-shadow: inset 0 0 0 1px rgba(255,255,255,.04),inset 0 1px rgba(255,255,255,.04),inset 0 -1px rgba(0,0,0,.15),0 1px 1px rgba(0,0,0,.1);
|
||||
--pagination-background-hover: #333;
|
||||
--pagination-border-color: rgba(0,0,0,.8) rgba(0,0,0,.65) rgba(0,0,0,.5);
|
||||
--metadata-bg: #0d0d0d;
|
||||
--metadata-bg: #2b2b2b;
|
||||
--badge-bg: #151515;
|
||||
--posts-meta-bg: #000000b8;
|
||||
--badge-bg: #171717;
|
||||
--badge-tag: #090909;
|
||||
--badge-sfw: #68a728;
|
||||
--badge-nsfw: #a72828;
|
||||
--badge-tag: #6c6c6c;
|
||||
--scrollbar-color: #2b2b2b;
|
||||
--scroller-bg: #424242;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ html[theme='amoled'] {
|
|||
--posts-meta-bg: #000000b8;
|
||||
--badge-sfw: #68a728;
|
||||
--badge-nsfw: #a72828;
|
||||
--badge-tag: #6c6c6c;
|
||||
--badge-tag: #1a1a1a;
|
||||
--scrollbar-color: #1d1c1c;
|
||||
--scroller-bg: #424242;
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ html[theme="paper"] {
|
|||
--posts-meta-bg: #000000db;
|
||||
--badge-sfw: #68a728;
|
||||
--badge-nsfw: #a72828;
|
||||
--badge-tag: #6c6c6c;
|
||||
--badge-tag: #9f9a9a;
|
||||
--scrollbar-color: #6c6c6c;
|
||||
--scroller-bg: #424242;
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ html[theme="atmos"] {
|
|||
--posts-meta-bg: #000000b8;
|
||||
--badge-sfw: #68a728;
|
||||
--badge-nsfw: #a72828;
|
||||
--badge-tag: #6c6c6c;
|
||||
--badge-tag: #090909;
|
||||
--scrollbar-color: #2b2b2b;
|
||||
}
|
||||
|
||||
|
@ -388,6 +388,7 @@ html[theme="iced"] {
|
|||
@font-face {
|
||||
font-family: 'VCR';
|
||||
src: url('/s/vcr.ttf') format('truetype');
|
||||
/* https://www.dafont.com/vcr-osd-mono.font */
|
||||
}
|
||||
|
||||
html {
|
||||
|
@ -632,6 +633,15 @@ span.placeholder {
|
|||
display: block;
|
||||
}
|
||||
|
||||
.dropdown:hover .nav-link {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
transition: .2s ease;
|
||||
}
|
||||
.dropdown:hover .nav-link > img.avatar {
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.navbar-nav .dropdown-menu {
|
||||
float: none;
|
||||
}
|
||||
|
@ -1027,6 +1037,12 @@ span#tags:empty {
|
|||
text-shadow: inherit !important;
|
||||
background-color: #252525;
|
||||
}
|
||||
.badge-german {
|
||||
background: linear-gradient(180deg, black 33.33%, red 33.33%, red 66.66%, yellow 66.66%) !important;
|
||||
}
|
||||
.badge-russia {
|
||||
background: linear-gradient(180deg, white 33.33%, blue 33.33%, blue 66.66%, red 66.66%) !important;
|
||||
}
|
||||
|
||||
.about {
|
||||
padding: 10px;
|
||||
|
@ -1266,7 +1282,7 @@ div#posts > a > p:before {
|
|||
content: "";
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
bottom: -1px;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
}
|
||||
|
@ -1277,25 +1293,27 @@ div#posts > a[data-mode="nsfw"] > p:before {
|
|||
background-color: #a72828;
|
||||
}
|
||||
div#posts > a[data-mode="null"] > p:before {
|
||||
background-color: #dcd512;
|
||||
background-color: #dcd512; /* untagged */
|
||||
}
|
||||
|
||||
div#footbar {
|
||||
width: 100%;
|
||||
/* background-color: var(--nav-bg); */
|
||||
text-align: center;
|
||||
/* color: #f00; */
|
||||
margin-top: -30px;
|
||||
transition: .5s ease-in-out;
|
||||
transition: .2s ease-in-out;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* avatar */
|
||||
img.avatar {
|
||||
height: 24px;
|
||||
height: auto;
|
||||
position: relative;
|
||||
width: 24px;
|
||||
border-radius: 25px;
|
||||
margin-top: 1px;
|
||||
margin: 0;
|
||||
left: -6px;
|
||||
top: 0px;
|
||||
border-top-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
|
||||
/* log */
|
||||
|
|
BIN
public/s/img/ava/nixc.png
Normal file
BIN
public/s/img/ava/nixc.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
|
@ -86,21 +86,11 @@ const flash = ({ type, msg }) => {
|
|||
a.innerHTML = tag.tag;
|
||||
|
||||
const span = document.createElement("span");
|
||||
span.classList.add("badge", "badge-light", "mr-2");
|
||||
span.classList.add("badge", "mr-2");
|
||||
span.setAttribute('tooltip', tag.user);
|
||||
span.dataset.tagid = tag.id;
|
||||
|
||||
if(tag.tag == "sfw") {
|
||||
span.classList.remove("badge-light");
|
||||
span.classList.add("badge-success");
|
||||
}
|
||||
if(tag.tag == "nsfw") {
|
||||
span.classList.remove("badge-light");
|
||||
span.classList.add("badge-danger");
|
||||
}
|
||||
if(tag.tag.startsWith(">")) {
|
||||
span.classList.add("badge-greentext");
|
||||
}
|
||||
tag.badge.split(" ").forEach(b => span.classList.add(b));
|
||||
|
||||
const delbutton = document.createElement("a");
|
||||
delbutton.innerHTML = " ×";
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
if(elem = document.querySelector(".pagination > .prev:not(.disabled)")) {
|
||||
if(tts < scroll_treshold) {
|
||||
document.querySelector("nav.navbar").style.boxShadow = "0px 2px 0px var(--accent)";
|
||||
document.querySelector("nav.navbar").style.transition = ".5s ease-in-out";
|
||||
document.querySelector("nav.navbar").style.transition = ".2s ease-in-out";
|
||||
tts++;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -68,8 +68,7 @@ export default new class {
|
|||
parseTag(tag) {
|
||||
if(!tag)
|
||||
return null;
|
||||
return tag
|
||||
.replace(/%20/g, " ");
|
||||
return decodeURI(tag);
|
||||
}
|
||||
|
||||
// async funcs
|
||||
|
@ -103,8 +102,20 @@ export default new class {
|
|||
.leftJoin("tags", "tags.id", "tags_assign.tag_id")
|
||||
.leftJoin("user", "user.id", "tags_assign.user_id")
|
||||
.where("tags_assign.item_id", itemid);
|
||||
for(let t = 0; t < tags.length; t++)
|
||||
tags[t].tag = tags[t].tag.replace(/[\u00A0-\u9999<>\&]/g, i => '&#'+i.charCodeAt(0)+';');
|
||||
for(let t = 0; t < tags.length; t++) {
|
||||
if(tags[t].tag.startsWith(">"))
|
||||
tags[t].badge = "badge-greentext badge-light";
|
||||
else if(/[а-яА-ЯЁё]/.test(tags[t].tag) || tags[t].tag.match(/russia/))
|
||||
tags[t].badge = "badge-russia badge-light";
|
||||
else if(tags[t].tag.match(/german/))
|
||||
tags[t].badge = "badge-german badge-light";
|
||||
else if(tags[t].tag === "sfw")
|
||||
tags[t].badge = "badge-success";
|
||||
else if(tags[t].tag === "nsfw")
|
||||
tags[t].badge = "badge-danger";
|
||||
else
|
||||
tags[t].badge = "badge-light";
|
||||
}
|
||||
return tags;
|
||||
};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ const auth = async (req, res, next) => {
|
|||
|
||||
export default (router, tpl) => {
|
||||
router.get(/^\/?(?:tag\/(?<tag>.+?))?(?:user\/(?<user>.+?))?(?:\/(?<mime>image|audio|video))?(?:\/p\/(?<page>\d+))?(?:\/(?<itemid>\d+))?$/, async (req, res) => {
|
||||
const user = req.params.user ?? null;
|
||||
const user = req.params.user ? decodeURI(req.params.user) : null;
|
||||
const tag = lib.parseTag(req.params.tag ?? null);
|
||||
const mime = (req.params.mime ?? "");
|
||||
const smime = allowedMimes.includes(mime) ? mime + "/%" : mime === "" ? "%" : "%";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@include(main/header_admin)
|
||||
@include(snippets/header_admin)
|
||||
@if(log)
|
||||
<h1>last {{ log.length }} entries:</h1>
|
||||
<div class="logwrap">
|
||||
|
@ -13,4 +13,4 @@
|
|||
})();
|
||||
</script>
|
||||
@endif
|
||||
@include(main/footer)
|
||||
@include(snippets/footer)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@include(main/header_admin)
|
||||
@include(snippets/header_admin)
|
||||
<form action="/admin/test" style="margin-top: 15px;">
|
||||
<input type="text" name="tag" /><button type="submit">search</button>
|
||||
</form>
|
||||
|
@ -24,4 +24,4 @@
|
|||
@endeach
|
||||
</table>
|
||||
@endif
|
||||
@include(main/footer)
|
||||
@include(snippets/footer)
|
|
@ -1,4 +1,4 @@
|
|||
@include(main/header_admin)
|
||||
@include(snippets/header_admin)
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
|
@ -21,4 +21,4 @@
|
|||
</tr>
|
||||
@endeach
|
||||
</table>
|
||||
@include(main/footer)
|
||||
@include(snippets/footer)
|
|
@ -1,3 +1,3 @@
|
|||
@include(snippets/header)
|
||||
<h1>{{ message }}</h1>
|
||||
<h1 style="text-align: center;">{{ message }}</h1>
|
||||
@include(snippets/footer)
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
<span class="badge badge-dark" id="tags">
|
||||
@if(typeof item.tags !== "undefined")
|
||||
@each(item.tags as tag)
|
||||
<span @if(session)tooltip="{{ tag.user }}" data-tagid="{{ tag.id }}"@endif class="badge@if(tag.tag[0] == "&") badge-greentext@endif badge-{{ (tag.tag === "nsfw" ? "danger" : tag.tag === "sfw" ? "success" : "light") }} mr-2">
|
||||
<a href="/tag/{{ tag.tag.replace(/\s/g, "%20") }}">{{ tag.tag }}</a>@if(session) <a href="#">×</a>@endif
|
||||
<span @if(session)tooltip="{{ tag.user }}" data-tagid="{{ tag.id }}"@endif class="badge {{ tag.badge }} mr-2">
|
||||
<a href="/tag/{{ tag.tag.replace(/\s/g, "%20") }}">{!! tag.tag !!}</a>@if(session) <a href="#">×</a>@endif
|
||||
</span>
|
||||
@endeach
|
||||
@endif
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<li class="nav-item dropdown">
|
||||
@if(session)
|
||||
<a class="nav-link" href="#" content="{{ session.user }}" data-toggle="dropdown">
|
||||
<img src="/s/img/ava/default.png" class="avatar" /> {{ session.user }}
|
||||
<img src="/s/img/ava/@if(session.id == 2)nixc.png@elsedefault.png@endif" class="avatar" /> {{ session.user }}
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="/admin">adminpanel</a></li>
|
||||
|
|
Loading…
Reference in New Issue
Block a user