更改页码显示
去除不必要的设置
This commit is contained in:
浪子 2024-07-25 08:21:49 +08:00
parent 8c696e028c
commit 6ee130ce3d
8 changed files with 50 additions and 3966 deletions

View File

@ -46,23 +46,24 @@
</article>
<?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>',
<?php
$this->pageNav(
' ',
' ',
1,
'...',
array(
'wrapTag' => 'div',
'wrapClass' => 'pagination_page',
'wrapTag' => 'nav',
'wrapClass' => 'nav-links nav-links__comment',
'itemTag' => '',
'textTag' => 'a',
'currentClass' => 'active',
'prevClass' => 'prev',
'nextClass' => 'next'
'textTag' => 'span',
'itemClass' => 'page-numbers',
'currentClass' => 'page-numbers current',
'prevClass' => 'hidden',
'nextClass' => 'hidden'
)
);
?>
?>
<!-- 搜索结果 -->
<?php else: ?>
<main class="site--main">
@ -74,44 +75,4 @@
</header>
</main>
<?php endif; ?>
<style>
/* 分页 */
.pagination_page{
display: flex;
align-items: center;
justify-content: center;
margin-top: var(--margin);
gap: 0.5rem;
}
.pagination_page li.active a {
background: var(--theme);
color: #fff;
font-weight: 500;
}
.pagination_page a{
display: flex;
padding: 0.5rem;
font-size: 0.9rem;
width: 1.75rem;
height: 1.75rem;
background: var(--background);
border-radius: 50%;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
transition: 0.2s;
-webkit-transition: 0.2s;
justify-content: center;
align-items: center;
letter-spacing: 0;
}
.pagination_page span.next{
cursor: pointer;
}
.pagination_page li.active a:hover{
cursor: not-allowed;
}
/* 分页 */
</style>
<?php $this->need('footer.php'); ?>

View File

@ -1,44 +1,4 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<style>
/* 分页 */
.pagination_page{
display: flex;
align-items: center;
justify-content: center;
margin-top: var(--margin);
gap: 0.5rem;
}
.pagination_page li.active a {
background: var(--theme);
color: #fff;
font-weight: 500;
}
.pagination_page a{
display: flex;
padding: 0.5rem;
font-size: 0.9rem;
width: 1.75rem;
height: 1.75rem;
background: var(--background);
border-radius: 50%;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
transition: 0.2s;
-webkit-transition: 0.2s;
justify-content: center;
align-items: center;
letter-spacing: 0;
}
.pagination_page span.next{
cursor: pointer;
}
.pagination_page li.active a:hover{
cursor: not-allowed;
}
/* 分页 */
</style>
<div class="post--ingle__comments">
<?php $this->comments()->to($comments); ?>
<?php if($this->allow('comment')): ?>
@ -88,20 +48,22 @@
<?php endif; ?>
<?php if ($comments->have()): ?>
<?php $comments->listComments(); ?>
<?php
$comments->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' => 'pagination_page',
'wrapTag' => 'nav',
'wrapClass' => 'nav-links nav-links__comment',
'itemTag' => '',
'textTag' => 'a',
'currentClass' => 'active',
'prevClass' => 'prev',
'nextClass' => 'next'
'textTag' => 'span',
'itemClass' => 'page-numbers',
'currentClass' => 'page-numbers current',
'prevClass' => 'hidden',
'nextClass' => 'hidden'
)
);
?>

3806
dist/css/style.css vendored

File diff suppressed because it is too large Load Diff

View File

