调整部分与原版一致

This commit is contained in:
浪子 2024-05-18 09:24:49 +08:00
parent 8d47bd3afa
commit d52291c946
10 changed files with 180 additions and 129 deletions

View File

@ -5,7 +5,17 @@ https://github.com/bigfa/hugo-theme-farallon
## 进度 ## 进度
70% 80%
## 功能
### 豆瓣观影
配合`DoubanBoard`插件使用
项目地址
https://github.com/AlanDecode/Typecho-Plugin-DoubanBoard
!!记得重命名文件夹为`DoubanBoard`
### 友情链接
基于 `links` 插件实现
可使用 `寒泥` 大佬制作的版本或者其他版本
## 待实现
-[] 豆瓣观影

View File

@ -1,9 +1,7 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> <?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?> <?php $this->need('header.php'); ?>
<main id="main"> <main class="site--main">
<div class="site--main"> <header class="archive--header"><?php if ($this->have()): ?>
<?php if ($this->have()): ?>
<header class="archive--header">
<h2 class="post--single__title"><?php $this->archiveTitle(array( <h2 class="post--single__title"><?php $this->archiveTitle(array(
'category' => _t(' <span> %s </span> '), 'category' => _t(' <span> %s </span> '),
'search' => _t('包含关键字<span> %s </span>的文章'), 'search' => _t('包含关键字<span> %s </span>的文章'),
@ -12,28 +10,26 @@
'author' => _t('作者 <span>%s </span>发布的文章') 'author' => _t('作者 <span>%s </span>发布的文章')
), '', ''); ?></h2> ), '', ''); ?></h2>
<h3 class="post--single__subtitle"><?php $this->categorydescription(); ?></h3> <h3 class="post--single__subtitle"><?php $this->categorydescription(); ?></h3>
</header>
<?php while($this->next()): ?> <?php while($this->next()): ?>
</header>
<article class="post--item" itemtype="http://schema.org/Article" itemscope="itemscope" > <article class="post--item">
<div class="content"> <div class="content">
<h2 class="post--title" itemprop="headline"> <h2 class="post--title">
<a href="<?php $this->permalink() ?>"><?php $this->title() ?> <a href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
class="icon--sticky" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="w-4 h-4 text-red-400">
<path
d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z">
</path>
</svg></a>
</h2> </h2>
<div class="description">
<?php
// 判断是否存在自定义字段summary并输出否则输出自动生成的摘要
if($this->fields->summary){echo $this->fields->summary;} else {$this->excerpt(180); }
?>
</div>
<div class="meta"> <div class="meta">
<svg class="icon" viewBox="0 0 1024 1024" width="16" height="16"> <svg class="icon" viewBox="0 0 1024 1024" width="16" height="16">
<path <path
d="M512 97.52381c228.912762 0 414.47619 185.563429 414.47619 414.47619s-185.563429 414.47619-414.47619 414.47619S97.52381 740.912762 97.52381 512 283.087238 97.52381 512 97.52381z m0 73.142857C323.486476 170.666667 170.666667 323.486476 170.666667 512s152.81981 341.333333 341.333333 341.333333 341.333333-152.81981 341.333333-341.333333S700.513524 170.666667 512 170.666667z m36.571429 89.697523v229.86362h160.865523v73.142857H512a36.571429 36.571429 0 0 1-36.571429-36.571429V260.388571h73.142858z"> d="M512 97.52381c228.912762 0 414.47619 185.563429 414.47619 414.47619s-185.563429 414.47619-414.47619 414.47619S97.52381 740.912762 97.52381 512 283.087238 97.52381 512 97.52381z m0 73.142857C323.486476 170.666667 170.666667 323.486476 170.666667 512s152.81981 341.333333 341.333333 341.333333 341.333333-152.81981 341.333333-341.333333S700.513524 170.666667 512 170.666667z m36.571429 89.697523v229.86362h160.865523v73.142857H512a36.571429 36.571429 0 0 1-36.571429-36.571429V260.388571h73.142858z">
</path> </path>
</svg><time><?php $this->date('Y-m-d'); ?></time> </svg><time><?php $this->date('Y-m-d'); ?></time>
<svg class="icon" viewBox="0 0 1024 1024" width="16" height="16"> <svg class="icon" viewBox="0 0 1024 1024" width="16" height="16">
<path <path
d="M408.551619 97.52381a73.142857 73.142857 0 0 1 51.736381 21.430857L539.306667 197.973333A73.142857 73.142857 0 0 0 591.067429 219.428571H804.571429a73.142857 73.142857 0 0 1 73.142857 73.142858v560.761904a73.142857 73.142857 0 0 1-73.142857 73.142857H219.428571a73.142857 73.142857 0 0 1-73.142857-73.142857V170.666667a73.142857 73.142857 0 0 1 73.142857-73.142857h189.123048z m0 73.142857H219.428571v682.666666h585.142858V292.571429h-213.504a146.285714 146.285714 0 0 1-98.499048-38.13181L487.619048 249.734095 408.551619 170.666667zM365.714286 633.904762v73.142857h-73.142857v-73.142857h73.142857z m365.714285 0v73.142857H414.47619v-73.142857h316.952381z m-365.714285-195.047619v73.142857h-73.142857v-73.142857h73.142857z m365.714285 0v73.142857H414.47619v-73.142857h316.952381z"> d="M408.551619 97.52381a73.142857 73.142857 0 0 1 51.736381 21.430857L539.306667 197.973333A73.142857 73.142857 0 0 0 591.067429 219.428571H804.571429a73.142857 73.142857 0 0 1 73.142857 73.142858v560.761904a73.142857 73.142857 0 0 1-73.142857 73.142857H219.428571a73.142857 73.142857 0 0 1-73.142857-73.142857V170.666667a73.142857 73.142857 0 0 1 73.142857-73.142857h189.123048z m0 73.142857H219.428571v682.666666h585.142858V292.571429h-213.504a146.285714 146.285714 0 0 1-98.499048-38.13181L487.619048 249.734095 408.551619 170.666667zM365.714286 633.904762v73.142857h-73.142857v-73.142857h73.142857z m365.714285 0v73.142857H414.47619v-73.142857h316.952381z m-365.714285-195.047619v73.142857h-73.142857v-73.142857h73.142857z m365.714285 0v73.142857H414.47619v-73.142857h316.952381z">
@ -45,26 +41,40 @@
d="M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v2.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z"> d="M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v2.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z">
</path> </path>
</g> </g>
</svg> </svg><a href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('评论', '1 评论', '%d 评论'); ?></a>
<a href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('评论', '1 评论', '%d 评论'); ?></a>
</div> </div>
<div class="description">
<?php $this->excerpt(180); ?>
</div> </div>
</article>
<?php endwhile; ?> <?php endwhile; ?>
</main>
<?php
$this->pagenav(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" fill="var(--main)"></path></svg>',
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.1714 12.0007L8.22168 7.05093L9.63589 5.63672L15.9999 12.0007L9.63589 18.3646L8.22168 16.9504L13.1714 12.0007Z" fill="var(--main)"></path></svg>',
1,
'...',
array(
'wrapTag' => 'div',
'wrapClass' => 'cat_pagination_page',
'itemTag' => '',
'textTag' => 'a',
'currentClass' => 'active',
'prevClass' => 'prev',
'nextClass' => 'next'
)
);
?>
<!-- 搜索结果 -->
<?php else: ?> <?php else: ?>
<main class="site--main">
<header class="archive-header archive-header__search"> <header class="archive-header archive-header__search">
<div class="pagination"> <div class="pagination">
<h2>Sorry</h2> <h2>Sorry</h2>
<p>很遗憾,未找到您期待的内容</p> <p>很遗憾,未找到您期待的内容</p>
</div> </div>
<?php endif; ?>
<?php $this->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
</header> </header>
</main>
<?php endif; ?>
</article>
</main>
</div>
<?php $this->need('footer.php'); ?> <?php $this->need('footer.php'); ?>

