kate522
8ad5ef9aff
fix(single): align article code blocks with the reference theme
...
The article body ran two highlighting pipelines at once: the runtime
EnlighterJS pass (same one the comment area uses) plus a bespoke
precode.js enhancer, and a hand-rolled .code-block skin. The two
disagreed, so rendered blocks carried a dark #282c34 card with 15px
padding, 14px text, a border and a second copy button stacked on top of
the EnlighterJS toolbar.
Drop the parallel path and let one pipeline own code blocks:
- delete precode.js, single-post/code-blocks.css and the unused
assets/js/enlighter copy that only precode.js referenced
- drop the now-dead has_code requirement (PHP scan + feature enqueue)
- render pre exactly as the reference does: bootstrap's pre box
(9.5px padding / 13px / radius 4) plus main.css's muted background,
with the EnlighterJS theme supplying the skin
Also scope the inline-code skin to :not(pre code) so it stops painting
the block background pink, and remap the toolbar copy glyph: \f0ea is
the clipboard in FA4 but "paste" in FA5; the clipboard is \f328.
Verified against the reference at 1440px both themes: pre 13px/18.57,
9.5px padding, radius 4, muted background; EnlighterJS block heights
151.31 / 60.38 match exactly.
2026-11-03 23:31:28 +08:00
..
2026-10-29 20:31:39 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 16:36:45 +08:00
2026-11-03 16:36:45 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-03 16:58:05 +08:00
2026-11-03 16:58:05 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-08-29 15:50:04 +08:00
2026-09-24 21:13:24 +08:00
2026-11-03 23:31:28 +08:00
2026-11-01 20:05:04 +08:00
2026-08-30 20:38:25 +08:00
2026-11-02 00:06:54 +08:00
2026-11-03 17:31:42 +08:00
2026-11-01 20:05:04 +08:00
2026-10-29 19:16:03 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-10-30 21:57:46 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-10-29 22:21:01 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-10-31 14:18:01 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 14:06:52 +08:00
2026-11-02 00:06:54 +08:00
2026-10-31 14:03:57 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 23:31:28 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 19:50:24 +08:00
2026-11-02 19:50:24 +08:00
2026-11-02 00:06:54 +08:00
2026-09-04 22:53:33 +08:00
2026-10-29 19:16:03 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 16:09:46 +08:00
2026-11-03 15:56:52 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 16:48:38 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 14:06:52 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 15:56:52 +08:00