mirror of https://github.com/vtrois/kratos
feat: add article pagination (#38)
parent
3c992204bb
commit
621b468815
|
@ -417,6 +417,31 @@ button:focus {
|
||||||
color: #444;
|
color: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.k-main .details .article .content .paginations {
|
||||||
|
padding-top: 20px;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.k-main .details .article .content .paginations a {
|
||||||
|
margin: 0 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.k-main .details .article .content .paginations a span {
|
||||||
|
padding: 7px 12px;
|
||||||
|
border: solid 1px #00a2ff;
|
||||||
|
background-color: #f0f8ff;
|
||||||
|
color: #00a2ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.k-main .details .article .content .paginations .current span,.k-main .details .article .content .paginations a span:hover {
|
||||||
|
padding: 7px 12px;
|
||||||
|
border: solid 1px #00a2ff;
|
||||||
|
background: #00a2ff;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------
|
/*--------------------------------------------------------------
|
||||||
5. 文章列表
|
5. 文章列表
|
||||||
--------------------------------------------------------------*/
|
--------------------------------------------------------------*/
|
||||||
|
|
File diff suppressed because one or more lines are too long
30
page.php
30
page.php
|
@ -17,7 +17,35 @@ get_header(); ?>
|
||||||
<h1 class="title m-0"><?php the_title(); ?></h1>
|
<h1 class="title m-0"><?php the_title(); ?></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?php the_content(); ?>
|
<?php
|
||||||
|
the_content();
|
||||||
|
wp_link_pages(
|
||||||
|
array(
|
||||||
|
'before' => '<div class="paginations text-center">',
|
||||||
|
'after' => '',
|
||||||
|
'next_or_number' => 'next',
|
||||||
|
'previouspagelink' => __('<span>上一页</span>', 'kratos'),
|
||||||
|
'nextpagelink' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
wp_link_pages(
|
||||||
|
array(
|
||||||
|
'before' => '',
|
||||||
|
'after' => '',
|
||||||
|
'next_or_number' => 'number',
|
||||||
|
'link_before' =>'<span>',
|
||||||
|
'link_after'=>'</span>'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
wp_link_pages(
|
||||||
|
array(
|
||||||
|
'before' => '',
|
||||||
|
'after' => '</div>',
|
||||||
|
'next_or_number' => 'next',
|
||||||
|
'previouspagelink' => '',
|
||||||
|
'nextpagelink' => __('<span>下一页</span>', 'kratos')
|
||||||
|
)
|
||||||
|
); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
27
single.php
27
single.php
|
@ -49,6 +49,33 @@ get_header(); ?>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
the_content();
|
the_content();
|
||||||
|
wp_link_pages(
|
||||||
|
array(
|
||||||
|
'before' => '<div class="paginations text-center">',
|
||||||
|
'after' => '',
|
||||||
|
'next_or_number' => 'next',
|
||||||
|
'previouspagelink' => __('<span>上一页</span>', 'kratos'),
|
||||||
|
'nextpagelink' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
wp_link_pages(
|
||||||
|
array(
|
||||||
|
'before' => '',
|
||||||
|
'after' => '',
|
||||||
|
'next_or_number' => 'number',
|
||||||
|
'link_before' =>'<span>',
|
||||||
|
'link_after'=>'</span>'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
wp_link_pages(
|
||||||
|
array(
|
||||||
|
'before' => '',
|
||||||
|
'after' => '</div>',
|
||||||
|
'next_or_number' => 'next',
|
||||||
|
'previouspagelink' => '',
|
||||||
|
'nextpagelink' => __('<span>下一页</span>', 'kratos')
|
||||||
|
)
|
||||||
|
);
|
||||||
if(kratos_option('s_singledown',false)){
|
if(kratos_option('s_singledown',false)){
|
||||||
if(kratos_option('s_singledown_links')){
|
if(kratos_option('s_singledown_links')){
|
||||||
echo '<a href="'. kratos_option('s_singledown_links') .'" target="_blank" rel="noreferrer">';
|
echo '<a href="'. kratos_option('s_singledown_links') .'" target="_blank" rel="noreferrer">';
|
||||||
|
|
Loading…
Reference in New Issue