chore: add rehypeUnwrapImg plugin for image processing optimization, update katex resource path

This commit is contained in:
radishzzz 2025-05-16 04:32:59 +01:00
parent 110fad06ab
commit 55923f9fcc
8 changed files with 93 additions and 74 deletions

View file

@ -24,13 +24,11 @@
}
/* Headings */
.heti :where(h1),
.heti :where(h2),
.heti :where(h3),
.heti :where(h4),
.heti :where(h5),
.heti :where(h6) {
--at-apply: 'mb-4 mt-6 font-semibold';
.heti :where(h1, h2, h3, h4, h5, h6) {
--at-apply: 'mb-4 font-semibold';
}
.heti :where(h1, h2, h3) {
--at-apply: 'text-balance leading-1.33em cjk:text-pretty cjk:tracking-0.05em';
}
.heti :where(h1) {
--at-apply: 'mt-9.6 text-7 text-primary';
@ -42,24 +40,15 @@
--at-apply: 'mt-6.5 text-5';
}
.heti :where(h4) {
--at-apply: 'text-4.5';
--at-apply: 'mt-6 text-4.5';
}
.heti :where(h5) {
--at-apply: 'text-4';
--at-apply: 'mt-6 text-4';
}
.heti :where(h6) {
--at-apply: 'font-normal';
--at-apply: 'mt-6 font-normal';
}
.heti :where(h1),
.heti :where(h2),
.heti :where(h3) {
--at-apply: 'text-balance leading-1.33em cjk:text-pretty cjk:tracking-0.05em';
}
.heti :where(h1 + h2),
.heti :where(h2 + h3),
.heti :where(h3 + h4),
.heti :where(h4 + h5),
.heti :where(h5 + h6) {
.heti :where(h1 + h2, h2 + h3, h3 + h4, h4 + h5, h5 + h6) {
--at-apply: 'mt-4';
}
@ -70,19 +59,22 @@
/* Links */
.heti :where(a:not(.gc-container)) {
--at-apply: 'break-all font-semibold tracking-0 underline underline-0.075em decoration-secondary/80 underline-offset-0.15em';
--at-apply: 'transition-colors hover:(c-primary decoration-primary/80) lg:underline-0.1em';
--at-apply: 'break-all font-semibold tracking-0 underline underline-0.075em decoration-secondary/80 underline-offset-0.1em';
--at-apply: 'transition-colors ease-out hover:(c-primary decoration-primary/80) lg:underline-0.1em';
}
/* Images */
.heti :where(img) {
--at-apply: 'mx-auto cursor-zoom-in';
--at-apply: 'mb-4 mx-auto cursor-zoom-in';
}
.heti :where(figure) {
--at-apply: 'mx-auto mb-4';
}
.heti figure img {
--at-apply: 'mb-0';
}
.heti :where(figcaption) {
--at-apply: 'mt-2 text-center text-sm text-secondary/80';
--at-apply: 'mt-3 text-center text-sm text-secondary/80';
}
/* Video */
@ -272,4 +264,4 @@ html.dark .heti :where(u) {
/* Quotes */
.heti :where(q:is(:lang(zh), :lang(ja), :lang(ko))) {
quotes: "「" "」" "『" "』";
}
}