Initial commit
commit
fd3df81a12
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="marked" level="application" />
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<file url="PROJECT" libraries="{marked}" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/booru.iml" filepath="$PROJECT_DIR$/.idea/booru.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="8.1" />
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,57 @@
|
||||
function showBackgroundImage(item, url, blur) {
|
||||
if (blur) {}
|
||||
|
||||
return new Promise((res, rej) => {
|
||||
try {
|
||||
let tmp = new Image();
|
||||
tmp.onload = function() {
|
||||
item.style.backgroundImage = 'url("' + url + '")';
|
||||
item.style.opacity = "1";
|
||||
res();
|
||||
}
|
||||
tmp.src = url;
|
||||
} catch (e) {
|
||||
rej(e);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
(async () => {
|
||||
let images = JSON.parse(await (await window.fetch(`https://derpibooru.org/api/v1/json/search/images/?q=${encodeURIComponent(_display_filter ?? "-*")}&filter_id=56027&per_page=50&page=${_display_page ?? 1}`)).text());
|
||||
|
||||
let dom = "";
|
||||
|
||||
for (let image of images['images']) {
|
||||
if (image['processed'] && !image['animated']) {
|
||||
dom += `
|
||||
<a style="cursor: pointer;" onclick="viewImage(${image['id']});">
|
||||
<div class="card" style="height: calc((100vw - 150px) / 6);">
|
||||
<div class="card-body" style="padding: 0; height: 100%; width: 100%; display: flex; align-items: center; justify-content: center;">
|
||||
<div class="display-image" data-display-image="${image['id']}" style="background-size: cover; background-position: center; opacity: 0; transition: opacity 200ms; height: 100%; width: 100%; border-radius: 0.375rem;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>`;
|
||||
}
|
||||
}
|
||||
|
||||
if (images['images'].length === 0) dom = "No matching images were found.";
|
||||
|
||||
new Promise(async () => {
|
||||
for (let image of images['images']) {
|
||||
await (await window.fetch("/pushTags.php?tag=" + encodeURIComponent(image['tags'].join(",")))).text();
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById("grid").innerHTML = dom;
|
||||
document.getElementById("pagination").style.display = "";
|
||||
|
||||
for (let item of document.getElementsByClassName("display-image")) {
|
||||
await sleep(50);
|
||||
|
||||
let id = item.getAttribute("data-display-image");
|
||||
let data = JSON.parse(await (await window.fetch("https://derpibooru.org/api/v1/json/images/" + id)).text());
|
||||
let url = data['image']['representations'] ? (data['image']['representations']['small'] ?? data['image']['view_url']) : data['image']['view_url'];
|
||||
|
||||
await showBackgroundImage(item, url, !data['image']['tags'].includes("safe"));
|
||||
}
|
||||
})();
|
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
if (isset($_GET["key"])) {
|
||||
$token = bin2hex(random_bytes(64));
|
||||
$data = json_decode(file_get_contents("https://ponies.equestria.horse/api/booru-check?key=" . $_GET["key"]), true);
|
||||
|
||||
if ($data["valid"]) {
|
||||
file_put_contents($_SERVER["DOCUMENT_ROOT"] . "/includes/data/tokens/" . $token, json_encode([
|
||||
"original" => trim($_GET["key"]),
|
||||
"user" => $data["user"]
|
||||
]));
|
||||
setcookie("booru_auth", $token, 0, "/");
|
||||
|
||||
header("Location: /");
|
||||
die();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $userName;
|
||||
while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json")) === "") {}
|
||||
|
||||
$list = [];
|
||||
|
||||
$saved = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json"), true)[$userName];
|
||||
foreach ($saved as $id => $group) {
|
||||
if ($id === "favorites") continue;
|
||||
|
||||
$list[] = [
|
||||
"id" => $id,
|
||||
"name" => $group["name"]
|
||||
];
|
||||
}
|
||||
|
||||
die(json_encode($list));
|
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $userName;
|
||||
while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json")) === "") {}
|
||||
|
||||
$isSaved = false;
|
||||
|
||||
$saved = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json"), true)[$userName];
|
||||
foreach ($saved as $group) {
|
||||
if (in_array($_GET["id"], $group["items"])) {
|
||||
$isSaved = true;
|
||||
}
|
||||
}
|
||||
|
||||
die(json_encode([
|
||||
"value" => $isSaved
|
||||
]));
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $userName;
|
||||
while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json")) === "") {}
|
||||
|
||||
$isSaved = false;
|
||||
|
||||
$saved = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json"), true);
|
||||
|
||||
if ($_GET["id"] === "new" || $_GET["id"] === "category") die();
|
||||
if (!isset($saved[$userName][$_GET["id"]])) die();
|
||||
|
||||
$saved[$userName][$_GET["id"]]["name"] = strip_tags($_GET["name"]);
|
||||
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json", json_encode($saved, JSON_PRETTY_PRINT));
|
||||
|
||||
while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json")) === "") {
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json", json_encode($saved, JSON_PRETTY_PRINT));
|
||||
}
|
||||
|
||||
die("ok");
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $userName;
|
||||
while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json")) === "") {}
|
||||
|
||||
$isSaved = false;
|
||||
|
||||
$saved = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json"), true);
|
||||
$id = substr(bin2hex(random_bytes(32)), 0, 16);
|
||||
|
||||
if ($_GET["category"] === "new") $_GET["category"] = $id;
|
||||
if (!isset($saved[$userName][$_GET["category"]])) $saved[$userName][$_GET["category"]] = [
|
||||
"name" => "New category " . $_GET["category"],
|
||||
"items" => []
|
||||
];
|
||||
|
||||
if (!in_array($_GET["id"], $saved[$userName][$_GET["category"]]["items"])) {
|
||||
$saved[$userName][$_GET["category"]]["items"][] = $_GET["id"];
|
||||
}
|
||||
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json", json_encode($saved, JSON_PRETTY_PRINT));
|
||||
|
||||
while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json")) === "") {
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json", json_encode($saved, JSON_PRETTY_PRINT));
|
||||
}
|
||||
|
||||
die("ok");
|
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $userName;
|
||||
while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json")) === "") {}
|
||||
|
||||
$saved = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json"), true);
|
||||
$removed = false;
|
||||
|
||||
foreach ($saved[$userName] as $name => $group) {
|
||||
foreach ($group["items"] as $index => $item) {
|
||||
if ($item === $_GET["id"]) {
|
||||
unset($saved[$userName][$name]["items"][$index]);
|
||||
$removed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json", json_encode($saved, JSON_PRETTY_PRINT));
|
||||
|
||||
while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json")) === "") {
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json", json_encode($saved, JSON_PRETTY_PRINT));
|
||||
}
|
||||
|
||||
die($removed ? "ok" : "no");
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,488 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
:root {
|
||||
--bs-blue: #0d6efd;
|
||||
--bs-indigo: #6610f2;
|
||||
--bs-purple: #6f42c1;
|
||||
--bs-pink: #d63384;
|
||||
--bs-red: #dc3545;
|
||||
--bs-orange: #fd7e14;
|
||||
--bs-yellow: #ffc107;
|
||||
--bs-green: #198754;
|
||||
--bs-teal: #20c997;
|
||||
--bs-cyan: #0dcaf0;
|
||||
--bs-black: #000;
|
||||
--bs-white: #fff;
|
||||
--bs-gray: #6c757d;
|
||||
--bs-gray-dark: #343a40;
|
||||
--bs-gray-100: #f8f9fa;
|
||||
--bs-gray-200: #e9ecef;
|
||||
--bs-gray-300: #dee2e6;
|
||||
--bs-gray-400: #ced4da;
|
||||
--bs-gray-500: #adb5bd;
|
||||
--bs-gray-600: #6c757d;
|
||||
--bs-gray-700: #495057;
|
||||
--bs-gray-800: #343a40;
|
||||
--bs-gray-900: #212529;
|
||||
--bs-primary: #0d6efd;
|
||||
--bs-secondary: #6c757d;
|
||||
--bs-success: #198754;
|
||||
--bs-info: #0dcaf0;
|
||||
--bs-warning: #ffc107;
|
||||
--bs-danger: #dc3545;
|
||||
--bs-light: #f8f9fa;
|
||||
--bs-dark: #212529;
|
||||
--bs-primary-rgb: 13, 110, 253;
|
||||
--bs-secondary-rgb: 108, 117, 125;
|
||||
--bs-success-rgb: 25, 135, 84;
|
||||
--bs-info-rgb: 13, 202, 240;
|
||||
--bs-warning-rgb: 255, 193, 7;
|
||||
--bs-danger-rgb: 220, 53, 69;
|
||||
--bs-light-rgb: 248, 249, 250;
|
||||
--bs-dark-rgb: 33, 37, 41;
|
||||
--bs-white-rgb: 255, 255, 255;
|
||||
--bs-black-rgb: 0, 0, 0;
|
||||
--bs-body-color-rgb: 33, 37, 41;
|
||||
--bs-body-bg-rgb: 255, 255, 255;
|
||||
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
||||
--bs-body-font-family: var(--bs-font-sans-serif);
|
||||
--bs-body-font-size: 1rem;
|
||||
--bs-body-font-weight: 400;
|
||||
--bs-body-line-height: 1.5;
|
||||
--bs-body-color: #212529;
|
||||
--bs-body-bg: #fff;
|
||||
--bs-border-width: 1px;
|
||||
--bs-border-style: solid;
|
||||
--bs-border-color: #dee2e6;
|
||||
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
|
||||
--bs-border-radius: 0.375rem;
|
||||
--bs-border-radius-sm: 0.25rem;
|
||||
--bs-border-radius-lg: 0.5rem;
|
||||
--bs-border-radius-xl: 1rem;
|
||||
--bs-border-radius-2xl: 2rem;
|
||||
--bs-border-radius-pill: 50rem;
|
||||
--bs-link-color: #0d6efd;
|
||||
--bs-link-hover-color: #0a58ca;
|
||||
--bs-code-color: #d63384;
|
||||
--bs-highlight-bg: #fff3cd;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
border: 0;
|
||||
border-top: 1px solid;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.1875em;
|
||||
background-color: var(--bs-highlight-bg);
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--bs-link-color);
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: var(--bs-link-hover-color);
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: var(--bs-font-monospace);
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: var(--bs-code-color);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.1875rem 0.375rem;
|
||||
font-size: 0.875em;
|
||||
color: var(--bs-body-bg);
|
||||
background-color: var(--bs-body-color);
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
/* rtl:raw:
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
*/
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,485 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
:root {
|
||||
--bs-blue: #0d6efd;
|
||||
--bs-indigo: #6610f2;
|
||||
--bs-purple: #6f42c1;
|
||||
--bs-pink: #d63384;
|
||||
--bs-red: #dc3545;
|
||||
--bs-orange: #fd7e14;
|
||||
--bs-yellow: #ffc107;
|
||||
--bs-green: #198754;
|
||||
--bs-teal: #20c997;
|
||||
--bs-cyan: #0dcaf0;
|
||||
--bs-black: #000;
|
||||
--bs-white: #fff;
|
||||
--bs-gray: #6c757d;
|
||||
--bs-gray-dark: #343a40;
|
||||
--bs-gray-100: #f8f9fa;
|
||||
--bs-gray-200: #e9ecef;
|
||||
--bs-gray-300: #dee2e6;
|
||||
--bs-gray-400: #ced4da;
|
||||
--bs-gray-500: #adb5bd;
|
||||
--bs-gray-600: #6c757d;
|
||||
--bs-gray-700: #495057;
|
||||
--bs-gray-800: #343a40;
|
||||
--bs-gray-900: #212529;
|
||||
--bs-primary: #0d6efd;
|
||||
--bs-secondary: #6c757d;
|
||||
--bs-success: #198754;
|
||||
--bs-info: #0dcaf0;
|
||||
--bs-warning: #ffc107;
|
||||
--bs-danger: #dc3545;
|
||||
--bs-light: #f8f9fa;
|
||||
--bs-dark: #212529;
|
||||
--bs-primary-rgb: 13, 110, 253;
|
||||
--bs-secondary-rgb: 108, 117, 125;
|
||||
--bs-success-rgb: 25, 135, 84;
|
||||
--bs-info-rgb: 13, 202, 240;
|
||||
--bs-warning-rgb: 255, 193, 7;
|
||||
--bs-danger-rgb: 220, 53, 69;
|
||||
--bs-light-rgb: 248, 249, 250;
|
||||
--bs-dark-rgb: 33, 37, 41;
|
||||
--bs-white-rgb: 255, 255, 255;
|
||||
--bs-black-rgb: 0, 0, 0;
|
||||
--bs-body-color-rgb: 33, 37, 41;
|
||||
--bs-body-bg-rgb: 255, 255, 255;
|
||||
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
||||
--bs-body-font-family: var(--bs-font-sans-serif);
|
||||
--bs-body-font-size: 1rem;
|
||||
--bs-body-font-weight: 400;
|
||||
--bs-body-line-height: 1.5;
|
||||
--bs-body-color: #212529;
|
||||
--bs-body-bg: #fff;
|
||||
--bs-border-width: 1px;
|
||||
--bs-border-style: solid;
|
||||
--bs-border-color: #dee2e6;
|
||||
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
|
||||
--bs-border-radius: 0.375rem;
|
||||
--bs-border-radius-sm: 0.25rem;
|
||||
--bs-border-radius-lg: 0.5rem;
|
||||
--bs-border-radius-xl: 1rem;
|
||||
--bs-border-radius-2xl: 2rem;
|
||||
--bs-border-radius-pill: 50rem;
|
||||
--bs-link-color: #0d6efd;
|
||||
--bs-link-hover-color: #0a58ca;
|
||||
--bs-code-color: #d63384;
|
||||
--bs-highlight-bg: #fff3cd;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
border: 0;
|
||||
border-top: 1px solid;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-right: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.1875em;
|
||||
background-color: var(--bs-highlight-bg);
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--bs-link-color);
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: var(--bs-link-hover-color);
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: var(--bs-font-monospace);
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: var(--bs-code-color);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.1875rem 0.375rem;
|
||||
font-size: 0.875em;
|
||||
color: var(--bs-body-bg);
|
||||
background-color: var(--bs-body-color);
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: right;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: right;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,76 @@
|
||||
<?php $title = "Followed"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"; global $userName;
|
||||
|
||||
$follows = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/follows.json"), true)[$userName];
|
||||
$tags = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/tags.json"), true);
|
||||
|
||||
?>
|
||||
|
||||
<div style="margin: 20px 50px 0;">
|
||||
<div class="list-group">
|
||||
<?php foreach ($follows as $tag): ?>
|
||||
<a href="/tag/?id=<?= $tag ?>" class="list-group-item list-group-item-action tag-item" style="display: grid; grid-template-columns: 5vw 1fr; grid-gap: 15px;" data-tag="<?= $tag ?>">
|
||||
<div style="background-color: rgba(0, 0, 0, .1); height: 64px; border-radius: 5px;">
|
||||
<div style="opacity: 0; transition: opacity 200ms; background-size: cover; background-position: center; height: 100%; width: 100%; border-radius: 5px;">
|
||||
<div style="display:none;width: 100%;backdrop-filter: blur(5px);height: 100%;border-radius: 5px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div>
|
||||
<b><?= isset($tags["db"][$tag]) && isset($tags["db"][$tag]["display_name"]) ? $tags["db"][$tag]["display_name"] : ucwords(strip_tags($tag)) ?></b>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function showBackgroundImage(item, url, blur) {
|
||||
if (blur) {
|
||||
item.children[0].style.display = "";
|
||||
}
|
||||
|
||||
return new Promise((res, rej) => {
|
||||
try {
|
||||
let tmp = new Image();
|
||||
tmp.onload = function() {
|
||||
item.style.backgroundImage = 'url("' + url + '")';
|
||||
item.style.opacity = "1";
|
||||
res();
|
||||
}
|
||||
tmp.src = url;
|
||||
} catch (e) {
|
||||
rej(e);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
(async () => {
|
||||
for (let item of document.getElementsByClassName("tag-item")) {
|
||||
await sleep(50);
|
||||
|
||||
let id = item.getAttribute("data-tag");
|
||||
let data = JSON.parse(await (await window.fetch("https://derpibooru.org/api/v1/json/tags/" + encodeURIComponent(id).replaceAll("%20", "+"))).text());
|
||||
|
||||
item.children[1].children[0].children[1].innerText = formatNumber(data['tag']['images']) + " image" + (data['tag']['images']> 0 ? "s" : "");
|
||||
|
||||
let imgId = parseInt(data['tag']["description"].replace(/([^>]*)>>(\d+)(.*)/gm, "$2"));
|
||||
|
||||
let imgData;
|
||||
if (!isNaN(imgId)) {
|
||||
imgData = JSON.parse(await (await window.fetch("https://derpibooru.org/api/v1/json/images/" + imgId)).text());
|
||||
} else {
|
||||
imgData = {
|
||||
image: JSON.parse(await (await window.fetch("https://derpibooru.org/api/v1/json/search/images/?q=" + encodeURIComponent(id).replaceAll("%20", "+") + "&sf=wilson_score&sd=desc")).text())['images'][0]
|
||||
};
|
||||
}
|
||||
|
||||
let url = imgData['image']['representations'] ? (imgData['image']['representations']['small'] ?? imgData['image']['view_url']) : imgData['image']['view_url'];
|
||||
|
||||
await showBackgroundImage(item.children[0].children[0], url, !imgData['image']['tags'].includes("safe"));
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?>
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"raindrops": [
|
||||
"pipp petals",
|
||||
"scootaloo",
|
||||
"pegasus"
|
||||
],
|
||||
"cloudburst": []
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
{
|
||||
"cloudburst": {
|
||||
"favorites": {
|
||||
"name": "Favorites",
|
||||
"items": []
|
||||
}
|
||||
},
|
||||
"raindrops": {
|
||||
"favorites": {
|
||||
"name": "Favorites",
|
||||
"items": {
|
||||
"1": "3033146",
|
||||
"2": "3033055",
|
||||
"3": "3033262"
|
||||
}
|
||||
},
|
||||
"6643018b4d83a1a0": {
|
||||
"name": "Test category",
|
||||
"items": [
|
||||
"3033212"
|
||||
]
|
||||
},
|
||||
"fcd20e62e153084f": {
|
||||
"name": "Not cool stuff",
|
||||
"items": [
|
||||
"3033092"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
{"original":"dab877d2664c416d70db3af3c0ab8a519232381ee2cc413fe22a9e3d3ae521c41cedbe04","user":"raindrops"}
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
$tags = json_decode(file_get_contents("./data/tags.json"), true);
|
||||
|
||||
foreach ($tags["db"] as $name => $tag) {
|
||||
if ($tag["fetched"]) continue;
|
||||
|
||||
echo("$name\n");
|
||||
$data = json_decode(file_get_contents("https://derpibooru.org/api/v1/json/tags/" . urlencode($name), false, stream_context_create([
|
||||
"http" => [
|
||||
"method" => "GET",
|
||||
"header" => "User-Agent: Mozilla/5.0 (+Booru/1.0)\r\n"
|
||||
]
|
||||
])), true)["tag"];
|
||||
|
||||
if (isset($data)) {
|
||||
echo(" Aliases: " . implode(", ", array_map(function ($i) { return urldecode($i); }, $data["aliases"] ?? [])) . "\n");
|
||||
echo(" Category: " . ($data["category"] ?? "(default)") . "\n");
|
||||
|
||||
if (isset($data["category"]) && !in_array($data["category"], array_keys($tags["categories"]))) {
|
||||
$tags["categories"][$data["category"]] = "0,0,0";
|
||||
}
|
||||
|
||||
$tag["aliases"] = array_unique([...$tag["aliases"], ...($data["aliases"] ?? [])]);
|
||||
$tag["category"] = $data["category"];
|
||||
$tag["fetched"] = true;
|
||||
} else {
|
||||
$tag["fetched"] = true;
|
||||
}
|
||||
|
||||
$tag["reviewed"] = "// TAG IS AWAITING SECOND REVIEW //";
|
||||
|
||||
$tags["db"][$name] = $tag;
|
||||
file_put_contents("./data/tags.json", json_encode($tags, JSON_PRETTY_PRINT));
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"default": "-bipedal, -human, -anthro, -face mask, -machine learning generated, -comic:pipp's ponyfans adventure, -content-aware scale, -pony creator, -youtube caption, -forced meme, -fluffy pony grimdark, -grimdark, -grotesque, -obligatory pony, -drama bait, -questionable, -not pony related, -text only, -deviantart stamp, -explicit, -exploitable meme, -nazi, -racial slur, -abuse, -suggestive, -1000 hours in ms paint, -politics, -semi-grimdark, -seizure warning, -screencap, -edited screencap, -vulgar, -mockup, -fat, -sexy, -equestria girls, -big breasts, -large butt, -butt, -scootadash, -pregnant, -belly, -fetish, -drugs, -animated, -webm, -hoof knuckles, -your character here, -alcohol, -cigarette, -gmod, -them's fightin' herds, -meme, -gameloft, -ponified, -ych result, -species swap",
|
||||
"nsfw": "explicit, -sketch, -original species, -traditional art, -transparent background, -opaline, -opaline arcana, -princess luna, -princess cadance, -jazz (g5), -queen haven, -smolder, -machine learning generated, -content-aware scale, -pony creator, -youtube caption, -forced meme, -fluffy pony grimdark, -grimdark, -grotesque, -obligatory pony, -drama bait, -questionable, -not pony related, -text only, -deviantart stamp, -exploitable meme, -nazi, -racial slur, -abuse, -suggestive, -1000 hours in ms paint, -politics, -semi-grimdark, -seizure warning, -screencap, -edited screencap, -vulgar, -mockup, -fat, -equestria girls, -big breasts, -large butt, -safe, -foalcon, -human, -anthro, -rainbow dash, -fluttershy, -zoom zephyrwing, -thunder (g5), -posey, -babs seed, -sweetie belle, -scootaloo, -twilight, -twilight sparkle, -sweetie bot, -thunder, -zoom, -misty, -zipp storm, -pipp petals, -penis, -licking cock, -dickgirl, -dicks everywhere, -dickboop, -dick in a box, -fart on dick, -dick -flattening, -cockblock, -male, -solo male, -masturbation, -masturbating in stomach, -stallion, -balls, -big balls, -close-up, -rope, -tied up, -ballgag, -diaper, -diaper fetish, -incest, -cyborg, -bondage, -apple bloom, -merch sexploitation, -fetish, -tentacle porn, -chastity belt, -deer, -zebra, -big crotchboobs, -cat, -3d, -tentacles, -sunny starscout, -izzy moonbow, -derpy hooves, -princess celestia, -trixie, -starlight glimmer, -pinkie pie, -applejack, -rarity, -them's fightin' herds, -your character here, -alcohol, -cigarette, -gmod, -meme, -gameloft, -ponified, -ych result, -species swap",
|
||||
"minimal": "-sketch, -original species, -traditional art, -transparent background, -machine learning generated, -content-aware scale, -pony creator, -youtube caption, -forced meme, -fluffy pony grimdark, -grimdark, -grotesque, -obligatory pony, -drama bait, -questionable, -not pony related, -text only, -deviantart stamp, -exploitable meme, -nazi, -racial slur, -abuse, -suggestive, -1000 hours in ms paint, -politics, -semi-grimdark, -seizure warning, -screencap, -edited screencap, -vulgar, -mockup, -fat, -big breasts, -large butt, -foalcon, -human, -anthro, -penis, -licking cock, -dickgirl, -dicks everywhere, -dickboop, -dick in a box, -fart on dick, -dick -flattening, -cockblock, -male, -solo male, -masturbation, -masturbating in stomach, -stallion, -balls, -big balls, -close-up, -rope, -tied up, -ballgag, -diaper, -diaper fetish, -incest, -cyborg, -bondage, -merch sexploitation, -fetish, -tentacle porn, -chastity belt, -deer, -zebra, -big crotchboobs, -cat, -3d, -tentacles, -them's fightin' herds, -your character here, -alcohol, -cigarette, -gmod, -meme, -gameloft, -ponified, -ych result, -species swap"
|
||||
}
|
@ -0,0 +1,180 @@
|
||||
<div class="modal fade" id="image-preview">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Image viewer</h4>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" id="image-preview-container">
|
||||
-
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let tags = JSON.parse(atob(`<?= base64_encode(json_encode(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/tags.json"), true)["db"])) ?>`));
|
||||
let categories = JSON.parse(atob(`<?= base64_encode(json_encode(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/tags.json"), true)["categories"])) ?>`));
|
||||
|
||||
function timeAgo(time) {
|
||||
if (!isNaN(parseInt(time))) {
|
||||
time = new Date(time).getTime();
|
||||
}
|
||||
|
||||
let periods = ["seconde", "minute", "hour", "day", "week", "month", "year", "age"];
|
||||
let lengths = ["60", "60", "24", "7", "4.35", "12", "100"];
|
||||
|
||||
let now = new Date().getTime();
|
||||
|
||||
let difference = Math.round((now - time) / 1000);
|
||||
let tense;
|
||||
let period;
|
||||
|
||||
if (difference <= 10 && difference >= 0) {
|
||||
return "now";
|
||||
} else if (difference > 0) {
|
||||
tense = "ago";
|
||||
} else {
|
||||
tense = "later";
|
||||
}
|
||||
|
||||
let j;
|
||||
|
||||
for (j = 0; difference >= lengths[j] && j < lengths.length - 1; j++) {
|
||||
difference /= lengths[j];
|
||||
}
|
||||
|
||||
difference = Math.round(difference);
|
||||
|
||||
period = periods[j];
|
||||
|
||||
return `${difference} ${period}${difference > 1 ? 's' : ''} ${tense}`;
|
||||
}
|
||||
|
||||
function titleCase(str) {
|
||||
let splitStr = str.toLowerCase().split(' ');
|
||||
for (let i = 0; i < splitStr.length; i++) {
|
||||
splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
|
||||