diff --git a/ext/rule34/info.php b/ext/rule34/info.php deleted file mode 100644 index e2c9a4f6..00000000 --- a/ext/rule34/info.php +++ /dev/null @@ -1,21 +0,0 @@ -notify("shm_image_bans", $event->image->hash); - } - - public function onImageInfoSet(ImageInfoSetEvent $event): void - { - global $cache; - $cache->delete("thumb-block:{$event->image->id}"); - } - - public function onAdminBuilding(AdminBuildingEvent $event): void - { - global $page; - $html = make_form(make_link("admin/cache_purge"), "POST"); - $html .= ""; - $html .= "
"; - $html .= "\n"; - $page->add_block(new Block("Cache Purger", $html)); - } - - public function onCliGen(CliGenEvent $event): void - { - $event->app->register('wipe-thumb-cache') - ->addArgument('tags', InputArgument::REQUIRED) - ->setDescription('Delete cached thumbnails for images matching the given tags') - ->setCode(function (InputInterface $input, OutputInterface $output): int { - global $cache; - $tags = Tag::explode($input->getArgument('tags')); - foreach (Search::find_images_iterable(0, null, $tags) as $image) { - $output->writeln((string)$image->id); - $cache->delete("thumb-block:{$image->id}"); - } - return Command::SUCCESS; - }); - } - - public function onSourceSet(SourceSetEvent $event): void - { - // Maybe check for 404? - if (empty($event->source)) { - return; - } - if (!preg_match("/^(https?:\/\/)?[a-zA-Z0-9\.\-]+(\/.*)?$/", $event->source)) { - throw new SCoreException("Invalid source URL"); - } - } - - public function onRobotsBuilding(RobotsBuildingEvent $event): void - { - // robots should only check the canonical site, not mirrors - if ($_SERVER['HTTP_HOST'] != "rule34.paheal.net") { - $event->add_disallow(""); - } - } - - public function onPageRequest(PageRequestEvent $event): void - { - global $database, $page, $user; - - # Database might not be connected at this point... - #$database->set_timeout(null); // deleting users can take a while - - $page->add_html_header(""); - $page->add_html_header(""); - - if ($event->page_matches("tnc_agreed")) { - setcookie("ui-tnc-agreed", "true", 0, "/"); - $page->set_mode(PageMode::REDIRECT); - $page->set_redirect(referer_or("/")); - } - - if ($event->page_matches("admin/cache_purge")) { - if (!$user->can(Permissions::MANAGE_ADMINTOOLS)) { - $this->theme->display_permission_denied(); - } else { - if ($user->check_auth_token()) { - $all = $_POST["hash"]; - $matches = []; - if (preg_match_all("/([a-fA-F0-9]{32})/", $all, $matches)) { - $matches = $matches[0]; - foreach ($matches as $hash) { - $page->flash("Cleaning {$hash}"); - if (strlen($hash) != 32) { - continue; - } - log_info("admin", "Cleaning {$hash}"); - @unlink(warehouse_path(Image::IMAGE_DIR, $hash)); - @unlink(warehouse_path(Image::THUMBNAIL_DIR, $hash)); - $database->notify("shm_image_bans", $hash); - } - } - } - - $page->set_mode(PageMode::REDIRECT); - $page->set_redirect(make_link("admin")); - } - } - } -} diff --git a/ext/rule34/script.js b/ext/rule34/script.js deleted file mode 100644 index 6c41f30e..00000000 --- a/ext/rule34/script.js +++ /dev/null @@ -1,39 +0,0 @@ -let tnc_div = document.createElement('div'); -tnc_div.innerHTML = ` -
-
-

Cookies may be used. Please read our privacy policy for more information. -

By accepting to enter you agree to our rules and terms of service. -

Agree / Disagree -

-`; - - -document.addEventListener('DOMContentLoaded', () => { - if(shm_cookie_get("ui-tnc-agreed") !== "true" && window.location.href.indexOf("/wiki/") == -1) { - document.body.classList.add('censored'); - document.body.appendChild(tnc_div); - } -}); - -function tnc_agree() { - shm_cookie_set("ui-tnc-agreed", "true"); - document.body.classList.remove('censored'); - tnc_div.remove(); -} - -function image_hash_ban(id) { - var reason = prompt("WHY?", "DNP"); - if(reason) { - $.post( - "/image_hash_ban/add", - { - "image_id": id, - "reason": reason, - }, - function() { - $("#thumb_" + id).parent().parent().hide(); - } - ); - } -} diff --git a/ext/rule34/style.css b/ext/rule34/style.css deleted file mode 100644 index 13aca22b..00000000 --- a/ext/rule34/style.css +++ /dev/null @@ -1,35 +0,0 @@ -BODY.censored #header, -BODY.censored NAV, -BODY.censored ARTICLE, -BODY.censored FOOTER { - filter: blur(10px); -} -.tnc_bg { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: #ACE4A3; - opacity: 0.75; - z-index: 999999999999999999999; -} -.tnc { - position: fixed; - top: 20%; - left: 20%; - right: 20%; - text-align: center; - font-size: 2rem; - background: #ACE4A3; - border: 1px solid #7EB977; - z-index: 9999999999999999999999; -} -@media (max-width: 1024px) { - .tnc { - top: 5%; - left: 5%; - right: 5%; - font-size: 3vw; - } -} diff --git a/themes/rule34v2/.gitignore b/themes/rule34v2/.gitignore deleted file mode 100644 index 13c95f72..00000000 --- a/themes/rule34v2/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.png -*.jpg -*.gif -*.mp3 -*.html -ad* -ads* -random* diff --git a/themes/rule34v2/flags/china-flag.png b/themes/rule34v2/flags/china-flag.png deleted file mode 100644 index b54e1c73..00000000 Binary files a/themes/rule34v2/flags/china-flag.png and /dev/null differ diff --git a/themes/rule34v2/flags/dutch-flag.png b/themes/rule34v2/flags/dutch-flag.png deleted file mode 100644 index 99d69fde..00000000 Binary files a/themes/rule34v2/flags/dutch-flag.png and /dev/null differ diff --git a/themes/rule34v2/flags/english-flag.png b/themes/rule34v2/flags/english-flag.png deleted file mode 100644 index c171928b..00000000 Binary files a/themes/rule34v2/flags/english-flag.png and /dev/null differ diff --git a/themes/rule34v2/flags/finnish-flag.png b/themes/rule34v2/flags/finnish-flag.png deleted file mode 100644 index eddfdba4..00000000 Binary files a/themes/rule34v2/flags/finnish-flag.png and /dev/null differ diff --git a/themes/rule34v2/flags/german-flag.png b/themes/rule34v2/flags/german-flag.png deleted file mode 100644 index 1b9d04f6..00000000 Binary files a/themes/rule34v2/flags/german-flag.png and /dev/null differ diff --git a/themes/rule34v2/flags/italian-flag.png b/themes/rule34v2/flags/italian-flag.png deleted file mode 100644 index c687ea2b..00000000 Binary files a/themes/rule34v2/flags/italian-flag.png and /dev/null differ diff --git a/themes/rule34v2/flags/norway-flag.png b/themes/rule34v2/flags/norway-flag.png deleted file mode 100644 index 0e9bb5a8..00000000 Binary files a/themes/rule34v2/flags/norway-flag.png and /dev/null differ diff --git a/themes/rule34v2/flags/port-flag.png b/themes/rule34v2/flags/port-flag.png deleted file mode 100644 index b883e280..00000000 Binary files a/themes/rule34v2/flags/port-flag.png and /dev/null differ diff --git a/themes/rule34v2/flags/russian-flag.png b/themes/rule34v2/flags/russian-flag.png deleted file mode 100644 index 95333f6f..00000000 Binary files a/themes/rule34v2/flags/russian-flag.png and /dev/null differ diff --git a/themes/rule34v2/flags/spain-flag.png b/themes/rule34v2/flags/spain-flag.png deleted file mode 100644 index 4c2921f0..00000000 Binary files a/themes/rule34v2/flags/spain-flag.png and /dev/null differ diff --git a/themes/rule34v2/flags/swedish-flag.png b/themes/rule34v2/flags/swedish-flag.png deleted file mode 100644 index b0e4a760..00000000 Binary files a/themes/rule34v2/flags/swedish-flag.png and /dev/null differ diff --git a/themes/rule34v2/header.inc b/themes/rule34v2/header.inc deleted file mode 100644 index 1c85fd24..00000000 --- a/themes/rule34v2/header.inc +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - -
- - - -
- - -
diff --git a/themes/rule34v2/index.theme.php b/themes/rule34v2/index.theme.php deleted file mode 100644 index 02602f56..00000000 --- a/themes/rule34v2/index.theme.php +++ /dev/null @@ -1,50 +0,0 @@ -can("delete_image") ? "can-del" : ""; - $h_query = html_escape($query); - - $table = "
"; - foreach ($images as $image) { - $table .= $this->build_thumb_html($image); - } - $table .= "
"; - return $table; - } - - // Override to add a custom error message - public function display_page(Page $page, $images): void - { - $this->display_page_header($page, $images); - - $nav = $this->build_navigation($this->page_number, $this->total_pages, $this->search_terms); - if (!empty($this->search_terms)) { - static::$_search_query = $this->search_terms; - } - $page->add_block(new Block("Navigation", $nav, "left", 0)); - - if (count($images) > 0) { - $this->display_page_images($page, $images); - } else { - $this->display_error( - 404, - "No Posts Found", - "No images were found to match the search criteria. Try looking up a character/series/artist by another name if they go by more than one. Remember to use underscores in place of spaces and not to use commas. If you came to this page by following a link, try using the search box directly instead. See the FAQ for more information." - ); - } - } -} diff --git a/themes/rule34v2/menuh.css b/themes/rule34v2/menuh.css deleted file mode 100644 index 1fb96d80..00000000 --- a/themes/rule34v2/menuh.css +++ /dev/null @@ -1,121 +0,0 @@ -/* Begin CSS Drop Down Menu */ - -a:link.menu { color:#FF0000; text-decoration: none; } - -a:visited.menu { color: #FF0000; text-decoration: none; } - -a:hover.menu { color: #FF0000; text-decoration: none; } - -a:active.menu { color: #FF0000; text-decoration: none; } - -#menuh-container - { - font-size: 1rem; - float: left; - top:0; - left: 5%; - width: 100%; - margin: 0; - } - -#menuh - { - font-size: small; - font-family: arial, helvetica, sans-serif; - width:100%; - margin-top: 0; - } - -#menuh a.sub_option - { - border: 1px solid #555; - /*background-image:url(topban.jpg);*/ - } - -#menuh a - { - text-align: center; - background: #ACE4A3; - display:block; - white-space:nowrap; - margin: 0; - padding: 0.2em; - } - -#menuh a, #menuh a:visited /* menu at rest */ - { - color: #000099; - text-decoration:none; - } - -#menuh a:hover /* menu at mouse-over */ - { - color: #000000; - } - -#menuh a.top_parent, #menuh a.top_parent:hover /* attaches down-arrow to all top-parents */ - { - /*background-image: url(navdown_white.gif);*/ - background-position: right center; - background-repeat: no-repeat; - } - -#menuh a.parent, #menuh a.parent:hover /* attaches side-arrow to all parents */ - { - /*background-image: url(nav_white.gif);*/ - background-position: right center; - border: 1px solid #555; - background-repeat: no-repeat; - } - -#menuh ul - { - list-style:none; - margin:0; - padding:0; - float:left; - width:10em; /* width of all menu boxes */ - } - -#menuh li - { - position:relative; - min-height: 1px; /* Sophie Dennis contribution for IE7 */ - vertical-align: bottom; /* Sophie Dennis contribution for IE7 */ - } - -#menuh ul ul - { - position:absolute; - z-index:500; - top:auto; - display:none; - padding: 1em; - margin:-1em 0 0 -1em; - } - -#menuh ul ul ul - { - top:0; - left:100%; - } - -div#menuh li:hover - { - cursor:pointer; - z-index:100; - } - -div#menuh li:hover ul ul, -div#menuh li li:hover ul ul, -div#menuh li li li:hover ul ul, -div#menuh li li li li:hover ul ul -{display:none;} - -div#menuh li:hover ul, -div#menuh li li:hover ul, -div#menuh li li li:hover ul, -div#menuh li li li li:hover ul -{display:block;} - -/* End CSS Drop Down Menu */ diff --git a/themes/rule34v2/page.class.php b/themes/rule34v2/page.class.php deleted file mode 100644 index e11cd76c..00000000 --- a/themes/rule34v2/page.class.php +++ /dev/null @@ -1,136 +0,0 @@ -get_string('theme', 'default'); - $header_html = $this->get_all_html_headers(); - $data_href = get_base_href(); - - return <<{$this->title} - - - - -$header_html - - - - - -EOD; - } - - public function body_html(): string - { - global $config, $user; - - $left_block_html = ""; - $right_block_html = ""; - $main_block_html = ""; - $head_block_html = ""; - $sub_block_html = ""; - - $main_headings = 0; - foreach ($this->blocks as $block) { - if ($block->section == "main" && !empty($block->header) && $block->header != "Comments") { - $main_headings++; - } - } - - foreach ($this->blocks as $block) { - switch ($block->section) { - case "left": - $left_block_html .= $block->get_html(true); - break; - case "right": - $right_block_html .= $block->get_html(true); - break; - case "head": - $head_block_html .= "".$block->get_html(false).""; - break; - case "main": - if ($main_headings == 1) { - $block->header = null; - } - $main_block_html .= $block->get_html(false); - break; - case "subheading": - $sub_block_html .= $block->body; // $block->get_html(true); - break; - default: - print "

error: {$block->header} using an unknown section ({$block->section})"; - break; - } - } - - $query = !empty(CustomIndexTheme::$_search_query) ? html_escape(Tag::implode(CustomIndexTheme::$_search_query)) : ""; - // @phpstan-ignore-next-line - yes this is deliberately asserting a constant - assert(!is_null($query)); # used in header.inc, do not remove :P - $flash_html = $this->flash ? "".nl2br(html_escape(implode("\n", $this->flash)))."" : ""; - $generated = autodate(date('c')); - $footer_html = $this->footer_html(); - - $header_inc = file_get_contents_ex("themes/rule34v2/header.inc"); - assert($header_inc !== false); - $header_inc = str_replace('$QUERY', $query, $header_inc); - return << - - $header_inc - $head_block_html - - - $sub_block_html - -

- -
- $flash_html - - $main_block_html -
- - - - - - -EOD; - } -} diff --git a/themes/rule34v2/prebid-ads.js b/themes/rule34v2/prebid-ads.js deleted file mode 100644 index 59a38482..00000000 --- a/themes/rule34v2/prebid-ads.js +++ /dev/null @@ -1 +0,0 @@ -var canRunAds = true; diff --git a/themes/rule34v2/rule34_logo_top.png b/themes/rule34v2/rule34_logo_top.png deleted file mode 100644 index 98298cb0..00000000 Binary files a/themes/rule34v2/rule34_logo_top.png and /dev/null differ diff --git a/themes/rule34v2/script.js b/themes/rule34v2/script.js deleted file mode 100644 index 7897627b..00000000 --- a/themes/rule34v2/script.js +++ /dev/null @@ -1,48 +0,0 @@ -// Disable things that get in the way of smooth admin'ing -document.addEventListener('DOMContentLoaded', () => { - document.querySelectorAll("input[type='date']").forEach(e => e.setAttribute('type', 'text')); -}); - -// Navbar controls -var navHidden = false; -function toggleNav() { - if(navHidden) { - document.body.classList.remove('navHidden'); - shm_cookie_set("ui-shownav", "true"); - } - else { - document.body.classList.add('navHidden'); - shm_cookie_set("ui-shownav", "false"); - } - navHidden = !navHidden; -} - -document.addEventListener('DOMContentLoaded', () => { - if(shm_cookie_get("ui-shownav") === "false") { - toggleNav(); - } -}); - -// Desktop mode toggle -var forceDesktop = false; -function toggleDesktop() { - if(forceDesktop) { - let viewport = document.querySelector("meta[name=viewport]"); - viewport.setAttribute('content', 'width=512'); - shm_cookie_set("ui-desktop", "false"); - } - else { - let viewport = document.querySelector("meta[name=viewport]"); - viewport.setAttribute('content', 'width=1024, initial-scale=0.4'); - shm_cookie_set("ui-desktop", "true"); - navHidden = true; - toggleNav(); - } - forceDesktop = !forceDesktop; -} - -document.addEventListener('DOMContentLoaded', () => { - if(shm_cookie_get("ui-desktop") === "true") { - toggleDesktop(); - } -}); diff --git a/themes/rule34v2/static/favicon.ico b/themes/rule34v2/static/favicon.ico deleted file mode 100644 index 2ec940d8..00000000 Binary files a/themes/rule34v2/static/favicon.ico and /dev/null differ diff --git a/themes/rule34v2/style.css b/themes/rule34v2/style.css deleted file mode 100644 index 3376c912..00000000 --- a/themes/rule34v2/style.css +++ /dev/null @@ -1,379 +0,0 @@ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* things common to all pages * -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -:root { - font-family: "Arial", sans-serif; - font-size: 14px; -} -BODY { - background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPBAMAAADJ+Ih5AAAAFVBMVEV8und+uXeo5aKo5qOq5aOr46Ks5KN5+6UZAAAAN0lEQVQImWNIc2FLcUhzYWBIczRLEU5zNGBwEQlxdHURCWBwdEkRcXN0SWBgVkswSgMSDDRTDADa2B2AhUf94AAAAABJRU5ErkJggg=='); - margin: 0; -} -#header { - border-bottom: 1px solid #7EB977; - margin-top: 0; - margin-bottom: 16px; - padding: 8px; - background: #ACE4A3; - text-align: center; -} -H1 { - font-size: 5rem; - margin: 0; - padding: 0; -} -H1 A { - color: black; -} -H3 { - text-align: center; - margin: 0; -} -THEAD { - font-weight: bold; -} -TD { - vertical-align: top; - text-align: center; -} - -#flash { - background: #FF7; - display: block; - padding: 8px; - margin: 8px; - border: 1px solid #882; -} - -TABLE.zebra {background: #ACE4A3; border-collapse: collapse; border: 1px solid #7EB977;} -TABLE.zebra TD {font-size: 0.8rem;margin: 0; border-top: 1px solid #7EB977; padding: 2px;} -TABLE.zebra TR:nth-child(odd) {background: #9CD493;} -TABLE.zebra TR:nth-child(even) {background: #ACE4A3;} - -FOOTER { - clear: both; - padding: 8px; - font-size: 0.7rem; - text-align: center; - border-top: 1px solid #7EB977; - background: #ACE4A3; -} - - -A {color: #000099; text-decoration: none; font-weight: bold;} -A:hover {color: #000099; text-decoration: underline;} -A:visited {color: #000099; text-decoration: none} -A:active {color: #000099; text-decoration: underline;} - -UL { - text-align: left; -} - -.ad1{ - display:flex; - justify-content:center; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* the navigation bar, and all its blocks * -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -NAV { - width: 250px; - float: left; - text-align: center; - margin-left: 16px; -} -NAV .blockbody { - font-size: 0.85rem; - text-align: center; -} -NAV TABLE { - width: 100%; -} -NAV TD { - vertical-align: middle; -} -NAV INPUT { - width: 100%; - padding: 0; -} -NAV SELECT { - width: 100%; - padding: 0; -} - -#Friends_of_Pahealleft { - z-index: 0; - position: relative; -} - -.comment .info { - background: #ACE4A3; - border: 1px solid #7EB977; -} - -.more:after { - content: " >>>"; -} - -.tag_count:before { - content: "("; -} -.tag_count:after { - content: ")"; -} - -#imagelist .blockbody, -#paginator .blockbody { - background: none; - border: none; - box-shadow: none; -} - -#commentlistimage .blockbody, -#commentlistrecent .blockbody { - background: none; - border: none; - box-shadow: none; - padding: 0; -} - -#commentlistimage .blockbody .comment, -#commentlistrecent .blockbody .comment { - margin-left: 0; - margin-right: 0; -} - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* the main part of each page * -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -ARTICLE { - margin-left: 276px; - margin-right: 16px; - text-align: center; - height: 1%; - margin-top: 16px; -} -ARTICLE TABLE { - width: 90%; - margin: auto; -} -NAV SECTION:first-child H3 { - margin-top: 0; -} - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* specific page types * -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#pagelist { - margin-top: 32px; -} - -#tagmap A { - padding: 8px 4px 8px 4px; -} - -SECTION>.blockbody, .comment, .setupblock { - background: #ACE4A3; - margin: 8px; - border: 1px solid #7EB977; - padding: 8px; -} - -SECTION>H3 { - text-align: center; - background: #9CD493; - margin: 8px; - border: 1px solid #7EB977; - padding: 8px; -} - -.shm-image-list { - justify-items: center; - align-items: end; -} -.thumb { - text-align: center; -} -.thumb IMG { - border: 1px solid #7EB977; - background: #ACE4A3; - padding: 4px; -} - -.username { - font-weight: bold; -} - -#bans TD, .image_info TD { - vertical-align: middle; -} -#bans INPUT { - font-size: 0.85rem; -} - -.need-del { - display: none; -} -.can-del .need-del { - display: inline; -} - - -.unread { - color: red; -} - -[data-tags~="ai-generated"]>A>IMG { background: #BC8F8F; } -[data-tags~="animated"]>A>IMG { background: #CC00CC; } -[data-ext="mp4"]>A>IMG, -[data-ext="webm"]>A>IMG { background: #0000FF; } - -#menuh-container { - float: none; - width: 650px; - margin: auto; -} - -/* - * Image info - show both edit and view modes at the same time, - * except for Tags, Locked, and the Edit button. - */ -.image_info.infomode-view .edit, -.image_info.infomode-view .view { - display: block; -} -.image_info.infomode-view TR[data-row="Tags"] .view, -.image_info.infomode-view TR[data-row="Locked"] .view, -.image_info INPUT[type="button"][value="Edit"] { - display: none; -} - - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* responsive overrides * -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -@media (max-width: 750px) { - .atoz, #paginator { - font-size: 2rem; - } - .header-sites { - display: none; - } - SECTION>.blockbody { - overflow-x: auto; - } -} - -/* responsive padding */ -@media (max-width: 1024px) { - NAV {margin-left: 0;} - ARTICLE {margin-right: 0; margin-left: 242px;} -} -@media (max-width: 750px) { - NAV {margin-left: 0;} - ARTICLE {margin-right: 0; margin-left: 250px;} -} - -/* responsive navbar */ -#nav-toggle {display: none;} -@media (max-width: 750px) { - TD#nav-toggle {display: table-cell; width: 40px;} - #nav-toggle A {border: 1px solid black; border-radius: 8px;} - #nav-toggle A:hover {text-decoration: none;} - - NAV>SECTION>.blockbody, - NAV>SECTION>.blockbody>.comment { - margin: 0; - } - NAV>SECTION>H3 { - margin: 0; - } - - BODY.navHidden #menuh-container {display: none;} - BODY.navHidden NAV {display: none;} - BODY.navHidden ARTICLE {margin-left: 0;} - -/* - NAV { - position: fixed; - top: 6.5em; - bottom: 0px; - overflow-y: scroll; - } - */ -} - -/* sticky header */ -@media (max-width: 750px) { - BODY.navHidden {padding-top: 5.4em} -} -@media (max-width: 750px) { - #header {position: fixed; top: 0; left: 0; z-index: 99999999999;} - .ui-autocomplete {z-index: 999999999999;} - BODY {padding-top: 7em} -} - -/* responsive header */ -#Uploadleft {display: none;} -#Uploadhead {display: block;} -#UserBlockleft {display: none;} -#UserBlockhead {display: block;} -#Loginleft {display: none;} -#Loginhead {display: block;} -.headcol {width: 250px; font-size: 0.85rem;} -.headbox {width: 80%; margin: auto;} -.headbox INPUT {width: 100%;} -#big-logo {display: table-cell;} -#mini-logo {display: none;} -@media (max-width: 1024px) { - #Uploadleft {display: block;} - #Uploadhead {display: none;} - #UserBlockleft {display: block;} - #UserBlockhead {display: none;} - #Loginleft {display: block;} - #Loginhead {display: none;} - .headcol {display: none;} - .headbox {width: 100%; margin: auto;} - #big-logo {display: none;} - #mini-logo {display: table-cell; width: 100px;} - - /* hide nav-search when header-search is sticky */ - ARTICLE {margin-top: 0;} - #Navigationleft .blockbody {font-size: 1.5rem;} - #Navigationleft .blockbody P, - #Navigationleft .blockbody FORM - {display: none;} -} - -/* responsive comments */ -.comment_list_table {width: 100%;} - -/* responsive misc */ -@media (max-width: 750px) { - #shm-main-image { max-width: 95%; } -} - -#ed91727bc9c7a73fdcec6db562e63151main { - overflow: scroll; -} - -/* front page */ -div#front-page h1 {font-size: 4rem; margin-top: 2em; margin-bottom: 0; text-align: center; border: none; background: none; box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;} -div#front-page {text-align:center;} -.space {margin-bottom: 1em;} -div#front-page div#links a {margin: 0 0.5em;} -div#front-page li {list-style-type: none; margin: 0;} -@media (max-width: 800px) { - div#front-page h1 {font-size: 3rem; margin-top: 0.5em; margin-bottom: 0.5em;} - #counter {display: none;} -} diff --git a/themes/rule34v2/themelet.class.php b/themes/rule34v2/themelet.class.php deleted file mode 100644 index e26ff229..00000000 --- a/themes/rule34v2/themelet.class.php +++ /dev/null @@ -1,53 +0,0 @@ -get("thumb-block:{$image->id}"); - if (!is_null($cached)) { - return rawHTML($cached); - } - - $id = $image->id; - $view_link = make_link('post/view/'.$id); - $image_link = $image->get_image_link(); - $thumb_link = $image->get_thumb_link(); - $tip = $image->get_tooltip(); - $tags = strtolower($image->get_tag_list()); - $ext = strtolower($image->get_ext()); - - // If file is flash or svg then sets thumbnail to max size. - if ($image->get_mime() === MimeType::FLASH || $image->get_mime() === MimeType::SVG) { - $tsize = get_thumbnail_size($config->get_int('thumb_width'), $config->get_int('thumb_height')); - } else { - $tsize = get_thumbnail_size($image->width, $image->height); - } - - $html = DIV( - ['class' => 'shm-thumb thumb', 'data-ext' => $ext, 'data-tags' => $tags, 'data-post-id' => $id], - A( - ['class' => 'shm-thumb-link', 'href' => $view_link], - IMG(['id' => "thumb_$id", 'title' => $tip, 'alt' => $tip, 'height' => $tsize[1], 'width' => $tsize[0], 'src' => $thumb_link, 'loading' => 'lazy']) - ), - BR(), - A(['href' => $image_link], 'File Only'), - SPAN(['class' => 'need-del'], ' - ', A(['href' => '#', 'onclick' => "image_hash_ban($id); return false;"], 'Ban')) - ); - - // cache for ages; will be cleared in ext/index:onImageInfoSet - $cache->set("thumb-block:{$image->id}", (string)$html, rand(43200, 86400)); - - return $html; - } -} diff --git a/themes/rule34v2/upload.theme.php b/themes/rule34v2/upload.theme.php deleted file mode 100644 index 20f3e05a..00000000 --- a/themes/rule34v2/upload.theme.php +++ /dev/null @@ -1,44 +0,0 @@ -add_block(new Block("Upload", $this->build_upload_block(), "head", 20)); - $page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20)); - } - - // override to put the warning in the header - public function display_full(Page $page): void - { - $page->add_block(new Block("Upload", "Disk nearly full, uploads disabled", "head", 20)); - } - - // override to remove small uploader and just show a link to - // the big page - protected function build_upload_block(): HTMLElement - { - return A(["href" => make_link("upload"), "style" => 'font-size: 1.7rem; display: block;'], "Upload"); - } -} diff --git a/themes/rule34v2/user.theme.php b/themes/rule34v2/user.theme.php deleted file mode 100644 index 1c16c0b3..00000000 --- a/themes/rule34v2/user.theme.php +++ /dev/null @@ -1,59 +0,0 @@ - $parts - */ - public function display_user_block(Page $page, User $user, array $parts): void - { - $h_name = html_escape($user->name); - $lines = []; - foreach ($parts as $part) { - if ($part["name"] == "User Options") { - continue; - } - $lines[] = "{$part["name"]}"; - } - if (count($lines) < 6) { - $html = implode("\n
", $lines); - } else { - $html = implode(" | \n", $lines); - } - $page->add_block(new Block("Logged in as $h_name", $html, "head", 90, "UserBlockhead")); - $page->add_block(new Block("Logged in as $h_name", $html, "left", 15, "UserBlockleft")); - } - - // Override to display login block in the head and in the left column - // (with css media queries deciding which one is visible) - public function display_login_block(Page $page): void - { - $page->add_block(new Block("Login", $this->create_login_block(), "head", 90)); - $page->add_block(new Block("Login", $this->create_login_block(), "left", 15)); - } -}