diff options
| -rw-r--r-- | assets/css/main/post.css | 14 | ||||
| -rw-r--r-- | libs/Contents.php | 12 |
2 files changed, 21 insertions, 5 deletions
diff --git a/assets/css/main/post.css b/assets/css/main/post.css index 8b70676..9e5c2fe 100644 --- a/assets/css/main/post.css +++ b/assets/css/main/post.css @@ -372,14 +372,22 @@ .tip-group .tip br {
display: block;
}
-.post-bubble .saying-content p {
- padding: 0 20px!important;
-}
@media (min-width:768px) {
.tip-icon {
display: block
}
}
+.notice {
+ background: rgb(245,245,245);
+ padding: 15px 20px;
+ border-radius: 4px
+}
+.post-img-shadow {
+ padding: 5px 3px
+}
+.post-img-shadow img {
+ box-shadow: 0 8px 15px rgba(0,0,0,0.45);
+}
/* >文章分页 */
.post-pagenav,
diff --git a/libs/Contents.php b/libs/Contents.php index 992d6f0..e65d81b 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -14,7 +14,7 @@ class Contents $text = empty($last) ? $data : $last; if ($widget instanceof Widget_Archive) { //ParseOther - $text = Contents::parseKbd(Contents::parseCode(Contents::parseImages(Contents::parseHeadings(Contents::parseTextColor(Contents::parseRuby(Contents::parseTip($text))))))); + $text = Contents::parsePicShadow(Contents::parseNotice(Contents::parseKbd(Contents::parseCode(Contents::parseImages(Contents::parseHeadings(Contents::parseTextColor(Contents::parseRuby(Contents::parseTip($text))))))))); //LazyLoad $text = preg_replace('/<img (.*?)src(.*?)(\/)?>/','<img $1src="/usr/themes/Miracles/images/loading/'.$load_image.'.gif" data-original$2 />',$text); //owo @@ -72,7 +72,15 @@ class Contents * 解析 Notice */ static public function parseNotice($text){ - $text = preg_replace('/\[notice\](.*?)\[\/notice\]/s','<div class="notice" role="note"><p>${1}</p></div>',$text); + $text = preg_replace('/\[notice\](.*?)\[\/notice\]/s','<div class="notice" role="note">${1}</div>',$text); + return $text; + } + + /** + * 图片加阴影 + */ + static public function parsePicShadow($text){ + $text = preg_replace('/\[shadow\](.*?)\[\/shadow\]/s','<div class="post-img-shadow">${1}</div>',$text); return $text; } |
