From c1523ab0481dc5e48bf335e68cd3f3a488e7e99e Mon Sep 17 00:00:00 2001 From: Eltrac <45323514+BigCoke233@users.noreply.github.com> Date: Mon, 15 Jul 2019 17:43:49 +0800 Subject: =?UTF-8?q?=E6=96=87=E7=AB=A0=E7=9F=AD=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/miracles.min.css | 39 ++++++++++++++++++++++++++++++++++++++- libs/Contents.php | 11 ++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/assets/css/miracles.min.css b/assets/css/miracles.min.css index d1164e7..e4b4282 100644 --- a/assets/css/miracles.min.css +++ b/assets/css/miracles.min.css @@ -499,7 +499,6 @@ hr { .post-content p { vertical-align: middle; } - .post-content .owo-img { box-shadow: 0 0 0 #fff; -moz-box-shadow: 0 0 0 #fff; @@ -510,6 +509,44 @@ hr { vertical-align: middle } +.tip { + border: 1px solid rgb(240,240,240); + border-radius: 3px; + padding: 15px; + border-left: 5px solid var(--theme-color); +} +.tip-icon { + color: var(--theme-color); +} +.tip.red { + border-left-color: #DD4B39; +} +.tip.red .tip-icon { + color: #DD4B39; +} +.tip.blue { + border-left-color: #4D90FE; +} +.tip.blue .tip-icon { + color: #4D90FE; +} +.tip.green { + border-left-color: #2FBB4F; +} +.tip.green .tip-icon { + color: #2FBB4F; +} +.tip.yellow { + border-left-color: #FFDD11; +} +.tip.yellow .tip-icon { + color: #FFDD11; +} + +.post-bubble .saying-content p { + padding: 0 20px!important; +} + .post-pagenav { margin-top: 40px; margin-bottom: 60px diff --git a/libs/Contents.php b/libs/Contents.php index fd2c8f1..d441577 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -8,16 +8,25 @@ class Contents */ static public function parseContent($text) { + //Prism 高亮 $text = preg_replace('/
/s','
',$text);
+		//FancyBox
 	    $text = preg_replace('//s','
',$text); //LazyLoad $text = preg_replace('//','',$text); + //气泡 + $text = preg_replace('/\[bubble\](.*?)\[\/bubble\]/s','

${1}

',$text); + + //Tip without var + $text = preg_replace('/\[tip\](.*?)\[\/tip\]/s','
${1}
',$text); + //Tip + $text = preg_replace('/\[tip type="(.*?)"\](.*?)\[\/tip\]/s','
${2}
',$text); + //解析友链盒子 $reg = '/\[links\](.*?)\[\/links\]/s'; $rp = ''; $text = preg_replace($reg,$rp,$text); - //解析友链项目 $reg = '/\[(.*?)\]\{(.*?)\}\((.*?)\)/s'; $rp = '