v1.1 — 图片/头像/作者/日期全面优化

- 图片: 缩略图改为 soft crop,原图裁黑边
- 头像: 团队证件照替换 SVG,CSS 约束尺寸和圆角
- 作者: 了心/墨羽/探子三个真实用户
- 笺文列表: 左侧增加封面缩略图
- 分页: 20篇/页
- 详情页: 返回笺文链接 + 头像尺寸约束
- 作者页: 高清头像 + 中文日期
- 微言: 作者随机 + 时间匹配内容
This commit is contained in:
2026-05-03 23:59:38 +08:00
parent e123fbe9e8
commit 16c3e10494
4 changed files with 83 additions and 6 deletions
+6 -1
View File
@@ -5,7 +5,7 @@
get_header();
$pg = isset($_GET['pg']) ? max(1, (int) $_GET['pg']) : 1;
$per_page = 3;
$per_page = 20;
$query = new WP_Query(array(
'post_type' => 'post',
'posts_per_page' => $per_page,
@@ -23,6 +23,11 @@ $total_pages = ceil($total / $per_page);
<div class="article-list">
<?php while ($query->have_posts()) : $query->the_post(); ?>
<a href="<?php the_permalink(); ?>" class="article-item">
<?php if (has_post_thumbnail()) : ?>
<div class="article-item__thumb">
<?php the_post_thumbnail('thumbnail', array('alt' => get_the_title())); ?>
</div>
<?php endif; ?>
<div class="article-item__main">
<span class="article-title"><?php the_title(); ?></span>
<span class="article-item__author"><?php echo get_avatar(get_the_author_meta('ID'), 14, '', '', array('class' => 'article-avatar')); ?> <?php the_author_meta('display_name'); ?></span>