@ -1097,6 +1097,11 @@ textarea {
position: relative
}
.nav-links a {
padding: 20px;
position: relative
}
.nav-links .page-numbers:hover,
.nav-links .post-page-numbers:hover {
color: var(--farallon-hover-color)
@ -1123,6 +1128,14 @@ textarea {
left: 0
}
.nav-links span {
color: var(--farallon-text-gray)
}
.hidden {
display: none !important;
}
.nav-links .page-numbers.dots,
.nav-links .post-page-numbers.dots {
color: var(--farallon-text-gray)

2
dist/js/bundle.js vendored
View File

@ -46,7 +46,7 @@
}
initCopyright() {
const copyright = `<div class="site--footer__info">
Theme <a href="https://fatesinger.com/101971" target="_blank">farallon</a> by bigfa / version ${this.VERSION}
Theme <a href="https://fatesinger.com/101971" target="_blank">farallon</a> by bigfa <a href="https://www.imsun.org" target="_blank">&nbsp;Made with Sun</a> / version ${this.VERSION}
</div>`;
document.querySelector(".site--footer__content").insertAdjacentHTML("afterend", copyright);
document.querySelector(".icon--copryrights").addEventListener("click", () => {

View File

@ -7,18 +7,13 @@
<?php //sitemap填入
if($this->options->sitemapurl): ?>
<a href="<?php $this->options->sitemapurl() ?>" target="_blank">💗</a>
<?php endif; ?>
<a href="https://www.typecho.org" target="_blank">Typecho驱动</a>
<a href="https://www.imsun.org" target="_blank">&nbsp;Made with Sun</a>
<?php endif; ?>
<?php //添加加载时间控制
if ($this->options->showtime): ?>
&nbsp;页面加载耗时<?php echo timer_stop();?>
<?php endif; ?>
<div class="copyright">
<a href="<?php $this->options->siteUrl(); ?>">
<?php $this->options->title(); ?>
</a> &nbsp; ©
<?php $this->options->jzyear() ?>-<?php echo date('Y'); ?>
<div class="copyright"> © <?php echo date('Y'); ?>
<?php $this->options->title(); ?>由<a href="https://www.typecho.org" target="_blank">Typecho</a> 驱动
<svg class="icon icon--copryrights" viewBox="0 0 1040 1024" width="16" height="16">
<path
d="M717.056236 383.936299l-51.226708 0c-28.2893 0-51.226708 22.936385-51.226708 51.225685l0 128.062678c0 28.2893 22.937408 51.225685 51.226708 51.225685l51.226708 0c28.2893 0 51.225685-22.936385 51.225685-51.225685L768.281921 435.161984C768.281921 406.872684 745.345536 383.936299 717.056236 383.936299zM717.056236 537.611308c0 14.158465-11.480472 25.612331-25.613354 25.612331-14.132882 0-25.612331-11.453866-25.612331-25.612331l0-76.835969c0-14.158465 11.480472-25.613354 25.612331-25.613354 14.133905 0 25.613354 11.453866 25.613354 25.613354L717.056236 537.611308zM1013.977739 426.580538 859.776751 165.30079c-8.888438-15.063067-22.294772-25.975605-37.57171-32.080649-32.708959-34.856879-79.187527-56.638975-130.762159-56.638975L332.862064 76.581166c-51.575656 0-98.0532 21.782096-130.761136 56.639998-15.276938 6.105045-28.683273 17.017582-37.572734 32.079626L10.327206 426.580538c-21.26021 36.069497-8.655124 82.217537 28.239158 103.028515l115.00836 64.967664 0 199.163015c0 99.024318 80.264045 153.678078 179.287339 153.678078l358.580818 0c99.024318 0 179.290409-80.266092 179.290409-179.290409L870.733291 594.575694l115.00836-64.966641C1022.63184 508.798075 1035.238972 462.650035 1013.977739 426.580538zM153.574724 536.518417l-67.058278-37.875632c-24.589025-13.907755-33.019021-44.647873-18.809391-68.684312l85.86767-145.555074L153.574724 536.518417zM646.620024 127.807874c0 56.5786-60.205197 102.45137-134.467551 102.45137-74.261331 0-134.466528-45.873794-134.466528-102.45137L646.620024 127.807874zM819.507606 742.515071c0 84.893482-68.810179 153.677055-153.678078 153.677055L358.475418 896.192126c-84.8679 0-153.675008-68.783573-153.675008-153.677055l0-461.030142c0-76.150354 55.402821-139.361001 128.093377-151.545508 1.332345 83.883479 81.06734 151.545508 179.258687 151.545508 98.19237 0 177.926342-67.662029 179.25971-151.545508 72.690556 12.183484 128.096447 75.394131 128.096447 151.545508L819.508629 742.515071zM937.791569 498.642784l-67.058278 37.875632 0-252.111948 85.86767 145.552004C970.807521 453.995935 962.377524 484.736053 937.791569 498.642784z"

View File

@ -7,8 +7,6 @@ function themeConfig($form) {
$form->addInput($icoUrl);
$sticky = new Typecho_Widget_Helper_Form_Element_Text('sticky', NULL, NULL, _t('置顶文章cid'), _t('多篇文章以`|`符号隔开'), _t('会在首页展示置顶文章。'));
$form->addInput($sticky);
$jzyear = new Typecho_Widget_Helper_Form_Element_Text('jzyear', NULL, NULL, _t('建站年份'), _t('eg. 2006'), _t('会在页脚显示。'));
$form->addInput($jzyear);
$showProfile = new Typecho_Widget_Helper_Form_Element_Radio('showProfile',
array('0'=> _t('否'), '1'=> _t('是')),
'0', _t('是否在文章页面显示显示作者信息'), _t('选择“是”将在文章页面包含显示作者信息。'));

View File

@ -131,59 +131,20 @@ if ($sticky) {
</article>
<?php endwhile; ?>
<?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>',
$this->pageNav(
' ',
' ',
1,
'...',
array(
'wrapTag' => 'div',
'wrapClass' => 'pagination_page',
'wrapTag' => 'nav',
'wrapClass' => 'nav-links nav-links__comment',
'itemTag' => '',
'textTag' => 'a',
'currentClass' => 'active',
'prevClass' => 'prev',
'nextClass' => 'next'
'textTag' => 'span',
'itemClass' => 'page-numbers',
'currentClass' => 'page-numbers current',
'prevClass' => 'hidden',
'nextClass' => 'hidden'
)
);
?>
<style>
/* 分页 */
.pagination_page{
display: flex;
align-items: center;
justify-content: center;
margin-top: var(--margin);
gap: 0.5rem;
}
.pagination_page li.active a {
background: var(--theme);
color: #fff;
font-weight: 500;
}
.pagination_page a{
display: flex;
padding: 0.5rem;
font-size: 0.9rem;
width: 1.75rem;
height: 1.75rem;
background: var(--background);
border-radius: 50%;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
transition: 0.2s;
-webkit-transition: 0.2s;
justify-content: center;
align-items: center;
letter-spacing: 0;
}
.pagination_page span.next{
cursor: pointer;
}
.pagination_page li.active a:hover{
cursor: not-allowed;
}
/* 分页 */
</style>
?>