feat: topbar legacy-sync button, card view mode with cover fallback, year/month/day archives, richer page cache admin, stylevar repeater editor
- topbar: Livewire LegacySyncButton next to 写文章 (moved from user menu) - view modes: add 图文(card) grid with cover fallback chain (cover → attachment → first content image → placeholder); list mode now title-only compact - archives: year/month/day index grid - page cache admin: size + expiry columns, total size, cache policy note - theme inject: stylevars switch from KeyValue to Repeater with multi-line HTML editing - import: html_entity_decode for category/post-title/link/keywords/comment author
This commit is contained in:
@@ -102,6 +102,90 @@ a:hover {
|
||||
padding: 18px 20px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
/* 列表模式:纯标题列表,紧凑 */
|
||||
.post-list-list .post-card {
|
||||
padding: 8px 20px;
|
||||
margin-bottom: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
.post-list-list .post-card:last-child {
|
||||
border-bottom: 1px solid #d8dfe6;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.post-list-list .post-card .post-title {
|
||||
font-size: 15px;
|
||||
margin-bottom: 2px;
|
||||
display: inline;
|
||||
}
|
||||
.post-list-list .post-card .post-meta {
|
||||
display: inline;
|
||||
margin-left: 10px;
|
||||
}
|
||||
/* 图文模式:卡片网格 */
|
||||
.post-list-card {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.post-list-card .post-card {
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.post-list-card .post-cover {
|
||||
display: block;
|
||||
aspect-ratio: 16 / 10;
|
||||
background: #eef2f5;
|
||||
overflow: hidden;
|
||||
}
|
||||
.post-list-card .post-cover img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
.post-cover-placeholder {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
padding: 12px;
|
||||
color: #7a8a99;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
background: linear-gradient(135deg, #eef2f5 0%, #dde7ee 100%);
|
||||
}
|
||||
.post-list-card .post-card-body {
|
||||
padding: 12px 14px;
|
||||
flex: 1;
|
||||
}
|
||||
.post-list-card .post-title {
|
||||
font-size: 15px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.post-list-card .post-excerpt {
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
margin-bottom: 8px;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
@media (max-width: 1024px) {
|
||||
.post-list-card {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
@media (max-width: 640px) {
|
||||
.post-list-card {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.post-card.sticky {
|
||||
border-left: 4px solid #f60;
|
||||
}
|
||||
@@ -452,6 +536,63 @@ a:hover {
|
||||
margin: 4px 0 10px 20px;
|
||||
}
|
||||
|
||||
/* 年/月/日索引归档 */
|
||||
.archive-months {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 10px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.archive-month {
|
||||
border: 1px solid #e5e5e5;
|
||||
border-radius: 4px;
|
||||
padding: 8px 10px;
|
||||
background: #fafafa;
|
||||
}
|
||||
.archive-month.is-empty {
|
||||
opacity: .45;
|
||||
background: transparent;
|
||||
}
|
||||
.archive-month-title {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.archive-month.has-posts .archive-month-title:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.archive-month-title .count {
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
}
|
||||
.archive-days {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
}
|
||||
.archive-day {
|
||||
display: inline-block;
|
||||
min-width: 22px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
background: #e8f0f8;
|
||||
color: #1c62b0;
|
||||
text-decoration: none;
|
||||
}
|
||||
.archive-day:hover {
|
||||
background: #1c62b0;
|
||||
color: #fff;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.archive-months {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.links-list {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
@@ -14,11 +14,13 @@
|
||||
@include('partials.view-mode-switcher')
|
||||
@include('partials.theme-inject', ['point' => 'content_top'])
|
||||
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@empty
|
||||
<div class="empty">暂无文章</div>
|
||||
@endforelse
|
||||
<div class="post-list post-list-{{ $homeViewMode ?? 'list' }}">
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@empty
|
||||
<div class="empty">暂无文章</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
@include('partials.pagination', ['paginator' => $posts])
|
||||
@include('partials.theme-inject', ['point' => 'content_bottom'])
|
||||
|
||||
@@ -27,11 +27,13 @@
|
||||
@include('partials.view-mode-switcher')
|
||||
@include('partials.theme-inject', ['point' => 'content_top'])
|
||||
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@empty
|
||||
<div class="empty">该分类暂无文章</div>
|
||||
@endforelse
|
||||
<div class="post-list post-list-{{ $homeViewMode ?? 'list' }}">
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@empty
|
||||
<div class="empty">该分类暂无文章</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
@include('partials.pagination', ['paginator' => $posts])
|
||||
@include('partials.theme-inject', ['point' => 'content_bottom'])
|
||||
|
||||
@@ -13,11 +13,13 @@
|
||||
@include('partials.view-mode-switcher')
|
||||
@include('partials.theme-inject', ['point' => 'content_top'])
|
||||
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@empty
|
||||
<div class="empty">没有找到相关文章</div>
|
||||
@endforelse
|
||||
<div class="post-list post-list-{{ $homeViewMode ?? 'list' }}">
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@empty
|
||||
<div class="empty">没有找到相关文章</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
@include('partials.pagination', ['paginator' => $posts])
|
||||
@include('partials.theme-inject', ['point' => 'content_bottom'])
|
||||
|
||||
@@ -9,11 +9,13 @@
|
||||
@include('partials.view-mode-switcher')
|
||||
@include('partials.theme-inject', ['point' => 'content_top'])
|
||||
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@empty
|
||||
<div class="empty">该标签暂无文章</div>
|
||||
@endforelse
|
||||
<div class="post-list post-list-{{ $homeViewMode ?? 'list' }}">
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@empty
|
||||
<div class="empty">该标签暂无文章</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
@include('partials.pagination', ['paginator' => $posts])
|
||||
@include('partials.theme-inject', ['point' => 'content_bottom'])
|
||||
|
||||
Reference in New Issue
Block a user