From 9ae13dfa011baab12843b6855c2e9a4d6ca92075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=94=E8=90=BD?= <45323514+BigCoke233@users.noreply.github.com> Date: Sat, 30 Mar 2019 15:30:52 +0800 Subject: Add files via upload --- includes/comments.php | 63 +++++++++++++++++++++++++++++++++++++++++++++++ includes/head.php | 5 +++- includes/header.php | 11 +++++++++ includes/post-content.php | 47 +++++++++++++++++++++++++++++++++++ includes/post-item.php | 56 ++++++++++++++++++++++++----------------- includes/toolbar.php | 5 +++- 6 files changed, 163 insertions(+), 24 deletions(-) create mode 100644 includes/post-content.php (limited to 'includes') diff --git a/includes/comments.php b/includes/comments.php index 3facb2a..ee6e771 100644 --- a/includes/comments.php +++ b/includes/comments.php @@ -1,4 +1,67 @@
+ + + + +
diff --git a/includes/head.php b/includes/head.php index c0e4b9e..2d1e4ac 100644 --- a/includes/head.php +++ b/includes/head.php @@ -84,7 +84,7 @@ background-repeat:no-repeat; background-attachment:fixed; } - .item,#nav,.list-group,.list-group li,.pagenav li,.page-navigator li,.comment-body{ + .item,#nav,.pagenav li,.page-navigator li,.comment-body{ background:rgba(255,255,255,0.9)!important; } .footer-info{ @@ -94,6 +94,9 @@ box-shadow:0 0 8px #808080; -webkit-box-shadow:0 0 8px #808080; } + .list-group,.list-group li{ + background:rgba(255,255,255,0) + } diff --git a/includes/header.php b/includes/header.php index f9a06d0..f5c530c 100644 --- a/includes/header.php +++ b/includes/header.php @@ -26,10 +26,21 @@
+ + options->lgimg_url && $this->options->lgimg_url!='') :?> +
+

options->IndexName(); ?>

+

options->IndexDecoration(); ?>

+
+ + + options->lgimg_url && $this->options->lgimg_url='') :?>



+
+ \ No newline at end of file diff --git a/includes/post-content.php b/includes/post-content.php new file mode 100644 index 0000000..c2f1a12 --- /dev/null +++ b/includes/post-content.php @@ -0,0 +1,47 @@ +/s','${4}',$this->content); + + //短代码(无参数) + $reg = '/\[scode\](.*?)\[\/scode\]/s'; + $rp = '
${1}
'; + $content = preg_replace($reg,$rp,$content); + + //短代码(有参数) + $reg = '/\[scode.*?type="(.*?)"\](.*?)\[\/scode\]/s'; + $rp = '
${2}
'; + $content = preg_replace($reg,$rp,$content); + + //font文字排版 + //无参数时,自动解析为红色 + $reg = '/\[font\](.*?)\[\/font\]/s'; + $rg = '${1}'; + $content = preg_replace($reg,$rp,$content); + + //解析只有color参数的font + $reg = '/\[font color="(.*?)"\](.*?)\[\/font\]/s'; + $rp = '${2}'; + $content = preg_replace($reg,$rp,$content); + + //解析只有bg参数的font + $reg = '/\[font bg="(.*?)"\](.*?)\[\/font\]/s'; + $rp = '${2}'; + $content = preg_replace($reg,$rp,$content); + + //解析只有size参数的font + $reg = '/\[font size="(.*?)"\](.*?)\[\/font\]/s'; + $rp = '${2}'; + $content = preg_replace($reg,$rp,$content); + + //解析只有style参数的font + $reg = '/\[font style="(.*?)"\](.*?)\[\/font\]/s'; + $rp = '${2}'; + $content = preg_replace($reg,$rp,$content); + + //滚动文本区域 + $reg = '/\[stext\](.*?)\[\/stext\]/s'; + $rp = '
${1}
'; + $content = preg_replace($reg,$rp,$content); + + echo $content +?> \ No newline at end of file diff --git a/includes/post-item.php b/includes/post-item.php index 60ad412..f43e58c 100644 --- a/includes/post-item.php +++ b/includes/post-item.php @@ -1,36 +1,48 @@ is('post') || $this->fields->type=='1' ): ?> -is('index')): ?> + is('index')): ?>
- -
-
+
+

author() ?>说:

+ need('includes/post-content.php'); ?> +
+
+
- author->gravatar(50); ?> + author->gravatar(50) ?>
-
-

sticky(); $this->title() ?>

-
author() ?> 发布了一条说说:
+
+

title(); ?>

+
date('F j, Y'); ?>
+ + 前往吐槽
-
-
- /s','',$this->content); - echo $content - ?> -
- + +
+ + +fields->type=='2'): ?> +
+
+ -
- +
+ +
- +
is('index')): ?> diff --git a/includes/toolbar.php b/includes/toolbar.php index 1f52a4f..91bddf4 100644 --- a/includes/toolbar.php +++ b/includes/toolbar.php @@ -7,4 +7,7 @@ -
\ No newline at end of file +
+ + + \ No newline at end of file -- cgit v1.2.3