View File

@ -1,5 +1,4 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> <?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<main class="site--main">
<div class="post--ingle__comments"> <div class="post--ingle__comments">
<div id="comments" class="responsesWrapper"> <div id="comments" class="responsesWrapper">
<?php $this->comments()->to($comments); ?> <?php $this->comments()->to($comments); ?>
@ -22,11 +21,48 @@
</svg><?php $this->commentsNum(_t('暂无评论'), _t('仅有 1 条评论'), _t('已有 %d 条评论')); ?> </svg><?php $this->commentsNum(_t('暂无评论'), _t('仅有 1 条评论'), _t('已有 %d 条评论')); ?>
</h3> </h3>
<?php if ($comments->have()): ?> <?php if ($comments->have()): ?>
<nav class="commentnav u-textAlignCenter"></nav>
<ol class="commentlist sulliComment--list"> </ol>
<?php $comments->listComments(); ?> <?php $comments->listComments(); ?>
<?php function threadedComments($comments, $options) {
$commentClass = '';
if ($comments->authorId) {
if ($comments->authorId == $comments->ownerId) {
$commentClass .= ' comment-by-author';
} else {
$commentClass .= ' comment-by-user';
}
}
$commentLevelClass = $comments->levels > 0 ? ' comment-child' : ' comment-parent';
?>
<li id="li-<?php $comments->theId(); ?>" class="comment-body<?php
if ($comments->levels > 0) {
echo ' comment-child';
$comments->levelsAlt(' comment-level-odd', ' comment-level-even');
} else {
echo ' comment-parent';
}
$comments->alt(' comment-odd', ' comment-even');
echo $commentClass;
?>">
<div id="<?php $comments->theId(); ?>">
<div class="comment-author">
<?php $comments->gravatar('40', ''); ?>
<cite class="fn"><?php $comments->author(); ?></cite>
</div>
<div class="comment-meta">
<a href="<?php $comments->permalink(); ?>"><?php $comments->date('Y-m-d H:i'); ?></a>
<span class="comment-reply"><?php $comments->reply(); ?></span>
</div>
<?php $comments->content(); ?>
<?php $singleCommentOptions->commentStatus(); ?>
</div>
<?php if ($comments->children) { ?>
<div class="comment-children">
<?php $comments->threadedComments($options); ?>
</div>
<?php } ?>
</li>
<?php } ?>
<?php <?php
$comments->pageNav( $comments->pageNav(
@ -74,7 +110,5 @@
<?php else: ?> <?php else: ?>
<?php _e(''); ?> <?php _e(''); ?>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> </div>
</main>

View File

@ -31,6 +31,7 @@ function themeConfig($form) {
'0', _t('是否在文章页面显示显示作者信息'), _t('选择“是”将在文章页面包含显示作者信息。')); '0', _t('是否在文章页面显示显示作者信息'), _t('选择“是”将在文章页面包含显示作者信息。'));
$form->addInput($showProfile); $form->addInput($showProfile);
} }
function get_post_view($archive) { function get_post_view($archive) {
$cid = $archive->cid; $cid = $archive->cid;
$db = Typecho_Db::get(); $db = Typecho_Db::get();

View File

@ -73,7 +73,6 @@ error_reporting(E_ALL);if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
</div> </div>
</div> </div>
<!-- 留下这个好看的搜索标,实际没有什么卵用-->
<svg class="svgIcon" width="25" height="25" data-action="show-search"> <svg class="svgIcon" width="25" height="25" data-action="show-search">
<path <path
d="M20.067 18.933l-4.157-4.157a6 6 0 1 0-.884.884l4.157 4.157a.624.624 0 1 0 .884-.884zM6.5 11c0-2.62 2.13-4.75 4.75-4.75S16 8.38 16 11s-2.13 4.75-4.75 4.75S6.5 13.62 6.5 11z"> d="M20.067 18.933l-4.157-4.157a6 6 0 1 0-.884.884l4.157 4.157a.624.624 0 1 0 .884-.884zM6.5 11c0-2.62 2.13-4.75 4.75-4.75S16 8.38 16 11s-2.13 4.75-4.75 4.75S6.5 13.62 6.5 11z">

View File

@ -7,39 +7,39 @@
if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?> <?php $this->need('header.php'); ?>
<main class="site--main"> <main class="site--main">
<header class="archive--header"> <header class="archive--header">
<h1 class="post--single__title"><?php $this->title() ?></h1> <h1 class="post--single__title"><?php $this->title() ?></h1>
<?php Typecho_Widget::widget('Widget_Stat')->to($quantity); ?> <?php Typecho_Widget::widget('Widget_Stat')->to($quantity); ?>
<h2 class="archive--title__year">共包含 <?php $quantity->publishedPostsNum(); ?> 篇文章</h2> <h2 class="archive--title__year">共包含 <?php $quantity->publishedPostsNum(); ?> 篇文章</h2>
</header> </header>
<div data-target="<?php $this->options->postLinkOpen(); ?>" class="page--archive" > <div class="page--archive" >
<?php <?php
$stat = Typecho_Widget::widget('Widget_Stat'); $stat = Typecho_Widget::widget('Widget_Stat');
Typecho_Widget::widget('Widget_Contents_Post_Recent', 'pageSize=' . $stat->publishedPostsNum)->to($archives); Typecho_Widget::widget('Widget_Contents_Post_Recent', 'pageSize=' . $stat->publishedPostsNum)->to($archives);
$year = 0; $year = 0;
$mon = 0; $mon = 0;
$i = 0; $i = 0;
$j = 0; $j = 0;
$output = '<div class="archives">'; $output = '<div class="archives">';
while ($archives->next()) { while ($archives->next()) {
$year_tmp = date('Y', $archives->created); $year_tmp = date('Y', $archives->created);
$mon_tmp = date('m', $archives->created); $mon_tmp = date('m', $archives->created);
$y = $year; $y = $year;
$m = $mon; $m = $mon;
if ($year > $year_tmp || $mon > $mon_tmp) { if ($year > $year_tmp || $mon > $mon_tmp) {
$output .= '</ul>'; $output .= '</ul>';
} }
if ($year != $year_tmp || $mon != $mon_tmp) { if ($year != $year_tmp || $mon != $mon_tmp) {
$year = $year_tmp; $year = $year_tmp;
$mon = $mon_tmp; $mon = $mon_tmp;
$output .= '<h2 class="archive--title__year">' . date('Y年', $archives->created) . '</h2> $output .= '<h2 class="archive--title__year">' . date('Y年', $archives->created) . '</h2>
<h3 class="archive--title__month">'. date('m月', $archives->created) .'</h3><ul class="archive--list" aria-label="' . date('Y年m月', $archives->created) . '"> <h3 class="archive--title__month">'. date('m月', $archives->created) .'</h3><ul class="archive--list" aria-label="' . date('Y年m月', $archives->created) . '">
'; //输出年份 '; //输出年份
} }
$output .= '<li class="archive--item"><div class="archive--title"><a href="' . $archives->permalink . '">' . $archives->title . '</a></div> $output .= '<li class="archive--item"><div class="archive--title"><a href="' . $archives->permalink . '">' . $archives->title . '</a></div>
<div class="archive--meta">' . date('m月d日', $archives->created) . '</div> </li>'; //输出文章 <div class="archive--meta">' . date('m月d日', $archives->created) . '</div> </li>'; //输出文章
} }
$output .= ' </ul></div></div>'; $output .= ' </ul></div>';
echo $output;?> echo $output;?>
</div> </div>
</main> </main>

View File

@ -11,17 +11,17 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<h1 class="post--single__title"><?php $this->title() ?></h1> <h1 class="post--single__title"><?php $this->title() ?></h1>
</header> </header>
<section class="category--list"> <section class="category--list">
<?php $this->widget('Widget_Metas_Category_List')->parse(' <?php $this->widget('Widget_Metas_Category_List')->parse('
<div class="category--item"> <div class="category--item">
<img src="https://static.fatesinger.com/2021/12/vhp6eou5x2wqh2zy.jpg" class="category--cover"/> <img src="https://static.fatesinger.com/2021/12/vhp6eou5x2wqh2zy.jpg" class="category--cover"/>
<div class="category--content"> <div class="category--content">
<a href="{permalink}" class="category--card">{name} <a href="{permalink}" class="category--card">{name}
<span>({count})</span> <span>({count})</span>
</a> </a>
<div class="category--desc">{description}</div> <div class="category--desc">{description}</div>
</div> </div>
</div> </div>
'); ?> '); ?>
</section> </section>
</div> </div>
<?php $this->need('footer.php'); ?> <?php $this->need('footer.php'); ?>

View File

@ -11,8 +11,8 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<h1 class="post--single__title"><?php $this->title() ?></h1> <h1 class="post--single__title"><?php $this->title() ?></h1>
<h2 class="post--single__subtitle">观影数据来源于豆瓣</h2> <h2 class="post--single__subtitle">观影数据来源于豆瓣</h2>
</header> </header>
<div class="db--container">
<div data-status="watched" class="douban-movie-list doubanboard-list"></div> <div data-status="watched" class="douban-movie-list doubanboard-list"></div>
</div>
</section> </section>
<?php $this->need('footer.php'); ?> <?php $this->need('footer.php'); ?>

View File

@ -2,14 +2,13 @@
<?php $this->need('header.php'); ?> <?php $this->need('header.php'); ?>
<main class="site--main"> <main class="site--main">
<article class="post--single"> <article class="post--single">
<ul class="meta">
<ul class="meta"><div class="post--single__meta"> <div class="post--single__meta">
<svg class="icon" viewBox="0 0 1024 1024" width="16" height="16"> <svg class="icon" viewBox="0 0 1024 1024" width="16" height="16">
<path <path
d="M512 97.52381c228.912762 0 414.47619 185.563429 414.47619 414.47619s-185.563429 414.47619-414.47619 414.47619S97.52381 740.912762 97.52381 512 283.087238 97.52381 512 97.52381z m0 73.142857C323.486476 170.666667 170.666667 323.486476 170.666667 512s152.81981 341.333333 341.333333 341.333333 341.333333-152.81981 341.333333-341.333333S700.513524 170.666667 512 170.666667z m36.571429 89.697523v229.86362h160.865523v73.142857H512a36.571429 36.571429 0 0 1-36.571429-36.571429V260.388571h73.142858z"> d="M512 97.52381c228.912762 0 414.47619 185.563429 414.47619 414.47619s-185.563429 414.47619-414.47619 414.47619S97.52381 740.912762 97.52381 512 283.087238 97.52381 512 97.52381z m0 73.142857C323.486476 170.666667 170.666667 323.486476 170.666667 512s152.81981 341.333333 341.333333 341.333333 341.333333-152.81981 341.333333-341.333333S700.513524 170.666667 512 170.666667z m36.571429 89.697523v229.86362h160.865523v73.142857H512a36.571429 36.571429 0 0 1-36.571429-36.571429V260.388571h73.142858z">
</path> </path>
</svg> </svg><time class="humane--time"><?php $this->date('Y-m-d'); ?></time>
<time class="humane--time"><?php $this->date('Y-m-d'); ?></time>
<svg class="icon" viewBox="0 0 1024 1024" width="16" height="16"> <svg class="icon" viewBox="0 0 1024 1024" width="16" height="16">
<path <path
d="M408.551619 97.52381a73.142857 73.142857 0 0 1 51.736381 21.430857L539.306667 197.973333A73.142857 73.142857 0 0 0 591.067429 219.428571H804.571429a73.142857 73.142857 0 0 1 73.142857 73.142858v560.761904a73.142857 73.142857 0 0 1-73.142857 73.142857H219.428571a73.142857 73.142857 0 0 1-73.142857-73.142857V170.666667a73.142857 73.142857 0 0 1 73.142857-73.142857h189.123048z m0 73.142857H219.428571v682.666666h585.142858V292.571429h-213.504a146.285714 146.285714 0 0 1-98.499048-38.13181L487.619048 249.734095 408.551619 170.666667zM365.714286 633.904762v73.142857h-73.142857v-73.142857h73.142857z m365.714285 0v73.142857H414.47619v-73.142857h316.952381z m-365.714285-195.047619v73.142857h-73.142857v-73.142857h73.142857z m365.714285 0v73.142857H414.47619v-73.142857h316.952381z"> d="M408.551619 97.52381a73.142857 73.142857 0 0 1 51.736381 21.430857L539.306667 197.973333A73.142857 73.142857 0 0 0 591.067429 219.428571H804.571429a73.142857 73.142857 0 0 1 73.142857 73.142858v560.761904a73.142857 73.142857 0 0 1-73.142857 73.142857H219.428571a73.142857 73.142857 0 0 1-73.142857-73.142857V170.666667a73.142857 73.142857 0 0 1 73.142857-73.142857h189.123048z m0 73.142857H219.428571v682.666666h585.142858V292.571429h-213.504a146.285714 146.285714 0 0 1-98.499048-38.13181L487.619048 249.734095 408.551619 170.666667zM365.714286 633.904762v73.142857h-73.142857v-73.142857h73.142857z m365.714285 0v73.142857H414.47619v-73.142857h316.952381z m-365.714285-195.047619v73.142857h-73.142857v-73.142857h73.142857z m365.714285 0v73.142857H414.47619v-73.142857h316.952381z">
@ -20,28 +19,23 @@
d="M12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9ZM11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12Z" /> d="M12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9ZM11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12Z" />
<path fill-rule="evenodd" clip-rule="evenodd" <path fill-rule="evenodd" clip-rule="evenodd"
d="M21.83 11.2807C19.542 7.15186 15.8122 5 12 5C8.18777 5 4.45796 7.15186 2.17003 11.2807C1.94637 11.6844 1.94361 12.1821 2.16029 12.5876C4.41183 16.8013 8.1628 19 12 19C15.8372 19 19.5882 16.8013 21.8397 12.5876C22.0564 12.1821 22.0536 11.6844 21.83 11.2807ZM12 17C9.06097 17 6.04052 15.3724 4.09173 11.9487C6.06862 8.59614 9.07319 7 12 7C14.9268 7 17.9314 8.59614 19.9083 11.9487C17.9595 15.3724 14.939 17 12 17Z" /> d="M21.83 11.2807C19.542 7.15186 15.8122 5 12 5C8.18777 5 4.45796 7.15186 2.17003 11.2807C1.94637 11.6844 1.94361 12.1821 2.16029 12.5876C4.41183 16.8013 8.1628 19 12 19C15.8372 19 19.5882 16.8013 21.8397 12.5876C22.0564 12.1821 22.0536 11.6844 21.83 11.2807ZM12 17C9.06097 17 6.04052 15.3724 4.09173 11.9487C6.06862 8.59614 9.07319 7 12 7C14.9268 7 17.9314 8.59614 19.9083 11.9487C17.9595 15.3724 14.939 17 12 17Z" />
</svg> </svg><span class="article--views"><a><?php get_post_view($this) ?></a></span> 阅读
<span class="article--views"><a><?php get_post_view($this) ?></a></span> 阅读
<svg viewBox="0 0 24 24" class="icon" aria-hidden="true" width="16" height="16"> <svg viewBox="0 0 24 24" class="icon" aria-hidden="true" width="16" height="16">
<g> <g>
<path <path
d="M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v2.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z"> d="M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v2.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z">
</path> </path>
</g> </g>
</svg> </svg> <a href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('评论', '1 评论', '%d 评论'); ?></a>
<a href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('评论', '1 评论', '%d 评论'); ?></a>
</div> </div>
<h2 class="post--single__title"><?php $this->title() ?></h2> <h2 class="post--single__title"><?php $this->title() ?></h2>
<div class="post--single__content graph" > <div class="post--single__content graph" ><?php $this->content(); ?></div>
<?php $this->content(); ?>
</div>
<div class="post--single__action"> <div class="post--single__action">
<!--打赏 --> <!--打赏 -->
<script type="text/javascript" src="https://blogcdn.loliko.cn/donate/index_wx.js?121"></script> <script type="text/javascript" src="https://blogcdn.loliko.cn/donate/index_wx.js?121"></script>
<link rel="stylesheet" type="text/css" href="https://blogcdn.loliko.cn/donate/style_wx.css?121" /> <link rel="stylesheet" type="text/css" href="https://blogcdn.loliko.cn/donate/style_wx.css?121" />
<div class="donate-panel"> <div class="donate-panel">
<div id="donate-btn"></div> <div id="donate-btn"></div>
<div id="qrcode-panel" style="display: none;"> <div id="qrcode-panel" style="display: none;">
<div class="qrcode-body"> <div class="qrcode-body">
@ -53,9 +47,10 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
<!-- TAG --> <!--打赏结束 -->
</div>
<!-- TAG -->
<div class="tag--list artile--tag"> <div class="tag--list artile--tag">
<?php $this->tags(' ', true, ' '); ?> <?php $this->tags(' ', true, ' '); ?>
</div> </div>
@ -63,6 +58,12 @@
<?php if ($this->options->showProfile): ?> <?php if ($this->options->showProfile): ?>
<?php $this->need('profile.php'); ?> <?php $this->need('profile.php'); ?>
<?php endif; ?> <?php endif; ?>
<!-- 判断如果禁止评论则不显示评论的div -->
<?php if ($this->allow('comment')): ?>
<?php $this->need('comments.php'); ?>
<?php endif; ?>
<!-- 可以使用第三方评论-->
<?php $this->options->twikoo(); ?>
<!--翻页--> <!--翻页-->
<nav class="navigation post-navigation is-active"> <nav class="navigation post-navigation is-active">
<div class="nav-links"> <div class="nav-links">
@ -78,11 +79,6 @@
</nav> </nav>
</ul> </ul>
</article> </article>
<!-- 判断如果禁止评论则不显示评论的div -->
<?php if ($this->allow('comment')): ?>
<?php $this->need('comments.php'); ?>
<?php endif; ?>
<!-- 可以使用第三方评论-->
<?php $this->options->twikoo(); ?>
</main> </main>
<?php $this->need('footer.php'); ?> <?php $this->need('footer.php'); ?>

View File

@ -1,9 +1,12 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> <?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php while($this->next()): ?> <?php while($this->next()): ?>
<article class="post--item" itemtype="http://schema.org/Article" itemscope="itemscope" > <article class="post--item">
<div class="content"> <div class="content">
<h2 class="post--title" itemprop="headline"> <h2 class="post--title">
<a href="<?php $this->permalink() ?>"><?php $this->title() ?><?php if((time() - $this->created) < 60*60*24*3): ?> <a href="<?php $this->permalink() ?>">
<!--三天内显示火苗-->
<?php $this->title() ?>
<?php if((time() - $this->created) < 60*60*24*3): ?>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
class="icon--sticky" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="icon--sticky" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="w-4 h-4 text-red-400"> stroke-linejoin="round" class="w-4 h-4 text-red-400">
@ -14,8 +17,8 @@
<?php endif; ?> <?php endif; ?>
</a> </a>
</h2> </h2>
<div class="description" itemprop="about"> <div class="description">
<!-- 本功能实现 借助插件实现 --> <!-- 本功能实现 借助插件 AIsummary 实现 -->
<?php <?php
// 判断是否存在自定义字段summary并输出否则输出自动生成的摘要 // 判断是否存在自定义字段summary并输出否则输出自动生成的摘要
if($this->fields->summary){ if($this->fields->summary){
@ -52,9 +55,7 @@
</svg> </svg>
<a href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('评论', '1 评论', '%d 评论'); ?></a> <a href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('评论', '1 评论', '%d 评论'); ?></a>
</div> </div>
</div> </div>
</article> </article>
<?php endwhile; ?> <?php endwhile; ?>