r34 theme
8
themes/rule34v2/.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
*.png
|
||||
*.jpg
|
||||
*.gif
|
||||
*.mp3
|
||||
*.html
|
||||
ad*
|
||||
ads*
|
||||
random*
|
BIN
themes/rule34v2/bg.png
Normal file
After Width: | Height: | Size: 145 B |
BIN
themes/rule34v2/favicon.ico
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
themes/rule34v2/flags/china-flag.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
themes/rule34v2/flags/dutch-flag.png
Normal file
After Width: | Height: | Size: 227 B |
BIN
themes/rule34v2/flags/english-flag.png
Normal file
After Width: | Height: | Size: 371 B |
BIN
themes/rule34v2/flags/finnish-flag.png
Normal file
After Width: | Height: | Size: 218 B |
BIN
themes/rule34v2/flags/german-flag.png
Normal file
After Width: | Height: | Size: 154 B |
BIN
themes/rule34v2/flags/italian-flag.png
Normal file
After Width: | Height: | Size: 240 B |
BIN
themes/rule34v2/flags/norway-flag.png
Normal file
After Width: | Height: | Size: 231 B |
BIN
themes/rule34v2/flags/port-flag.png
Normal file
After Width: | Height: | Size: 328 B |
BIN
themes/rule34v2/flags/russian-flag.png
Normal file
After Width: | Height: | Size: 220 B |
BIN
themes/rule34v2/flags/spain-flag.png
Normal file
After Width: | Height: | Size: 275 B |
BIN
themes/rule34v2/flags/swedish-flag.png
Normal file
After Width: | Height: | Size: 152 B |
94
themes/rule34v2/header.inc
Normal file
|
@ -0,0 +1,94 @@
|
|||
<table class="headbox">
|
||||
<tr>
|
||||
<td colspan="4" id="big-logo">
|
||||
<a class="vis-desktop" href="//rule34.paheal.net/post/list"><img alt="logo" src="//rule34.paheal.net/themes/rule34v2/rule34_logo_top.png" style="width: 240px; height: 104px;"/></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<form action='/post/list' method='GET' id="barbot">
|
||||
<td id="nav-toggle">
|
||||
<a style="font-size: 2em;" onclick="toggleNav();"> Sidebar </a>
|
||||
</td>
|
||||
<td id="mini-logo">
|
||||
<a class="vis-mobile" href="//rule34.paheal.net/post/list"><img alt="logo" src="//rule34.paheal.net/themes/rule34v2/rule34_logo_top.png" style="height: 34px;"/></a>
|
||||
</td>
|
||||
<td>
|
||||
<input name='search' size="45" type='text' placeholder='Search' autocomplete='off' class='autocomplete_tags' value="<?=$query;?>"/>
|
||||
</td>
|
||||
<td width="100">
|
||||
<input type='submit' value='Find' id="submit" style="border: 1px solid #888; height: 34px; border-radius: 2px; background: #EEE;"/>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div id="menuh-container">
|
||||
<div id="menuh">
|
||||
|
||||
<ul>
|
||||
<li><a href="//rule34.paheal.net/post/list" class="top_parent">Main ▼</a>
|
||||
<ul>
|
||||
<li><a href="//rule34.paheal.net/post/list" class="sub_option">Home page</a></li>
|
||||
<li><a href="//rule34.paheal.net/comment/list" class="sub_option">Comments</a></li>
|
||||
<li><a href="//rule34.paheal.net/tags" class="sub_option">Tags</a></li>
|
||||
<li><a href="//rule34.paheal.net/upload" class="sub_option">Upload</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!--<ul class="header-sites">
|
||||
<li><a href="#" class="top_parent">Sites</a>
|
||||
<ul>
|
||||
<li><a href="//rule34.paheal.net/" class="sub_option">Rule #34</a></li>
|
||||
<li><a href="http://rule63.paheal.net/" class="sub_option">Rule #63</a></li>
|
||||
<li><a href="http://cosplay.paheal.net/" class="sub_option">Cosplay</a></li>
|
||||
<li><a href="//rule34c.paheal.net/" class="sub_option">Rule #34c</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>-->
|
||||
|
||||
<ul>
|
||||
<li><a href="#" class="top_parent">Community ▼</a>
|
||||
<ul>
|
||||
<!--<li><a href="http://forum.paheal.net" class="sub_option">Forum</a></li>-->
|
||||
<li><a href="//rule34.paheal.net/wiki/friends" class="parent">Friends of paheal</a>
|
||||
<li><a href="//rule34.paheal.net/wiki/DNP" class="parent">DNP List</a>
|
||||
<li><a href="#" class="parent">Chat</a>
|
||||
<ul>
|
||||
<li><a href="irc://irc.rizon.net/rule34" class="sub_option">irc.rizon.net/rule34</a></li>
|
||||
<li><a href="http://widget.mibbit.com/?server=irc.rizon.net&nick=Anon%3F%3F%3F&channel=%23rule34" target="new" class="sub_option">Web Chat</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li><a href="//rule34.paheal.net/post/list" class="top_parent">Help ▼</a>
|
||||
<ul>
|
||||
<li><a href="//rule34.paheal.net/wiki/rules" class="sub_option">Site rules</a></li>
|
||||
<li><a href="//rule34.paheal.net/wiki/faq" class="sub_option">F.A.Q.</a></li>
|
||||
<li><a href="//rule34.paheal.net/wiki/tagging" class="sub_option">Tagging Guide</a></li>
|
||||
<li><a href="//rule34.paheal.net/wiki/staff" class="sub_option">Staff</a></li>
|
||||
<li><a href="#" class="parent">Contact</a>
|
||||
<ul>
|
||||
<li><a href="mailto:staff@paheal.net" class="sub_option">Staff</a></li>
|
||||
<li><a href="mailto:webmaster@shishnet.org" class="sub_option">Programmer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li><a class="menu top_parent" href="//rule34.paheal.net/wiki/Notes">ANNOUNCEMENTS</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
70
themes/rule34v2/home.theme.php
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
class CustomHomeTheme extends HomeTheme
|
||||
{
|
||||
public function display_page(Page $page, $sitename, $base_href, $theme_name, $body)
|
||||
{
|
||||
$page->set_mode("data");
|
||||
$page->add_auto_html_headers();
|
||||
$hh = $page->get_all_html_headers();
|
||||
$page->set_data(
|
||||
<<<EOD
|
||||
<html>
|
||||
<head>
|
||||
<title>$sitename</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
$hh
|
||||
<style>
|
||||
div#front-page h1 {font-size: 4em; margin-top: 2em; margin-bottom: 0px; 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: 3em; margin-top: 0.5em; margin-bottom: 0.5em;}
|
||||
#counter {display: none;}
|
||||
}
|
||||
</style>
|
||||
<meta name="trafficjunky-site-verification" content="9z3puyut0" />
|
||||
</head>
|
||||
<!--ja31114--p103-->
|
||||
<body>
|
||||
$body
|
||||
</body>
|
||||
</html>
|
||||
EOD
|
||||
);
|
||||
}
|
||||
|
||||
public function build_body(string $sitename, string $main_links, string $main_text, string $contact_link, $num_comma, string $counter_text)
|
||||
{
|
||||
$main_links_html = empty($main_links) ? "" : "<div class='space' id='links'>$main_links</div>";
|
||||
$message_html = empty($main_text) ? "" : "<div class='space' id='message'>$main_text</div>";
|
||||
$counter_html = empty($counter_text) ? "" : "<div class='space' id='counter'>$counter_text</div>";
|
||||
$contact_link = empty($contact_link) ? "" : "<br><a href='$contact_link'>Contact</a> –";
|
||||
$search_html = "
|
||||
<div class='space' id='search'>
|
||||
<form action='".make_link("post/list")."' method='GET'>
|
||||
<input name='search' size='60' type='text' value='' class='autocomplete_tags' autofocus='autofocus'/>
|
||||
<input type='hidden' name='q' value='/post/list'>
|
||||
<input type='submit' value='Search' style=\"border: 1px solid #888; height: 30px; border-radius: 2px; background: #EEE;\"/>
|
||||
</form>
|
||||
</div>
|
||||
";
|
||||
return "
|
||||
<div id='front-page'>
|
||||
<h1><a style='text-decoration: none;' href='".make_link()."'><span>$sitename</span></a></h1>
|
||||
$main_links_html
|
||||
$search_html
|
||||
$message_html
|
||||
$counter_html
|
||||
<div class='space' id='foot'>
|
||||
<small><small>
|
||||
$contact_link Serving $num_comma posts –
|
||||
Running <a href='http://code.shishnet.org/shimmie2/'>Shimmie</a>
|
||||
</small></small>
|
||||
</div>
|
||||
</div>";
|
||||
}
|
||||
}
|
39
themes/rule34v2/index.theme.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
class CustomIndexTheme extends IndexTheme
|
||||
{
|
||||
protected function build_table(array $images, ?string $query): string
|
||||
{
|
||||
global $user;
|
||||
|
||||
$candel = $user->can("delete_image") ? "can-del" : "";
|
||||
$h_query = html_escape($query);
|
||||
|
||||
$table = "<div class='shm-image-list $candel' data-query='$h_query'>";
|
||||
foreach ($images as $image) {
|
||||
$table .= $this->build_thumb_html($image);
|
||||
}
|
||||
$table .= "</div>";
|
||||
return $table;
|
||||
}
|
||||
|
||||
public function display_page(Page $page, $images)
|
||||
{
|
||||
$this->display_page_header($page, $images);
|
||||
|
||||
$nav = $this->build_navigation($this->page_number, $this->total_pages, $this->search_terms);
|
||||
if (!empty($this->search_terms)) {
|
||||
$page->_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 Images 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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
122
themes/rule34v2/menuh.css
Normal file
|
@ -0,0 +1,122 @@
|
|||
/* 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: 1em;
|
||||
float: left;
|
||||
top:0;
|
||||
left: 5%;
|
||||
width: 100%;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#menuh
|
||||
{
|
||||
font-size: small;
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
width:100%;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
#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;
|
||||
margin-top: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:9em; /* 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 */
|
134
themes/rule34v2/page.class.php
Normal file
|
@ -0,0 +1,134 @@
|
|||
<?php declare(strict_types=1);
|
||||
class Page extends BasePage
|
||||
{
|
||||
public function render($nav_links, $subnav_links)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$theme_name = $config->get_string('theme', 'default');
|
||||
$data_href = get_base_href();
|
||||
$contact_link = contact_link();
|
||||
$header_html = $this->get_all_html_headers();
|
||||
|
||||
$left_block_html = "";
|
||||
$right_block_html = "";
|
||||
$main_block_html = "";
|
||||
$head_block_html = "";
|
||||
$sub_block_html = "";
|
||||
|
||||
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 .= "<td class='headcol'>".$block->get_html(false)."</td>";
|
||||
break;
|
||||
case "main":
|
||||
$main_block_html .= $block->get_html(false);
|
||||
break;
|
||||
case "subheading":
|
||||
$sub_block_html .= $block->body; // $block->get_html(true);
|
||||
break;
|
||||
default:
|
||||
print "<p>error: {$block->header} using an unknown section ({$block->section})";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$debug = get_debug_info();
|
||||
|
||||
$contact = empty($contact_link) ? "" : "<br><a href='$contact_link'>Contact</a>";
|
||||
$subheading = empty($this->subheading) ? "" : "<div id='subtitle'>{$this->subheading}</div>";
|
||||
|
||||
$wrapper = "";
|
||||
if (strlen($this->heading) > 100) {
|
||||
$wrapper = ' style="height: 3em; overflow: auto;"';
|
||||
}
|
||||
|
||||
$flash_html = $this->flash ? "<b id='flash'>".nl2br(html_escape(implode("\n", $this->flash)))."</b>" : "";
|
||||
|
||||
$generated = autodate(date('c'));
|
||||
$debug .= "; generated $generated";
|
||||
$query = !empty($this->_search_query) ? html_escape(Tag::implode($this->_search_query)) : "";
|
||||
|
||||
$self = _get_query();
|
||||
|
||||
# $header_html_thing = file_get_contents("themes/rule34v2/header.inc");
|
||||
print <<<EOD
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{$this->title}</title>
|
||||
<meta name="description" content="Rule 34, if it exists there is porn of it."/>
|
||||
<meta name="viewport" content="width=1024">
|
||||
<link rel="stylesheet" href="$data_href/themes/$theme_name/menuh.css" type="text/css">
|
||||
$header_html
|
||||
|
||||
<script defer src="https://unpkg.com/webp-hero@0.0.0-dev.21/dist-cjs/polyfills.js"></script>
|
||||
<script defer src="https://unpkg.com/webp-hero@0.0.0-dev.21/dist-cjs/webp-hero.bundle.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
var webpMachine = new webpHero.WebpMachine()
|
||||
webpMachine.polyfillDocument()
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table id="header" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
EOD;
|
||||
include "themes/rule34v2/header.inc";
|
||||
print <<<EOD
|
||||
</td>
|
||||
$head_block_html
|
||||
</tr>
|
||||
</table>
|
||||
$sub_block_html
|
||||
|
||||
<nav>
|
||||
$left_block_html
|
||||
<p>
|
||||
<a href="//whos.amung.us/show/4vcsbthd"><img src="//whos.amung.us/widget/4vcsbthd.png" style="display:none" alt="web counter" /></a>
|
||||
</p>
|
||||
</nav>
|
||||
|
||||
<article>
|
||||
$flash_html
|
||||
<!-- <h2>Database reboot will be happening in a bit, expect a few minutes of downtime~</h2>
-->
|
||||
$main_block_html
|
||||
</article>
|
||||
|
||||
<footer>
|
||||
<font size="2px"><a href="http://rule34.paheal.net/wiki/Terms%20of%20use">Terms of use</a> !!! <a href="http://rule34.paheal.net/wiki/Privacy%20policy">Privacy policy</a> !!! <a href="http://rule34.paheal.net/wiki/2257">18 U.S.C. §2257</a><br /></font>
|
||||
<hr />
|
||||
<font size="2px">BTC: <b>193gutWtgirF7js14ivcXfnfQgXv9n5BZo</b>
|
||||
ETH: <b>0x68B88a00e69Bde88E9db1b9fC10b8011226e26aF</b></font>
|
||||
<hr />
|
||||
<br>
|
||||
Thank you!
|
||||
|
||||
Images © their respective owners,
|
||||
<a href="http://code.shishnet.org/shimmie2/">Shimmie</a> ©
|
||||
<a href="http://www.shishnet.org/">Shish</a> &
|
||||
<a href="https://github.com/shish/shimmie2/contributors">The Team</a>
|
||||
2007-2020,
|
||||
based on the Danbooru concept.
|
||||
$debug
|
||||
$contact
|
||||
</footer>
|
||||
|
||||
<!-- BEGIN EroAdvertising ADSPACE CODE -->
|
||||
<!--<script type="text/javascript" language="javascript" charset="utf-8" src="https://adspaces.ero-advertising.com/adspace/158168.js"></script>-->
|
||||
<!-- END EroAdvertising ADSPACE CODE -->
|
||||
<!-- self: $self -->
|
||||
</body>
|
||||
</html>
|
||||
EOD;
|
||||
}
|
||||
}
|
BIN
themes/rule34v2/rule34_logo_top.png
Normal file
After Width: | Height: | Size: 18 KiB |
367
themes/rule34v2/style.css
Normal file
|
@ -0,0 +1,367 @@
|
|||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* things common to all pages *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
BODY {
|
||||
background: url(bg.png) #ACE4A3;
|
||||
font-family: "Arial", sans-serif;
|
||||
font-size: 14px;
|
||||
margin: 0px;
|
||||
}
|
||||
#header {
|
||||
border-bottom: 1px solid #7EB977;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 16px;
|
||||
padding: 8px;
|
||||
background: #ACE4A3;
|
||||
text-align: center;
|
||||
}
|
||||
H1 {
|
||||
font-size: 5em;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
H1 A {
|
||||
color: black;
|
||||
}
|
||||
H3 {
|
||||
text-align: center;
|
||||
margin: 0px;
|
||||
}
|
||||
THEAD {
|
||||
font-weight: bold;
|
||||
}
|
||||
TD {
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#subtitle {
|
||||
width: 256px;
|
||||
font-size: 0.75em;
|
||||
margin: auto;
|
||||
margin-top: -16px;
|
||||
text-align: center;
|
||||
border: 1px solid black;
|
||||
border-top: none;
|
||||
background: #DDD;
|
||||
}
|
||||
#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.8em;margin: 0px; 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.7em;
|
||||
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;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* the navigation bar, and all its blocks *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
NAV {
|
||||
width: 250px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
margin-left: 16px;
|
||||
}
|
||||
NAV .blockbody {
|
||||
font-size: 0.85em;
|
||||
text-align: center;
|
||||
}
|
||||
NAV TABLE {
|
||||
width: 100%;
|
||||
}
|
||||
NAV TD {
|
||||
vertical-align: middle;
|
||||
}
|
||||
NAV INPUT {
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
}
|
||||
NAV SELECT {
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
|
||||
.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: 0px;
|
||||
}
|
||||
|
||||
#commentlistimage .blockbody .comment,
|
||||
#commentlistrecent .blockbody .comment {
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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: 0px;
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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;
|
||||
}
|
||||
|
||||
.thumb {
|
||||
width: 226px;
|
||||
display: inline-block;
|
||||
zoom: 1; /* ie6 */
|
||||
*display: inline; /* ie6 */
|
||||
text-align: center;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.thumb IMG {
|
||||
border: 1px solid #7EB977;
|
||||
background: #ACE4A3;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
div#twitter_update_list li {
|
||||
list-style:none;
|
||||
padding-bottom:0px;
|
||||
text-align:left;
|
||||
margin-top:5px;
|
||||
margin-bottom:5px;
|
||||
border: solid 1px #000;
|
||||
background: url(bg.png);
|
||||
}
|
||||
|
||||
.username {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#bans TD, .image_info TD {
|
||||
vertical-align: middle;
|
||||
}
|
||||
#bans INPUT {
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.need-del {
|
||||
display: none;
|
||||
}
|
||||
.can-del .need-del {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
|
||||
.unread {
|
||||
color: red;
|
||||
}
|
||||
|
||||
UL.tagit {
|
||||
margin: 0px;
|
||||
}
|
||||
ul.tagit li.tagit-new {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
|
||||
[data-tags~="animated"]>A>IMG { background: #CC00CC; }
|
||||
[data-ext="mp4"]>A>IMG,
|
||||
[data-ext="webm"]>A>IMG { background: #0000FF; }
|
||||
|
||||
#menuh-container {
|
||||
float: none;
|
||||
width: 500px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* responsive overrides *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
@media (max-width: 750px) {
|
||||
.atoz, #paginator {
|
||||
font-size: 2em;
|
||||
}
|
||||
.header-sites {
|
||||
display: none;
|
||||
}
|
||||
SECTION>.blockbody {
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* responsive padding */
|
||||
@media (max-width: 1024px) {
|
||||
NAV {margin-left: 0px;}
|
||||
ARTICLE {margin-right: 0px; margin-left: 242px;}
|
||||
}
|
||||
@media (max-width: 750px) {
|
||||
NAV {margin-left: 0px;}
|
||||
ARTICLE {margin-right: 0px; 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: 0px;
|
||||
}
|
||||
NAV>SECTION>H3 {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
BODY.navHidden #menuh-container {display: none;}
|
||||
BODY.navHidden NAV {display: none;}
|
||||
BODY.navHidden ARTICLE {margin-left: 0px;}
|
||||
|
||||
/*
|
||||
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: 0px; left: 0px; 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.85em;}
|
||||
.headbox {width: 80%; margin: auto;}
|
||||
#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: 0px;}
|
||||
#Navigationleft .blockbody {font-size: 1.5em;}
|
||||
#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;
|
||||
}
|
38
themes/rule34v2/tag_edit.theme.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
class CustomTagEditTheme extends TagEditTheme
|
||||
{
|
||||
public function get_tag_editor_html(Image $image): string
|
||||
{
|
||||
$h_tags = html_escape($image->get_tag_list());
|
||||
return "
|
||||
<tr>
|
||||
<th width='50px'><a href='".make_link("tag_history/{$image->id}")."'>Tags</a></th>
|
||||
<td>
|
||||
<input type='text' name='tag_edit__tags' value='$h_tags' id='tag_editor' class='autocomplete_tags' onfocus='$(\".view\").hide(); $(\".edit\").show();'>
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
public function get_source_editor_html(Image $image): string
|
||||
{
|
||||
global $user;
|
||||
$h_source = html_escape($image->get_source());
|
||||
$f_source = $this->format_source($image->get_source());
|
||||
$style = "overflow: hidden; white-space: nowrap; max-width: 350px; text-overflow: ellipsis;";
|
||||
return "
|
||||
<tr>
|
||||
<th><a href='".make_link("source_history/{$image->id}")."'>Source Link</a></th>
|
||||
<td>
|
||||
".($user->can("edit_image_source") ? "
|
||||
<div class='view' style='$style'>$f_source</div>
|
||||
<input class='edit' type='text' name='tag_edit__source' value='$h_source'>
|
||||
" : "
|
||||
<div style='$style'>$f_source</div>
|
||||
")."
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
}
|
39
themes/rule34v2/themelet.class.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
class Themelet extends BaseThemelet
|
||||
{
|
||||
public function build_thumb_html(Image $image): string
|
||||
{
|
||||
global $cache, $config, $database, $user;
|
||||
|
||||
$cached = $cache->get("thumb-block:{$image->id}");
|
||||
if ($cached) {
|
||||
return $cached;
|
||||
}
|
||||
|
||||
$i_id = (int) $image->id;
|
||||
$h_view_link = make_link('post/view/'.$i_id);
|
||||
$h_image_link = $image->get_image_link();
|
||||
$h_thumb_link = $image->get_thumb_link();
|
||||
$h_tip = html_escape($image->get_tooltip());
|
||||
$h_tags = strtolower($image->get_tag_list());
|
||||
$h_ext = strtolower($image->ext);
|
||||
|
||||
// If file is flash or svg then sets thumbnail to max size.
|
||||
if ($image->ext === 'swf' || $image->ext === '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=\"$h_ext\" data-tags=\"$h_tags\" data-post-id=\"$i_id\"><a class='shm-thumb-link' href='$h_view_link'>".
|
||||
'<img id="thumb_'.$i_id.'" title="'.$h_tip.'" alt="'.$h_tip.'" height="'.$tsize[1].'" width="'.$tsize[0].'" src="'.$h_thumb_link.'" loading="lazy"></a>'.
|
||||
'<br><a href="'.$h_image_link.'">Image Only</a>'.
|
||||
"<span class='need-del'> - <a href='#' onclick='image_hash_ban($i_id); return false;'>Ban</a></span>".
|
||||
"</div>\n";
|
||||
|
||||
// cache for ages; will be cleared in ext/index:onImageInfoSet
|
||||
$cache->set("thumb-block:{$image->id}", $html, 0);
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
30
themes/rule34v2/upload.theme.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
class CustomUploadTheme extends UploadTheme
|
||||
{
|
||||
public function display_block(Page $page)
|
||||
{
|
||||
$page->add_block(new Block("Upload", $this->build_upload_block(), "head", 20));
|
||||
$page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
|
||||
}
|
||||
|
||||
public function display_full(Page $page)
|
||||
{
|
||||
$page->add_block(new Block("Upload", "Disk nearly full, uploads disabled", "head", 20));
|
||||
}
|
||||
|
||||
public function display_page(Page $page)
|
||||
{
|
||||
parent::display_page($page);
|
||||
$html = "
|
||||
<a href='//rule34.paheal.net/wiki/tagging'>Tagging Guide</a>
|
||||
";
|
||||
$page->add_block(new Block(null, $html, "main", 19));
|
||||
}
|
||||
|
||||
protected function build_upload_block(): string
|
||||
{
|
||||
$url = make_link("upload");
|
||||
return "<a href='$url' style='font-size: 2em; display: block;'>Upload</a>";
|
||||
}
|
||||
}
|
39
themes/rule34v2/user.theme.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
class CustomUserPageTheme extends UserPageTheme
|
||||
{
|
||||
public function display_user_block(Page $page, User $user, $parts)
|
||||
{
|
||||
$h_name = html_escape($user->name);
|
||||
$lines = [];
|
||||
foreach ($parts as $part) {
|
||||
$lines[] = "<a href='{$part["link"]}'>{$part["name"]}</a>";
|
||||
}
|
||||
if (count($lines) < 6) {
|
||||
$html = implode("\n<br>", $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"));
|
||||
}
|
||||
|
||||
public function display_login_block(Page $page)
|
||||
{
|
||||
global $config;
|
||||
$html = "
|
||||
<form action='".make_link("user_admin/login")."' method='POST'>
|
||||
<table class='form' style='width: 100%;'>
|
||||
<tr><th>Name</th><td><input type='text' name='user'></td></tr>
|
||||
<tr><th>Password</th><td><input type='password' name='pass'></td></tr>
|
||||
<tr><td colspan='2'><input type='submit' name='gobu' value='Log In'></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
";
|
||||
if ($config->get_bool("login_signup_enabled")) {
|
||||
$html .= "<small><a href='".make_link("user_admin/create")."'>Create Account</a></small>";
|
||||
}
|
||||
$page->add_block(new Block("Login", $html, "head", 90));
|
||||
$page->add_block(new Block("Login", $html, "left", 15));
|
||||
}
|
||||
}
|