fix: restyle pager chips and restore theme ad slots
Replace the loose page-count label with a SaBlog-style 6 / 316 chip, wire inject/stylevar HTML into list and post views, and flush page cache when ads are saved. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<p>由 LaraLog 驱动 · Demo 主题</p>
|
||||
</div>
|
||||
</footer>
|
||||
@stack('theme:footer')
|
||||
@include('partials.theme-inject', ['point' => 'footer'])
|
||||
@stack('theme:body_end')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -23,4 +23,4 @@
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
@stack('theme:header')
|
||||
@include('partials.theme-inject', ['point' => 'header'])
|
||||
|
||||
@@ -366,18 +366,22 @@ a:hover {
|
||||
max-width: 100%;
|
||||
}
|
||||
.pagination-info {
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
margin-right: 6px;
|
||||
padding: 6px 10px;
|
||||
margin-right: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.pagination-links a,
|
||||
.pagination-links .current,
|
||||
.pagination-links .disabled {
|
||||
padding: 6px 14px;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
font-size: 14px;
|
||||
font-size: 13px;
|
||||
background: var(--card);
|
||||
color: var(--text);
|
||||
}
|
||||
@@ -389,6 +393,19 @@ a:hover {
|
||||
.pagination-links .disabled {
|
||||
color: var(--muted);
|
||||
}
|
||||
.theme-inject {
|
||||
margin: 12px 0;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.theme-inject:empty {
|
||||
display: none;
|
||||
}
|
||||
.theme-inject img,
|
||||
.theme-inject iframe {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.m-footer {
|
||||
border-top: 1px solid var(--border);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@stack('theme:footer')
|
||||
@include('partials.theme-inject', ['point' => 'footer'])
|
||||
<footer class="m-footer">
|
||||
<div class="m-container">
|
||||
<p>© {{ date('Y') }} {{ $siteName }}
|
||||
|
||||
@@ -23,4 +23,4 @@
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
@stack('theme:header')
|
||||
@include('partials.theme-inject', ['point' => 'header'])
|
||||
|
||||
@@ -370,34 +370,63 @@ a:hover {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
margin: 12px 0;
|
||||
margin: 14px 0;
|
||||
clear: both;
|
||||
}
|
||||
.pagination-links {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
gap: 1px;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
margin: 12px 0;
|
||||
margin: 0;
|
||||
}
|
||||
.pagination-info {
|
||||
color: #888;
|
||||
background: #f5fbff;
|
||||
border: 1px solid #86b9d6;
|
||||
color: #336;
|
||||
font-size: 12px;
|
||||
margin-right: 6px;
|
||||
padding: 2px 6px;
|
||||
margin-right: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.pagination-links a,
|
||||
.pagination-links .current,
|
||||
.pagination-links .disabled {
|
||||
padding: 2px 7px;
|
||||
border: 1px solid #d8dfe6;
|
||||
padding: 2px 6px;
|
||||
border: 1px solid #dedeb8;
|
||||
background: #fff;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
min-width: 1.6em;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
.pagination-links a:hover {
|
||||
background: #f5fbff;
|
||||
border-color: #86b9d6;
|
||||
}
|
||||
.pagination-links .current {
|
||||
background: #1c62b0;
|
||||
color: #fff;
|
||||
background: #ffffd9;
|
||||
color: #92a05a;
|
||||
font-weight: 700;
|
||||
border-color: #dedeb8;
|
||||
}
|
||||
.pagination-links .disabled {
|
||||
color: #999;
|
||||
}
|
||||
.theme-inject {
|
||||
margin: 8px 0;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.theme-inject:empty {
|
||||
display: none;
|
||||
}
|
||||
.theme-inject img,
|
||||
.theme-inject iframe {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
#footer {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
@endif
|
||||
|
||||
@include('partials.view-mode-switcher')
|
||||
@include('partials.theme-inject', ['point' => 'content_top'])
|
||||
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@@ -20,6 +21,7 @@
|
||||
@endforelse
|
||||
|
||||
@include('partials.pagination', ['paginator' => $posts])
|
||||
@include('partials.theme-inject', ['point' => 'content_bottom'])
|
||||
</main>
|
||||
@include('partials.sidebar')
|
||||
</div>{{-- #page --}}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
|
||||
@include('partials.view-mode-switcher')
|
||||
@include('partials.theme-inject', ['point' => 'content_top'])
|
||||
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@@ -33,6 +34,7 @@
|
||||
@endforelse
|
||||
|
||||
@include('partials.pagination', ['paginator' => $posts])
|
||||
@include('partials.theme-inject', ['point' => 'content_bottom'])
|
||||
</main>
|
||||
@include('partials.sidebar')
|
||||
</div>{{-- #page --}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@stack('theme:footer')
|
||||
@include('partials.theme-inject', ['point' => 'footer'])
|
||||
<footer id="footer">
|
||||
<p>© {{ date('Y') }} {{ $siteName }}
|
||||
@if($siteIcp)<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener">{{ $siteIcp }}</a>@endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<a href="{{ route('home') }}">{{ $siteName }}</a>
|
||||
<p class="description">{{ $siteDescription }}</p>
|
||||
</div>
|
||||
@stack('theme:header')
|
||||
@include('partials.theme-inject', ['point' => 'header'])
|
||||
<nav id="nav">
|
||||
<ul>
|
||||
<li class="{{ request()->routeIs('home') ? 'current_page_item' : '' }}"><a href="{{ route('home') }}">首页</a></li>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<aside class="sidebar">
|
||||
@stack('theme:sidebar_top')
|
||||
@include('partials.theme-inject', ['point' => 'sidebar_top'])
|
||||
<div class="searchbox">
|
||||
<form action="{{ route('search') }}" method="get">
|
||||
<input type="search" name="q" value="{{ request('q', request('keyword', '')) }}" placeholder="搜索文章">
|
||||
@@ -83,5 +83,5 @@
|
||||
<li>标签 {{ $blogStats['tags'] }} 个</li>
|
||||
</ul>
|
||||
</section>
|
||||
@stack('theme:sidebar_bottom')
|
||||
@include('partials.theme-inject', ['point' => 'sidebar_bottom'])
|
||||
</aside>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
</form>
|
||||
|
||||
@include('partials.view-mode-switcher')
|
||||
@include('partials.theme-inject', ['point' => 'content_top'])
|
||||
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@@ -19,6 +20,7 @@
|
||||
@endforelse
|
||||
|
||||
@include('partials.pagination', ['paginator' => $posts])
|
||||
@include('partials.theme-inject', ['point' => 'content_bottom'])
|
||||
</main>
|
||||
@include('partials.sidebar')
|
||||
</div>{{-- #page --}}
|
||||
|
||||
@@ -48,11 +48,11 @@
|
||||
<span>· 阅读 {{ $post->views }}</span>
|
||||
</div>
|
||||
|
||||
@stack('theme:post_content_top')
|
||||
@include('partials.theme-inject', ['point' => 'post_content_top'])
|
||||
<div class="post-content">
|
||||
{!! $contentHtml !!}
|
||||
</div>
|
||||
@stack('theme:post_content_bottom')
|
||||
@include('partials.theme-inject', ['point' => 'post_content_bottom'])
|
||||
|
||||
@if($post->tags->isNotEmpty())
|
||||
<div class="post-tags">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<h1 class="list-title">标签:{{ $tag->name }}</h1>
|
||||
|
||||
@include('partials.view-mode-switcher')
|
||||
@include('partials.theme-inject', ['point' => 'content_top'])
|
||||
|
||||
@forelse($posts as $post)
|
||||
@include('partials.post-card', ['post' => $post])
|
||||
@@ -15,6 +16,7 @@
|
||||
@endforelse
|
||||
|
||||
@include('partials.pagination', ['paginator' => $posts])
|
||||
@include('partials.theme-inject', ['point' => 'content_bottom'])
|
||||
</main>
|
||||
@include('partials.sidebar')
|
||||
</div>{{-- #page --}}
|
||||
|
||||
Reference in New Issue
Block a user