summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEltrac <45323514+BigCoke233@users.noreply.github.com>2019-07-19 16:37:01 +0800
committerGitHub <noreply@github.com>2019-07-19 16:37:01 +0800
commit5456d7d2b91ecd801902ecc7adea7db94db79fa6 (patch)
tree60b8b16219b94bb422f14a9bc1ef88d4bcbc93fa
parent525276d9c9dca8e404c99598c1ad4fc285563c68 (diff)
Bug Fix/CSS improve
-rw-r--r--404.php11
-rw-r--r--assets/css/dark.miracles.css25
-rw-r--r--assets/css/miracles.min.css272
-rw-r--r--assets/css/owo.min.css6
-rw-r--r--functions.php13
-rw-r--r--includes/comments.php2
-rw-r--r--includes/footer.php21
-rw-r--r--includes/head.php2
-rw-r--r--includes/header.php3
-rw-r--r--index.php2
-rw-r--r--libs/Contents.php51
-rw-r--r--libs/Utils.php11
-rw-r--r--page.php13
-rw-r--r--post.php13
-rw-r--r--saying.php16
15 files changed, 218 insertions, 243 deletions
diff --git a/404.php b/404.php
index 582646b..c4a1a4a 100644
--- a/404.php
+++ b/404.php
@@ -2,20 +2,15 @@
$this->need('includes/head.php');
$this->need('includes/header.php');
?>
-
<main class="main-container container">
<div class="post-body">
<div class="post-content">
- <h1 class="404-title" style="text-align:center">是 404 的香气呢</h1>
+ <h1 class="error-title">404</h1>
<p style="text-align:center">
- <span style="font-size:16px;">要不试试下面这个神奇的按钮吧<br />
- ↓</span><br />
- <a href="<?php $this->options->SiteUrl(); ?>" class="404-button">返回首页</a>
+ <span>糟糕,我家猫咪走丢了!</span><br /><br />
+ <a href="<?php $this->options->SiteUrl(); ?>" class="error-button no-line">返回首页</a>
</p>
</div>
</div>
</main>
-
-
-
<?php $this->need('includes/footer.php'); ?> \ No newline at end of file
diff --git a/assets/css/dark.miracles.css b/assets/css/dark.miracles.css
index 80a8078..9e5b49e 100644
--- a/assets/css/dark.miracles.css
+++ b/assets/css/dark.miracles.css
@@ -1,8 +1,11 @@
@charset 'utf-8';
+
/*
* DarkTheme for Miracles
- * Author: Eltrac
+ * Author: Eltrac
+ * Lisence: MIT
*/
+
/* Body */
.body-dark {
background: #4b4b4b;
@@ -13,7 +16,7 @@
.body-dark .post-content code {
background: #505050;
}
-.body-dark .post-content img {
+.body-dark .post-content img:not(.OwO-img) {
box-shadow: 0 2px 10px #323232;
-moz-box-shadow: 0 2px 10px #323232;
-webkit-box-shadow: 0 2px 10px #323232
@@ -37,7 +40,11 @@
.body-dark .gotop-button,
.body-dark .post-body,
.body-dark .post-item,
-.body-dark .post-pagenav a {
+.body-dark .post-pagenav a,
+.body-dark .bubble.saying-body:hover,
+.body-dark .OwO-body,
+.body-dark .OwO-open .OwO-logo,
+.body-dark .OwO .OwO-body .OwO-items .OwO-item:hover {
box-shadow: 0 0 36px #323232!important;
-moz-box-shadow: 0 0 36px #323232!important;
-webkit-box-shadow: 0 0 36px #323232!important
@@ -53,7 +60,8 @@
.body-dark .comment-submit button,
.body-dark .comment-by-author .bubble.comment-content,
.body-dark .bubble.comment-content,
-.body-dark .comment-author {
+.body-dark .comment-author,
+.body-dark .bubble.saying-body {
background: #646464
}
/* Need #5a5a5a bg */
@@ -71,7 +79,8 @@
.body-dark .post-pagenav a,
.body-dark .OwO-body,
.body-dark .OwO-package-active,
-.body-dark .OwO-packages li:hover {
+.body-dark .OwO-packages li:hover,
+.body-dark .saying-textarea {
background: #5a5a5a!important
}
/* OwO */
@@ -120,11 +129,13 @@
.body-dark .OwO-logo,
.body-dark .OwO-body,
.body-dark .mobile-menu-title,
-.body-dark .mobile-menu-footer {
+.body-dark .mobile-menu-footer,
+.body-dark .saying-textarea {
border-color: #6e6e6e!important;
}
.body-dark .comment-by-author .bubble.comment-content:before,
-.body-dark .bubble.comment-content:before {
+.body-dark .bubble.comment-content:before,
+.body-dark .bubble.saying-body:before {
border-right-color: #646464;
}
/* Darker Mask */
diff --git a/assets/css/miracles.min.css b/assets/css/miracles.min.css
index 8f0d813..32a105e 100644
--- a/assets/css/miracles.min.css
+++ b/assets/css/miracles.min.css
@@ -1,4 +1,12 @@
-/* 栅格系统 */
+@charset 'utf-8';
+
+/*
+ * Themain CSS file for Miracles
+ * Author: Eltrac
+ * License: MIT
+ */
+
+/* 栅格系统 from Bootstrap */
.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container{max-width:540px}}@media (min-width:768px){.container{max-width:720px}}@media (min-width:992px){.container{max-width:960px}}@media (min-width:1200px){.container{max-width:1140px}}.container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{display:flex;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{flex-basis:0;flex-grow:1;max-width:100%}.col-auto{flex:0 0 auto;width:auto;max-width:100%}.col-1{flex:0 0 8.333333%;max-width:8.333333%}.col-2{flex:0 0 16.666667%;max-width:16.666667%}.col-3{flex:0 0 25%;max-width:25%}.col-4{flex:0 0 33.333333%;max-width:33.333333%}.col-5{flex:0 0 41.666667%;max-width:41.666667%}.col-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.333333%;max-width:58.333333%}.col-8{flex:0 0 66.666667%;max-width:66.666667%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.333333%;max-width:83.333333%}.col-11{flex:0 0 91.666667%;max-width:91.666667%}.col-12{flex:0 0 100%;max-width:100%}.order-first{order:-1}.order-last{order:13}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-9{order:9}.order-10{order:10}.order-11{order:11}.order-12{order:12}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666667%}@media (min-width:576px){.col-sm{flex-basis:0;flex-grow:1;max-width:100%}.col-sm-auto{flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{flex:0 0 16.666667%;max-width:16.666667%}.col-sm-3{flex:0 0 25%;max-width:25%}.col-sm-4{flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{flex:0 0 41.666667%;max-width:41.666667%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-7{flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{flex:0 0 66.666667%;max-width:66.666667%}.col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{flex:0 0 91.666667%;max-width:91.666667%}.col-sm-12{flex:0 0 100%;max-width:100%}.order-sm-first{order:-1}.order-sm-last{order:13}.order-sm-0{order:0}.order-sm-1{order:1}.order-sm-2{order:2}.order-sm-3{order:3}.order-sm-4{order:4}.order-sm-5{order:5}.order-sm-6{order:6}.order-sm-7{order:7}.order-sm-8{order:8}.order-sm-9{order:9}.order-sm-10{order:10}.order-sm-11{order:11}.order-sm-12{order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666667%}}@media (min-width:768px){.col-md{flex-basis:0;flex-grow:1;max-width:100%}.col-md-auto{flex:0 0 auto;width:auto;max-width:100%}.col-md-1{flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{flex:0 0 16.666667%;max-width:16.666667%}.col-md-3{flex:0 0 25%;max-width:25%}.col-md-4{flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{flex:0 0 41.666667%;max-width:41.666667%}.col-md-6{flex:0 0 50%;max-width:50%}.col-md-7{flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{flex:0 0 66.666667%;max-width:66.666667%}.col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{flex:0 0 91.666667%;max-width:91.666667%}.col-md-12{flex:0 0 100%;max-width:100%}.order-md-first{order:-1}.order-md-last{order:13}.order-md-0{order:0}.order-md-1{order:1}.order-md-2{order:2}.order-md-3{order:3}.order-md-4{order:4}.order-md-5{order:5}.order-md-6{order:6}.order-md-7{order:7}.order-md-8{order:8}.order-md-9{order:9}.order-md-10{order:10}.order-md-11{order:11}.order-md-12{order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666667%}}@media (min-width:992px){.col-lg{flex-basis:0;flex-grow:1;max-width:100%}.col-lg-auto{flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{flex:0 0 25%;max-width:25%}.col-lg-4{flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{flex:0 0 50%;max-width:50%}.col-lg-7{flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{flex:0 0 66.666667%;max-width:66.666667%}.col-lg-9{flex:0 0 75%;max-width:75%}.col-lg-10{flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{flex:0 0 91.666667%;max-width:91.666667%}.col-lg-12{flex:0 0 100%;max-width:100%}.order-lg-first{order:-1}.order-lg-last{order:13}.order-lg-0{order:0}.order-lg-1{order:1}.order-lg-2{order:2}.order-lg-3{order:3}.order-lg-4{order:4}.order-lg-5{order:5}.order-lg-6{order:6}.order-lg-7{order:7}.order-lg-8{order:8}.order-lg-9{order:9}.order-lg-10{order:10}.order-lg-11{order:11}.order-lg-12{order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666667%}}@media (min-width:1200px){.col-xl{flex-basis:0;flex-grow:1;max-width:100%}.col-xl-auto{flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{flex:0 0 16.666667%;max-width:16.666667%}.col-xl-3{flex:0 0 25%;max-width:25%}.col-xl-4{flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{flex:0 0 41.666667%;max-width:41.666667%}.col-xl-6{flex:0 0 50%;max-width:50%}.col-xl-7{flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{flex:0 0 66.666667%;max-width:66.666667%}.col-xl-9{flex:0 0 75%;max-width:75%}.col-xl-10{flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{flex:0 0 91.666667%;max-width:91.666667%}.col-xl-12{flex:0 0 100%;max-width:100%}.order-xl-first{order:-1}.order-xl-last{order:13}.order-xl-0{order:0}.order-xl-1{order:1}.order-xl-2{order:2}.order-xl-3{order:3}.order-xl-4{order:4}.order-xl-5{order:5}.order-xl-6{order:6}.order-xl-7{order:7}.order-xl-8{order:8}.order-xl-9{order:9}.order-xl-10{order:10}.order-xl-11{order:11}.order-xl-12{order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666667%}}.main-container{margin:0 auto}@media (min-width:576px){.main-container{max-width:540px}}@media (min-width:768px){.main-container{max-width:720px}}@media (min-width:992px){.main-container{max-width:920px}}@media (min-width:1200px){.main-container{max-width:1000px}}
/* Var */
:root {
@@ -37,10 +45,13 @@ hr {
background: gray;
}
/* 框选文本色彩 */
-::-moz-selection,::-webkit-selection,::selection {
+::-moz-selection,
+::-webkit-selection,
+::selection {
background-color: var(--theme-color)
}
+/* 导航栏 */
.nav {
background: rgba(255,255,255,0.96);
width: 100%;
@@ -53,7 +64,6 @@ hr {
z-index: 10;
transition: all .2s
}
-
.nav-content {
margin: 0;
display: table-cell;
@@ -65,7 +75,6 @@ hr {
overflow-y: hidden;
position: relative
}
-
.nav-content a {
text-decoration: none;
color: #141414;
@@ -73,23 +82,19 @@ hr {
transition: background .2s;
font-size: 16px
}
-
.nav-content a:hover,
.nav-mobile-content a:hover,
.nav-mobile-content button:hover,
.nav-sorts-content {
background: #f0f0f0
}
-
.nav-title {
color: #000;
font-weight: 700
}
-
.nav-fixed {
position: fixed!important
}
-
.nav-icon-button {
border-radius: 10000px;
border: none;
@@ -100,8 +105,6 @@ hr {
position: absolute;
top: 20px;
}
-
-
.nav-mobile {
background: rgba(255,255,255,0.99);
word-break: keep-all;
@@ -114,18 +117,17 @@ hr {
margin: 0;
padding: 16px 10px;
}
-
.search-button {
right: 20px;
}
.login-button {
right: 65px;
}
-
.nav-icon-button:hover,.search-close {
background: rgb(230,230,230);
cursor: pointer
}
+/* 字体 Class */
.font-sans-serif {
font-family: 'Noto Sans SC',sans-serif
}
@@ -133,14 +135,14 @@ hr {
.font-serif {
font-family: 'Noto Serif SC',serif
}
-
+/* 首页大图 */
.index-banner {
margin-top: -21px;
width: 100%;
text-align: center
}
-
.dark-cover {
+ /* 即 Mask */
width: 100%;
height: 100%;
background: rgba(30,30,30,.25);
@@ -150,24 +152,20 @@ hr {
justify-content: center;
align-items: center
}
-
.banner-content {
vertical-align: middle
}
-
.banner-content h1 {
margin-bottom: 0
}
-
.banner-content p {
margin-top: 10px
}
-
+/* 文章 */
.post-list,
.post-body {
margin-top: -110px
}
-
.post-body,.post-item {
background: #fff;
box-shadow: 0 0 36px #bababa;
@@ -175,7 +173,6 @@ hr {
-webkit-box-shadow: 0 0 36px #bababa;
transition: background .1s
}
-
.post-banner-box {
margin-left: -15px;
margin-bottom: -2px;
@@ -183,13 +180,11 @@ hr {
min-height: 270px;
overflow: hidden
}
-
.post-banner img {
width: 100%;
min-height: 270px;
margin-right: -40px
}
-
.post-title {
margin-top: 30px;
transition: color .2s;
@@ -197,24 +192,19 @@ hr {
white-space: nowrap;
text-overflow: ellipsis
}
-
.post-item:hover .post-title {
color: var(--theme-color)
}
-
.post-excerpt {
overflow: hidden;
text-overflow: ellipsis
}
-
.post-meta,.post-meta a {
color: gray
}
-
.post-button-box {
margin-top: 15px
}
-
.post-button {
border: 3px solid #ccc;
border-radius: 30px;
@@ -222,18 +212,15 @@ hr {
transition: all .2s;
float: right
}
-
.post-button:hover {
border-color: #000;
background: #000;
color: #fff
}
-
.post-footer {
color: #c8c8c8;
font-size: 14px
}
-
.post-tags a {
color: #bebebe;
padding: 2px 4px;
@@ -241,11 +228,10 @@ hr {
background: #f0f0f0;
transition: background .2s
}
-
.post-tags a:hover {
background: #f5f5f5
}
-
+/* >文章内容 */
.post-content {
padding: 26px;
font-size: 18px;
@@ -253,7 +239,6 @@ hr {
letter-spacing: 2px;
word-break: break-all
}
-
.post-content hr {
display: block;
margin: 80px auto;
@@ -262,7 +247,6 @@ hr {
height: 5px;
border: none
}
-
.post-content code {
font-size: 0.8em;
background: #f0f0f0;
@@ -272,7 +256,6 @@ hr {
color: var(--theme-color);
vertical-align: middle
}
-
.post-content img {
display: block;
margin: 20px auto;
@@ -282,44 +265,36 @@ hr {
-webkit-box-shadow: 0 2px 10px #ccc;
max-width: 100%
}
-
.post-content blockquote p {
margin: 0
}
-
.post-content blockquote {
border-left: 6px solid #ddd;
padding-left: 10px;
margin-left: 0;
color: gray
}
-
.post-content table {
width: 100%;
border-left: 1px solid #ccc;
border-top: 2px solid #ccc;
border-spacing: 0
}
-
.post-content td,.post-content th {
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding: 6px 8px
}
-
.post-content th {
background: #fff!important
}
-
.post-content tr:nth-child(odd) {
background: #f5f5f5
}
-
.post-content a:not(.no-line) {
position: relative;
color: var(--theme-color)
}
-
.post-content a:not(.no-line)::before {
content: '';
position: absolute;
@@ -332,12 +307,10 @@ hr {
transform: scaleX(0);
transition: transform .5s ease
}
-
.post-content a:not(.no-line):hover::before {
transform-origin: bottom left;
transform: scaleX(1)
}
-
.post-content p {
vertical-align: middle;
}
@@ -346,11 +319,10 @@ hr {
-moz-box-shadow: 0 0 0 #fff;
-webkit-box-shadow: 0 0 0 #fff;
display: inline;
- height: 26px;
- width: 26px;
+ height: 34px;
vertical-align: middle
}
-
+/* >短代码 */
.tip {
border: 1px solid rgb(240,240,240);
border-radius: 3px;
@@ -384,54 +356,50 @@ hr {
.tip.yellow .tip-icon {
color: #FFDD11;
}
-
.post-bubble .saying-content p {
padding: 0 20px!important;
}
-
-.post-pagenav {
+/* >文章分页 */
+.post-pagenav,
+.comment-pagenav {
margin-top: 40px;
margin-bottom: 60px
}
-
.post-pagenav a {
font-size: 20px;
background: var(--theme-color);
color: #fff;
- border-radius: 10000px;
padding: 13px 20px;
+}
+.post-pagenav a,
+.comment-pagenav a {
+ border-radius: 10000px;
box-shadow: 0 0 15px #ccc;
-moz-box-shadow: 0 0 15px #ccc;
-webkit-box-shadow: 0 0 15px #ccc
}
-
.post-pagenav a:hover {
box-shadow: 0 0 15px #ccc;
-moz-box-shadow: 0 0 15px #ccc;
-webkit-box-shadow: 0 0 15px #ccc
}
-
.post-pagenav-left {
float: left
}
-
.post-pagenav-right {
float: right
}
-
+/* -ss */
.post-banner-ss img {
width: 100%
}
-
.post-banner-box-ss {
max-height: 280px;
overflow: hidden
}
-
.post-item-content-ss {
padding: 20px
}
-
.post-title-ss {
margin: 12px 0;
margin-top: 6px;
@@ -440,50 +408,49 @@ hr {
text-overflow: ellipsis;
font-size: 25px
}
-
+/* 标签云 */
.tags-list {
margin-left: -30px
}
.tags-item a {
- background: #646464;
- border-radius: 4px;
- color: #fff;
- padding: 4px 8px;
- font-size: 15px
+ background: rgb(240,240,240);
+ border-radius: 80px;
+ color: rgb(60,60,60);
+ padding: 6px 14px;
+ font-size: 15px;
+ transition: all .2s;
+}
+.tags-item a:hover {
+ background: rgb(230,230,230);
}
-
.tags-item {
position: relative;
display: inline-block
}
-
+/* 归档列表 */
.archives-list {
list-style-type: none;
margin-left: -40px
}
-
.archives-list a {
display: block;
border-radius: 3px;
transition: background .2s;
padding: 6px 10px
}
-
.archives-list a:hover {
background: #e6e6e6
}
-
.archives-date {
color: gray;
letter-spacing: 0;
}
-
+/* 友链 */
.links-box {
margin: 10px;
margin-top: 30px
}
-
.links-box h2 {
text-align: Center;
border-bottom: 1px solid #e6e6fa;
@@ -497,7 +464,6 @@ hr {
.links-link:hover {
opacity: 1!important
}
-
.links-item {
background: #fff;
box-shadow: 0 3px 1px #ccc;
@@ -508,7 +474,6 @@ hr {
margin-bottom: 5px;
border-radius: 3px
}
-
.links-item:hover {
transform: scale(1.05);
box-shadow: 0 6px 28px #ccc;
@@ -516,15 +481,12 @@ hr {
-moz-box-shadow: 0 6px 28px #ccc;
transform: translateY(-6px)
}
-
.link-box a {
color: #000
}
-
.links-title {
text-align: center
}
-
.links-title h4 {
font-weight: 700;
letter-spacing: 2px;
@@ -535,22 +497,19 @@ hr {
.links-container {
padding: 6px;
}
-
.archive-title {
text-align: center
}
-
.arvchive-item-excerpt {
color: gray;
font-size: 17px;
margin-top: 0
}
-
.archive-item-title {
font-size: 25px;
margin-bottom: 5px
}
-
+/* 搜索/登录/移动端导航 */
.search,.login,.mobile-menu {
position: fixed;
top: 0;
@@ -578,6 +537,21 @@ hr {
.mobile-menu-close.ready {
display: none
}
+.search-close,
+.login-close,
+.mobile-menu-close {
+ position: fixed;
+ top: 20px;
+ right: 20px;
+ border: none;
+ background: 0 0
+}
+.search-form input,
+.login-form input,
+.login-form button {
+ width: 260px;
+}
+/* >移动端导航 */
.mobile-menu-pagelist a {
display: block;
border-radius: 4px;
@@ -602,7 +576,7 @@ hr {
border-top: 1px solid rgb(220,220,220);
padding-top: 10px;
}
-
+/* >搜索面板 */
.search-form input {
border: 1px solid #bababa;
padding: 10px 25px;
@@ -615,20 +589,14 @@ hr {
border: none;
margin-left: -100px
}
-.search-close,.search-form button,.search-form input {
+.search-close,
+.search-form button,
+.search-form input {
color: gray;
font-size: 30px;
outline: 0
}
-.search-close,
-.login-close,
-.mobile-menu-close {
- position: fixed;
- top: 20px;
- right: 20px;
- border: none;
- background: 0 0
-}
+/* >登录 */
.login-form button,
.login-form input {
display: block;
@@ -645,17 +613,41 @@ hr {
color: white;
background: var(--theme-color);
}
+/* >> 提示 Pjax 跳转后需要刷新登录面板 */
+.login-form.need-refresh:before {
+ content: "因为 Pjax 的原因,登陆之前请先刷新页面,否则会导致登陆失败!";
+ background: #DD4B39;
+ padding: 18px 5px;
+ display: block;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ color: white;
+ text-align: center;
+ transition: all .2s;
+}
-.404-button {
+/* 404 error page */
+.error-title {
+ text-align: center;
+ font-size: 100px;
+ text-shadow: 0 4px 12px #ccc;
+}
+.error-button {
padding: 5px 10px;
- transition: all .2s
+ margin: 20px 10px;
+ transition: all .2s;
+ border: 4px solid #ddd;
+ border-radius: 100px;
}
-
-.404-button:hover {
+.error-button:hover {
background: #000;
+ border-color: #000;
color: #fff
}
-
+/* Buttons */
+/* > 悬浮按钮 */
.dark-button,.gotop-button {
background: #fdfdfd;
font-size: 22px;
@@ -670,17 +662,15 @@ hr {
outline: 0;
right: 12px
}
-
.gotop-button {
bottom: 30px;
background: var(--theme-color)!important;
color: #fff!important
}
-
.dark-button {
bottom: 80px
}
-
+/* 页脚 */
.footer-info {
background: #f0f0f0;
color: #000;
@@ -691,43 +681,37 @@ hr {
line-height: 26px;
width: 100%
}
-
.footer-dark a {
color: #000
}
-
.footer-info a {
color: #1e1e1e;
text-decoration: none;
transition: opacity .2s
}
-
.footer-info a:hover {
opacity: .9
}
-
+/* Header Meta */
.header-meta a {
color: #fff;
text-decoration: none
}
-
+/* 评论 */
.comment-title {
text-align: center;
margin: 50px 0;
font-size: 26px
}
-
.comment-list,.comment-list li {
list-style-type: none
}
-
.comment-list {
margin-left: 0;
}
.comment-children .comment-list {
margin: 0;
}
-
.comment-children .comment-body {
margin-bottom: 5px;
margin-left: 0;
@@ -736,31 +720,25 @@ hr {
margin: 30px 0;
position: relative
}
-
.comment-author-avatar img {
border-radius: 10000px;
height: 50px;
width: 50px
}
-
.comment-author-info h4,.comment-author-info p {
margin: 0
}
-
.comment-author-info h4 {
font-size: 18px
}
-
.comment-author-info h4 a {
color: var(--theme-color)
}
-
.comment-author-info p {
margin-top: 5px;
color: gray;
font-size: 15px
}
-
.comment-content p {
color: #000;
font-size: 22px;
@@ -768,11 +746,9 @@ hr {
vertical-align: center;
padding: 10px 16px;
}
-
.comment-content img {
max-width: 100%
}
-
.comment-meta {
font-size: 17px;
}
@@ -787,7 +763,6 @@ hr {
.comment-author:hover {
background: rgb(235,235,235);
}
-
.bubble.comment-content {
background: rgb(238,238,238);
padding: 3px 8px;
@@ -804,19 +779,18 @@ hr {
-moz-box-shadow: 0 0 0 #fff;
-webkit-box-shadow: 0 0 0 #fff;
}
-.comment-by-author .bubble.comment-content {
+.comment-by-author > .container-fluid > .row > .comment-main > .bubble.comment-content {
background: var(--theme-color)
}
-.comment-by-author .bubble.comment-content p {
+.comment-by-author > .container-fluid > .row > .comment-main > .bubble.comment-content p {
color: #fff!important;
}
-.comment-by-author .bubble.comment-content:before {
+.comment-by-author > .container-fluid > .row > .comment-main > .bubble.comment-content:before {
border-right-color: var(--theme-color)
}
.comment-by-author .bubble.comment-content .comment-reply a {
color:#fff!important;
}
-
.comment-reply a {
position: absolute;
top: 5px;
@@ -828,11 +802,9 @@ hr {
transition: color 0.2s;
color: rgb(120,120,120);
}
-
.comment-reply a:hover {
color: rgb(150,150,150)
}
-
.comment-submit button {
display: block;
margin: 10px 0;
@@ -846,11 +818,9 @@ hr {
transition: opacity .2s;
margin-top: -14px
}
-
.comment-submit button:hover {
opacity: .9
}
-
.comment-input input,.comment-textarea {
display: block;
resize: none;
@@ -860,19 +830,42 @@ hr {
padding: 14px;
outline: none;
}
-
.comment-input {
margin-top: -10px;
margin-bottom: -20px;
}
-
#comment-form label {
display: none
}
.comment-closed-alert {
text-align: center;
}
-
+.comment-pagenav {
+ margin-left: -20px;
+}
+.comment-pagenav li {
+ list-style-type: none;
+ display: inline-block;
+}
+.comment-pagenav li a {
+ background: #fff;
+ padding: 5px 13px;
+ margin-right: 5px;
+ box-shadow: 0 1px 4px #ccc;
+ -moz-box-shadow: 0 1px 4px #ccc;
+ -webkit-box-shadow: 0 1px 4px #ccc;
+ transition: all .2s;
+}
+.comment-pagenav li a:hover {
+ background: rgb(249,249,249);
+ box-shadow: 0 1px 8px #ccc;
+ -moz-box-shadow: 0 1px 8px #ccc;
+ -webkit-box-shadow: 0 1px 8px #ccc;
+}
+.comment-pagenav-icon {
+ margin: 0 -3px;
+}
+/* OwO */
.owo-img {
height: 34px;
vertical-align: middle;
@@ -885,7 +878,7 @@ hr {
.owo-para {
margin-top: 0;
}
-
+/* 说说动态 */
.saying-form {
margin-bottom: 20px;
}
@@ -927,7 +920,6 @@ hr {
.saying-meta i {
font-size: 12px;
}
-
/* 气泡 */
.bubble {
position: relative;
@@ -954,7 +946,7 @@ hr {
transform: translateY(-6px);
box-shadow: 2px 8px 17px #bababa;
}
-
+/* Pio Plugin */
.pio-container .pio-dialog {
margin-bottom: -60px;
border-color: rgba(255,255,255,.9);
@@ -969,13 +961,13 @@ hr {
.pio-container {
display: none
}
-
+/* Bilibili iframe */
iframe[src*="//player.bilibili.com/player.html"] {
width: 100%;
height: 150px;
position: relative
}
-
+/* 响应式相关 */
.large-screen {
display: none
}
@@ -983,13 +975,7 @@ iframe[src*="//player.bilibili.com/player.html"] {
.small-screen {
display: block
}
-
-.search-form input,
-.login-form input,
-.login-form button {
- width: 260px;
-}
-
+/* > Pad and up */
@media (min-width:768px) {
.nav-content a {
font-size: 19px;
@@ -1065,7 +1051,7 @@ iframe[src*="//player.bilibili.com/player.html"] {
padding: 10px;
}
}
-
+/* Desktop and up */
@media (min-width:992px) {
.nav-content a {
font-size: 20px;
@@ -1146,7 +1132,7 @@ iframe[src*="//player.bilibili.com/player.html"] {
padding: 12px;
}
}
-
+/* Computer screen and up */
@media (min-width:1200px) {
.nav-content a {
font-size: 20px;
diff --git a/assets/css/owo.min.css b/assets/css/owo.min.css
index 610d9d1..3abfac9 100644
--- a/assets/css/owo.min.css
+++ b/assets/css/owo.min.css
@@ -12,7 +12,6 @@
.OwO.OwO-open .OwO-logo {
border-radius: 4px 4px 0 0;
- border: none;
color: #444;
box-shadow: 0 8px 20px #bababa;
}
@@ -43,11 +42,10 @@
display: inline-block;
color: #888;
background: #fff;
- border: 2px solid rgb(221,221,221);
+ border: 1px solid rgb(221,221,221);
border-radius: 4px;
font-size: 13px;
- padding: 4px 7px;
- padding-bottom: 5px!important;
+ padding: 2px 3px;
cursor: pointer;
height: 22px;
box-sizing: border-box;
diff --git a/functions.php b/functions.php
index 113a1ab..a4b1cbb 100644
--- a/functions.php
+++ b/functions.php
@@ -1,16 +1,5 @@
+<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php
-/**
- * functions.php
- *
- * 初始化
- *
- * @author 熊猫小A
- */
-if (!defined('__TYPECHO_ROOT_DIR__')) exit;
-?>
-
-<?php
-
require_once("libs/Utils.php");
require_once("libs/Contents.php");
diff --git a/includes/comments.php b/includes/comments.php
index 449b67a..d7801f4 100644
--- a/includes/comments.php
+++ b/includes/comments.php
@@ -58,7 +58,7 @@ echo $commentClass;
)); ?>
</div>
<div class="comment-pagenav">
- <?php $comments->pageNav('<i class="iconfont icon-chevron-left"></i>', '<i class="iconfont icon-chevron-right"></i>'); ?>
+ <?php $comments->pageNav('<i class="iconfont icon-chevron-left comment-pagenav-icon"></i>', '<i class="iconfont icon-chevron-right comment-pagenav-icon"></i>'); ?>
</div>
<?php endif; ?>
diff --git a/includes/footer.php b/includes/footer.php
index fda879c..10fa10d 100644
--- a/includes/footer.php
+++ b/includes/footer.php
@@ -1,18 +1,19 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
- </div>
+ </div><!-- 结束 pjax-container -->
+ <!-- 页脚信息 -->
<footer>
<div class="footer-info footer-dark">
- <p>&copy; <?php echo date('Y'); ?> <a href="<?php $this->options->SiteUrl(); ?>"><?php $this->options->title(); ?></a> All rights reserved.<br />
+ <p class="copyright">&copy; <?php echo date('Y'); ?> <a href="<?php $this->options->SiteUrl(); ?>"><?php $this->options->title(); ?></a> All rights reserved.<br />
Powered by <a href="http://typecho.org">Typecho</a> | Theme <a href="https://guhub.cn/p/miracles.html">Miracles</a> by <a href="https://guhub.cn">Eltrac</a></p>
<?php $this->options->footerEcho(); ?>
</div>
</footer>
-
+ <!-- 悬浮按钮 -->
<div class="fixed-tools">
<button onclick="GoTop()" title="返回顶部" class="gotop-button" style="color:white;"><i class="iconfont icon-chevron-up"></i></button>
<button onclick="Dark()" title="护眼模式" class="dark-button"><i class="iconfont icon-envira"></i></button>
</div>
-
+ <!-- JavaScript -->
<script src="<?php Utils::indexTheme('assets/js/jquery.js'); ?>"></script>
<script src="<?php Utils::indexTheme('assets/js/pjax.jquery.js'); ?>"></script>
<script src="<?php Utils::indexTheme('assets/js/jquery.fancybox.js'); ?>"></script>
@@ -21,7 +22,6 @@
<script src="<?php Utils::indexTheme('assets/js/OwO.min.js'); ?>"></script>
<script src="<?php Utils::indexTheme('assets/js/prism.js'); ?>"></script>
<script src="<?php Utils::indexTheme('assets/js/main.js'); ?>"></script>
-
<script>
//pjax-loader
var siteurl = '<?php $this->options->SiteUrl() ;?>';
@@ -41,7 +41,7 @@
pres[i].className = 'line-numbers';}
Prism.highlightAll(true,null);}
$('form#login-form').addClass('need-refresh');
- var OwO_demo = new OwO({logo: 'OωO表情',container: document.getElementsByClassName('OwO')[0],target: document.getElementsByClassName('OwO-textarea')[0],api: '<?php Utils::indexTheme('assets/OwO.json'); ?>',position: 'down',width: '350px',maxHeight: '250px'});
+ var OwO_demo = new OwO({logo: 'OωO表情',container: document.getElementsByClassName('OwO')[0],target: document.getElementsByClassName('OwO-textarea')[0],api: '<?php Utils::indexTheme('assets/OwO.json'); ?>',position: 'down',width: '300px',maxHeight: '250px'});
jQuery(function() {jQuery("img").lazyload({threshold: 200,effect: "fadeIn"});});
});
//LazyLoad
@@ -56,14 +56,9 @@
//Login
function Login() {$(".login").toggleClass("ready");$(".login-close").toggleClass("ready");}
//OwO
- var OwO_demo = new OwO({logo: 'OωO表情',container: document.getElementsByClassName('OwO')[0],target: document.getElementsByClassName('OwO-textarea')[0],api: '<?php Utils::indexTheme('assets/OwO.json'); ?>',position: 'down',width: '350px',maxHeight: '250px'});
+ var OwO_demo = new OwO({logo: 'OωO表情',container: document.getElementsByClassName('OwO')[0],target: document.getElementsByClassName('OwO-textarea')[0],api: '<?php Utils::indexTheme('assets/OwO.json'); ?>',position: 'down',width: '300px',maxHeight: '250px'});
</script>
+ <?php if($this->options->jsEcho && $this->options->jsEcho!=''): ?><style><?php $this->options->jsEcho(); ?></style><?php endif; ?>
<?php $this->footer(); ?>
-
- <?php if($this->options->jsEcho && $this->options->jsEcho!=''): ?>
- <style>
- <?php $this->options->jsEcho(); ?>
- </style>
- <?php endif; ?>
</body>
</html>
diff --git a/includes/head.php b/includes/head.php
index 1badb3d..7129607 100644
--- a/includes/head.php
+++ b/includes/head.php
@@ -54,7 +54,7 @@ if (isset($_POST['action'])) {
<link rel="stylesheet" href="<?php Utils::indexTheme('assets/css/dark.miracles.css'); ?>" />
<!-- icon font -->
- <link rel="stylesheet" href="//at.alicdn.com/t/font_1165190_maespcngb4g.css" />
+ <link rel="stylesheet" href="//at.alicdn.com/t/font_1165190_q4ccniy74h.css" />
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC:300|Noto+Serif+SC:300&display=swap" rel="stylesheet">
diff --git a/includes/header.php b/includes/header.php
index cc1e962..2fca1a0 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -1,4 +1,5 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
+
<!-- 搜索 -->
<div class="search ready">
<button class="search-close ready" onclick="Search()"><i class="iconfont icon-x"></i></button>
@@ -66,7 +67,7 @@
</div>
</nav>
- <div id="pjax-container">
+ <div id="pjax-container"><!-- 开始 pjax-container -->
<header>
<?php if($this->is('post') || $this->is('page')): ?>
<div class="index-banner" style="background:url('<?php if($this->fields->banner && $this->fields->banner=!''): ?><?php $this->fields->banner(); ?><?php else: ?><?php $this->options->bannerUrl(); ?><?php endif; ?>') no-repeat;height:<?php $this->options->bannerHeight(); ?>vh;background-size:cover;">
diff --git a/index.php b/index.php
index 2db75f8..a422634 100644
--- a/index.php
+++ b/index.php
@@ -61,7 +61,7 @@ $this->need('includes/header.php');
</div>
<br />
<?php endwhile; ?>
-
+ <!-- 文章分页 -->
<div class="post-pagenav">
<span class="post-pagenav-left"><?php $this->pageLink('<i class="iconfont icon-chevron-left"></i>'); ?></span>
<span class="post-pagenav-right"><?php $this->pageLink('<i class="iconfont icon-chevron-right"></i>','next'); ?></span>
diff --git a/libs/Contents.php b/libs/Contents.php
index d441577..a868c2d 100644
--- a/libs/Contents.php
+++ b/libs/Contents.php
@@ -1,35 +1,42 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit;
+/*
+ * 该文件大部分代码来自 熊猫小A(AlanDecode) 的项目,感谢~
+ * https://github.com/AlanDecode/typecho-theme-dev-framework
+ */
+
class Contents
{
/**
* 内容解析器入口
* 传入的是经过 Markdown 解析后的文本
*/
- static public function parseContent($text)
+ static public function parseContent($data, $widget, $last)
{
- //Prism 高亮
- $text = preg_replace('/<pre><code>/s','<pre><code class="language-html">',$text);
- //FancyBox
- $text = preg_replace('/<img(.*?)src="(.*?)"(.*?)alt="(.*?)"(.*?)>/s','<center><a data-fancybox="gallery" href="${2}" class="gallery-link"><img${1}src="${2}"${3}></a></center>',$text);
- //LazyLoad
- $text = preg_replace('/<img (.*?)src(.*?)(\/)?>/','<img $1src="/usr/themes/Miracles/images/loading.gif"'.$style.' data-original$2 />',$text);
+ $text = empty($last) ? $data : $last;
+ if ($widget instanceof Widget_Archive) {
+ //Prism 高亮
+ $text = preg_replace('/<pre><code>/s','<pre><code class="language-html">',$text);
+ //FancyBox
+ $text = preg_replace('/<img(.*?)src="(.*?)"(.*?)alt="(.*?)"(.*?)>/s','<center><a data-fancybox="gallery" href="${2}" class="gallery-link"><img${1}src="${2}"${3}></a></center>',$text);
+ //LazyLoad
+ $text = preg_replace('/<img (.*?)src(.*?)(\/)?>/','<img $1src="/usr/themes/Miracles/images/loading.gif"'.$style.' data-original$2 />',$text);
- //气泡
- $text = preg_replace('/\[bubble\](.*?)\[\/bubble\]/s','<div class="bubble post-bubble"><div class="saying-content"><p>${1}</p></div></div>',$text);
+ //气泡
+ $text = preg_replace('/\[bubble\](.*?)\[\/bubble\]/s','<div class="bubble post-bubble"><div class="saying-content"><p>${1}</p></div></div>',$text);
- //Tip without var
- $text = preg_replace('/\[tip\](.*?)\[\/tip\]/s','<div class="tip"><div class="container-fluid"><div class="row"><div class="col-1 tip-icon"><i class="iconfont icon-info"></i></div><div class="col-11 tip-content">${1}</div></div></div></div>',$text);
- //Tip
- $text = preg_replace('/\[tip type="(.*?)"\](.*?)\[\/tip\]/s','<div class="tip ${1}"><div class="container-fluid"><div class="row"><div class="col-1 tip-icon"><i class="iconfont icon-info"></i></div><div class="col-11 tip-content">${2}</div></div></div></div>',$text);
+ //Tip without var
+ $text = preg_replace('/\[tip\](.*?)\[\/tip\]/s','<div class="tip"><div class="container-fluid"><div class="row"><div class="col-1 tip-icon"><i class="iconfont icon-info"></i></div><div class="col-11 tip-content">${1}</div></div></div></div>',$text);
+ //Tip
+ $text = preg_replace('/\[tip type="(.*?)"\](.*?)\[\/tip\]/s','<div class="tip ${1}"><div class="container-fluid"><div class="row"><div class="col-1 tip-icon"><i class="iconfont icon-info"></i></div><div class="col-11 tip-content">${2}</div></div></div></div>',$text);
- //解析友链盒子
- $reg = '/\[links\](.*?)\[\/links\]/s';
- $rp = '<div class="links-box container-fluid"><div class="row">${1}</div></div>';
- $text = preg_replace($reg,$rp,$text);
- //解析友链项目
- $reg = '/\[(.*?)\]\{(.*?)\}\((.*?)\)/s';
- $rp = '<div class="col-lg-2 col-4 col-md-3 links-container">
+ //解析友链盒子
+ $reg = '/\[links\](.*?)\[\/links\]/s';
+ $rp = '<div class="links-box container-fluid"><div class="row">${1}</div></div>';
+ $text = preg_replace($reg,$rp,$text);
+ //解析友链项目
+ $reg = '/\[(.*?)\]\{(.*?)\}\((.*?)\)/s';
+ $rp = '<div class="col-lg-2 col-4 col-md-3 links-container">
<a href="${2}" target="_blank" class="links-link">
<div class="links-item">
<div class="links-img" style="background:url(\'${3}\');width: 100%;padding-top: 100%;background-repeat: no-repeat;background-size: cover;"></div>
@@ -39,8 +46,8 @@ class Contents
</div>
</a>
</div>';
- $text = preg_replace($reg,$rp,$text);
-
+ $text = preg_replace($reg,$rp,$text);
+ }
return $text;
}
diff --git a/libs/Utils.php b/libs/Utils.php
index 7330122..9e7943e 100644
--- a/libs/Utils.php
+++ b/libs/Utils.php
@@ -1,11 +1,10 @@
<?php
-/**
- * Utils.php
- *
- * 提供某些 Typecho 方法的封装,以及一些常用方法实现
- *
- * @author 熊猫小A
+
+/*
+ * 该文件代码来自 熊猫小A(AlanDecode) 的项目,感谢~
+ * https://github.com/AlanDecode/typecho-theme-dev-framework
*/
+
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
class Utils
diff --git a/page.php b/page.php
index c4a3052..fc724fe 100644
--- a/page.php
+++ b/page.php
@@ -2,18 +2,13 @@
$this->need('includes/head.php');
$this->need('includes/header.php');
?>
-
<main class="main-container container">
<div class="post-body">
- <div class="post-content">
- <?php Contents::parseContent($this->content()); ?>
+ <!-- 页面内容 -->
+ <div class="post-content page-content">
+ <?php $this->content(); ?>
</div>
</div>
-
-
- <?php $this->need('includes/comments.php'); ?>
-
+<?php $this->need('includes/comments.php'); ?>
</main>
-
-
<?php $this->need('includes/footer.php'); ?> \ No newline at end of file
diff --git a/post.php b/post.php
index 3bf51cb..082dd27 100644
--- a/post.php
+++ b/post.php
@@ -2,23 +2,20 @@
$this->need('includes/head.php');
$this->need('includes/header.php');
?>
-
<main class="main-container container">
<div class="post-body">
+ <!-- 文章内容 -->
<div class="post-content">
- <?php Contents::parseContent($this->content()); ?>
+ <?php $this->content(); ?>
<br />
+ <!-- 文章页脚 -->
<div class="post-footer">
- <p>
+ <p class="post-content">
<span class="post-tags"><i class="iconfont icon-tags"></i> <?php $this->tags(' ', true, '这人还没有写标签哦~'); ?></span>
</p>
</div>
</div>
</div>
-
-
- <?php $this->need('includes/comments.php'); ?>
-
+<?php $this->need('includes/comments.php'); ?>
</main>
-
<?php $this->need('includes/footer.php'); ?> \ No newline at end of file
diff --git a/saying.php b/saying.php
index 18d7ea6..6e79df6 100644
--- a/saying.php
+++ b/saying.php
@@ -37,13 +37,14 @@ echo $commentClass;
</div>
</div>
<?php } ?>
-
<main class="main-container container">
<div class="post-body">
<div class="post-content">
- <?php if($this->user->hasLogin()): ?>
+ <?php //判断当前用户是否登陆
+ if($this->user->hasLogin()):
+ //已登录则输出说说表单 ?>
<form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" class="saying-form" role="form">
- <textarea rows="8" cols="50" name="text" id="textarea" class="OwO-textarea comment-textarea textarea" required ><?php $this->remember('text'); ?></textarea>
+ <textarea rows="8" cols="50" name="text" id="textarea" class="OwO-textarea comment-textarea textarea saying-textarea" required ><?php $this->remember('text'); ?></textarea>
<p class="saying-action">
<div title="OwO" class="saying-OwO OwO"></div>
<button type="submit" class="saying-submit submit"><?php _e('发表动态'); ?></button>
@@ -51,7 +52,8 @@ echo $commentClass;
</form>
<hr>
<?php endif; ?>
- <?php $this->comments()->to($comments); ?>
+ <?php //输出说说列表
+ $this->comments()->to($comments); ?>
<h3 class="comment-title">
<span style="color:#ccc">- </span>
<?php $this->commentsNum(_t('暂无动态'), _t('仅有一条动态'), _t('已有 %d 条动态')); ?>
@@ -59,11 +61,11 @@ echo $commentClass;
</h3>
<?php if ($comments->have()): ?>
<?php $comments->listComments(); ?>
- <?php $comments->pageNav('<i class="iconfont icon-chevron-left"></i>', '<i class="iconfont icon-chevron-right"></i>'); ?>
+ <div class="comment-pagenav saying-pagenav">
+ <?php $comments->pageNav('<i class="iconfont icon-chevron-left"></i>', '<i class="iconfont icon-chevron-right"></i>'); ?>
+ </div>
<?php endif; ?>
</div>
</div>
</main>
-
-
<?php $this->need('includes/footer.php'); ?> \ No newline at end of file