Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

Commit

Permalink
fix: ver 1.5 fix some bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Innei committed Jun 24, 2019
1 parent 4bd328a commit a2e448a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function themeInit($archive) {
}

function themeFields($layout) {
if ($_SERVER['SCRIPT_NAME'] == "/admin/write-page.php") {
if (preg_match("/write-page.php/", $_SERVER['REQUEST_URI'])) {
$title = new Typecho_Widget_Helper_Form_Element_Text('title', NULL, NULL, _t('标题'), _t('首页模板功能'));
$layout->addItem($title);
$intro = new Typecho_Widget_Helper_Form_Element_Text('intro', NULL, NULL, _t('介绍'), _t('首页模板功能'));
Expand Down
12 changes: 6 additions & 6 deletions page-note.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function allpostnum($id)
for ($i = 0; $i < $_GET['index']; $i++) {
// 跳过代码
if (!$posts->next()): http_response_code(422);
return; endif;
exit; endif;
}
?>
<article>
Expand All @@ -47,7 +47,7 @@ function allpostnum($id)
<div class="note-title"><?php $posts->title() ?></div>
</h1>
<div class="paul-note" id="cid-<?php $posts->cid(); ?>">
<div class="note-content">
<div class="note-content post-content">
<?php if ($this->options->is_display_all_content) {
$content = $posts->content;
$out = preg_split("/<p>|<\/p>|<h\d>|<\/h\d>/", $content);
Expand Down Expand Up @@ -76,7 +76,7 @@ function allpostnum($id)
title="参与评论">评论 <?php $posts->commentsNum('%d '); ?></span>
</a>
<span class="like" data-cid="<?php $posts->cid();
?>" title="已有 <?php get_like_num($posts) ?> 人点赞"><?php get_like_num($posts) ?></span>
?>" title="已有 <?php get_like_num($posts) ?> 人点赞" <?php if (Typecho_Cookie::get('__post_likes')) print_r("style='color: var(--red)'") ?>><?php get_like_num($posts) ?></span>
</div>
</div>
<?php if (!$posts->allow('comment')) : ?>
Expand All @@ -90,7 +90,7 @@ function allpostnum($id)
<?php endif ?>
<?php endfor;
print_r('</article>');
return; //完成ajax方式返回,退出此页面
exit; //完成ajax方式返回,退出此页面
endif;
?>
<?php
Expand Down Expand Up @@ -122,7 +122,7 @@ function allpostnum($id)
<div class="note-title"><?php $posts->title() ?></div>
</h1>
<div class="paul-note" id="cid-<?php $posts->cid(); ?>">
<div class="note-content">
<div class="note-content post-content">
<?php if ($this->options->is_display_all_content) {
$content = $posts->content;
$out = preg_split("/<p>|<\/p>|<h\d>|<\/h\d>/", $content);
Expand All @@ -149,7 +149,7 @@ function allpostnum($id)
<span class="comment" data-cid="<?php $posts->cid(); ?>" data-year="<?php $posts->year(); ?>"
title="参与评论">评论 <?php $posts->commentsNum('%d '); ?></span>
<span class="like" data-cid="<?php $posts->cid();
?>" title="已有 <?php get_like_num($posts) ?> 人点赞"><?php get_like_num($posts) ?></span>
?>" title="已有 <?php get_like_num($posts) ?> 人点赞" <?php if (Typecho_Cookie::get('__post_likes')) print_r("style='color: var(--red)'") ?>><?php get_like_num($posts) ?></span>
</div>
</div>
<?php if (!$posts->allow('comment')) : ?>
Expand Down
11 changes: 11 additions & 0 deletions src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,11 @@ pre code {
.paul-post li li {
list-style: circle;
}

.paul-post li li li {
list-style: square;
}

.paul-post li:before {
display: none;
}
Expand All @@ -384,6 +386,11 @@ pre code {
display: inline;
}

.post-category blockquote {
background-color: rgba(245, 250, 253, .8);
border-left: 3px #3498db solid;
}

.torTree {
display: none;
position: fixed;
Expand Down Expand Up @@ -531,6 +538,10 @@ article:not(.comment-list) li::before, .torTree li::before {
.post-category li {
width: 100%;
}

#load-more-btn {
margin-top: 1rem;
}
}

.page-navigator {
Expand Down
9 changes: 6 additions & 3 deletions src/paul.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

body {
margin-left: 5em;
background: url(img/background.png) center fixed
background: url(img/background.png) center repeat-y;
}

body:before {
Expand All @@ -17,7 +17,7 @@ body:before {
position: fixed;
will-change: opacity;
transition: opacity .3s;
background: url(https://i.loli.net/2019/01/12/5c3a00dea5b6d.png) right bottom/contain no-repeat
background: url(https://i.loli.net/2019/06/24/5d10335264ce337514.png) right bottom/contain no-repeat
}

@media screen and (max-width: 768px) {
Expand Down Expand Up @@ -542,7 +542,10 @@ article > h1 small {
code .comment:before {
display: none;
}

.paul-post .like {
will-change: transition;
transition: color .5s;
}
.paul-note .like.active:after {
top: 0;
left: 0;
Expand Down
2 changes: 2 additions & 0 deletions until.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ function like_init(dom) { // 点赞实现 ajax
color: "green",
time: 1500
});
that.classList.add('active')
that.style.color = 'red'
that.onclick = function () {
ks.notice("你的爱我已经感受到了!", {
color: "yellow",
Expand Down

0 comments on commit a2e448a

Please sign in to comment.