mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-05-19 08:40:21 -07:00
update [code] and [img] tags
[close #52] [code] changes [close #51] [img] changes
This commit is contained in:
parent
17e04a55bc
commit
e3bb327a21
19
css/base.css
19
css/base.css
@ -18,16 +18,17 @@ img { border:none; }
|
||||
.center {text-align:center}
|
||||
.right {text-align:right}
|
||||
|
||||
/* Make code blocks scroll instead of stretching the page */
|
||||
code {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
white-space: pre;
|
||||
display: block;
|
||||
/* Make code blocks slightly less likely to go haywire, since apparently
|
||||
"don't stretch the entire gat dang page" is not possible in HTML, lol */
|
||||
.code pre {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
/* "Fix" for auto-generated <br> tags in <code> and <pre> blocks */
|
||||
code br, pre br { display: none; }
|
||||
/* "Fix" for auto-generated <br> tags in <pre> blocks */
|
||||
pre br { display: none; }
|
||||
|
||||
/* Make radio buttons look not terrible */
|
||||
input[type=radio] { color: black; background: white; }
|
||||
@ -73,3 +74,5 @@ input[type=radio] { color: black; background: white; }
|
||||
.spoiler > input[type="checkbox"]:checked + .hidden > * {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.imgtag { max-width: 100%; }
|
||||
|
@ -25,9 +25,20 @@ div.lastpost { font-size: 90%; text-align: right !important; }
|
||||
.center, center { text-align: center; }
|
||||
.right { text-align: right; }
|
||||
|
||||
code { overflow: auto; width: 100%; white-space: pre; display: block; }
|
||||
code br { display: none; }
|
||||
/* Make code blocks slightly less likely to go haywire, since apparently
|
||||
"don't stretch the entire gat dang page" is not possible in HTML, lol */
|
||||
.code pre {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
/* "Fix" for auto-generated <br> tags in <pre> blocks */
|
||||
pre br { display: none; }
|
||||
|
||||
.pstspl1 {opacity:0;}
|
||||
.pstspl1:hover {opacity:1;}
|
||||
.pstspl2 {background:#000;color:#FFF;display:block;}
|
||||
|
||||
.imgtag { max-width: 100%; }
|
||||
|
@ -486,7 +486,8 @@ function escape_codeblock($text) {
|
||||
$list2 = array("", "", "<", "\"", "\\", "\'", "[", ":", ")", "_");
|
||||
|
||||
// @TODO why not just use htmlspecialchars() or htmlentities()
|
||||
return "[quote]<code>". str_replace($list, $list2, $text[0]) ."</code>[/quote]";
|
||||
//return "<blockquote class='code'><hr><pre><code>". str_replace($list, $list2, $text[0]) ."</code></pre><hr></blockquote>";
|
||||
return "<blockquote class='code'><hr><pre><code>". str_replace($list, $list2, $text[0]) ."</code></pre><hr></blockquote>";
|
||||
}
|
||||
|
||||
function doreplace2($msg, $options='0|0'){
|
||||
@ -535,7 +536,7 @@ function doreplace2($msg, $options='0|0'){
|
||||
$msg=str_replace('[/spoileri]','</span></span></label>',$msg);
|
||||
$msg=preg_replace("'\[(b|i|u|s)\]'si",'<\\1>',$msg);
|
||||
$msg=preg_replace("'\[/(b|i|u|s)\]'si",'</\\1>',$msg);
|
||||
$msg=preg_replace("'\[img\](.*?)\[/img\]'si", '<img src=\\1>', $msg);
|
||||
$msg=preg_replace("'\[img\](.*?)\[/img\]'si", '<img class="imgtag" src=\\1>', $msg);
|
||||
$msg=preg_replace("'\[url\](.*?)\[/url\]'si", '<a href=\\1>\\1</a>', $msg);
|
||||
$msg=preg_replace("'\[url=(.*?)\](.*?)\[/url\]'si", '<a href=\\1>\\2</a>', $msg);
|
||||
$msg=str_replace('http://nightkev.110mb.com/justus_layout.css','about:blank',$msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user