fix: restyle pager chips and restore theme ad slots
Build and Deploy / verify (push) Successful in 37s
Build and Deploy / deploy (push) Successful in 38s

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:
gouki
2026-09-18 21:48:24 +00:00
co-authored by Cursor
parent ae47447062
commit 36c4ffc5b4
41 changed files with 936 additions and 81 deletions
+8 -1
View File
@@ -61,11 +61,18 @@ See `README.md` and `docs/` for install, import, plugins, and themes.
## Pagination and imported HTML
- Public pagers use `onEachSide(1)` plus “第 x / y 页”, and the main column is CSS grid `minmax(0, 1fr)` so page chips stay in the content column.
- Public pagers use `onEachSide(1)` plus a compact `6 / 316` chip (old SaBlog `.p_bar` look), and the main column is CSS grid `minmax(0, 1fr)` so page chips stay in the content column.
- `SablogHtmlNormalizer` strips leftover `&nbsp;`, turns SyntaxHighlighter `codeText` / `dp-*` lists into `<pre><code>`, and wraps stacked docker/shell `<div>` lines.
- Render path always normalizes, so already-imported posts look right without rewriting the database. Persist with `php artisan sablog:fix-content --all`.
- Code blocks wrap / scroll inside the column instead of stretching the page.
## Theme ads / inject
- All list and post views include `content_top` / `content_bottom` (and post body) stacks. Saving **主题注入** flushes page cache.
- Theme variables (old stylevars) render automatically: `ad_header` → header, leftover HTML vars such as `huangjinlian` → footer.
- `sablog:import` now copies the old `stylevars` table into `theme_vars_{theme}`.
- Do not add a third half-finished skin. Tighten `sablog` to match the old site; a new theme is a later, complete job.
## Media library (xpier)
- Package: `xpier/filament-media-library` (admin Media Library + MediaPicker).