Merge branch 'dev' into feat/image-position

This commit is contained in:
Nuno C.
2025-10-14 10:14:18 +01:00
committed by GitHub
80 changed files with 1363 additions and 1145 deletions

View File

@@ -1,4 +1,4 @@
/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */
/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */
/*! Blowfish | MIT License | https://github.com/nunocoracao/blowfish */
@layer properties;
#zen-mode-button {
@@ -245,6 +245,7 @@ body.zen-mode-enable {
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
"Courier New", monospace;
--spacing: 0.25rem;
--container-2xs: 18rem;
--container-xs: 20rem;
--container-xl: 36rem;
--container-3xl: 48rem;
@@ -656,6 +657,9 @@ body.zen-mode-enable {
.me-4 {
margin-inline-end: calc(var(--spacing) * 4);
}
.me-6 {
margin-inline-end: calc(var(--spacing) * 6);
}
.prose {
color: var(--tw-prose-body);
max-width: 65ch;
@@ -747,7 +751,7 @@ body.zen-mode-enable {
}
:where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
border-color: var(--tw-prose-hr);
border-top-width: 1;
border-top-width: 1px;
margin-top: 3em;
margin-bottom: 3em;
}
@@ -832,7 +836,7 @@ body.zen-mode-enable {
font-weight: 600;
font-family: inherit;
color: var(--tw-prose-kbd);
box-shadow: 0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);
box-shadow: 0 0 0 1px var(--tw-prose-kbd-shadows), 0 3px 0 var(--tw-prose-kbd-shadows);
font-size: 0.9rem;
border-radius: 0.25rem;
padding-top: 0.1875em;
@@ -978,7 +982,7 @@ body.zen-mode-enable {
--tw-prose-quote-borders: rgba(var(--color-primary-200), 1);
--tw-prose-captions: rgba(var(--color-neutral-500), 1);
--tw-prose-kbd: oklch(21% 0.034 264.665);
--tw-prose-kbd-shadows: NaN NaN NaN;
--tw-prose-kbd-shadows: color-mix(in oklab, oklch(21% 0.034 264.665) 10%, transparent);
--tw-prose-code: rgba(var(--color-secondary-700), 1);
--tw-prose-pre-code: rgba(var(--color-neutral-700), 1);
--tw-prose-pre-bg: rgba(var(--color-neutral-50), 1);
@@ -996,7 +1000,7 @@ body.zen-mode-enable {
--tw-prose-invert-quote-borders: rgba(var(--color-primary-900), 1);
--tw-prose-invert-captions: rgba(var(--color-neutral-400), 1);
--tw-prose-invert-kbd: #fff;
--tw-prose-invert-kbd-shadows: 255 255 255;
--tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);
--tw-prose-invert-code: rgba(var(--color-secondary-400), 1);
--tw-prose-invert-pre-code: rgba(var(--color-neutral-200), 1);
--tw-prose-invert-pre-bg: rgba(var(--color-neutral-700), 1);
@@ -1147,9 +1151,6 @@ body.zen-mode-enable {
.mt-20 {
margin-top: calc(var(--spacing) * 20);
}
.mt-\[0\.1rem\] {
margin-top: 0.1rem;
}
.mt-\[0\.5rem\] {
margin-top: 0.5rem;
}
@@ -1171,9 +1172,6 @@ body.zen-mode-enable {
.mr-5 {
margin-right: calc(var(--spacing) * 5);
}
.mr-auto {
margin-right: auto;
}
.\!mb-0 {
margin-bottom: calc(var(--spacing) * 0) !important;
}
@@ -1222,12 +1220,6 @@ body.zen-mode-enable {
.ml-2 {
margin-left: calc(var(--spacing) * 2);
}
.ml-3 {
margin-left: calc(var(--spacing) * 3);
}
.ml-auto {
margin-left: auto;
}
.box-border {
box-sizing: border-box;
}
@@ -1455,9 +1447,6 @@ body.zen-mode-enable {
.max-w-\[5rem\] {
max-width: 5rem;
}
.max-w-\[64rem\] {
max-width: 64rem;
}
.max-w-\[200px\] {
max-width: 200px;
}
@@ -1983,9 +1972,6 @@ body.zen-mode-enable {
.p-1\.5 {
padding: calc(var(--spacing) * 1.5);
}
.p-2\.5 {
padding: calc(var(--spacing) * 2.5);
}
.p-4 {
padding: calc(var(--spacing) * 4);
}
@@ -2091,18 +2077,12 @@ body.zen-mode-enable {
.pt-\[5px\] {
padding-top: 5px;
}
.pr-0 {
padding-right: calc(var(--spacing) * 0);
.pr-2 {
padding-right: calc(var(--spacing) * 2);
}
.pr-8 {
padding-right: calc(var(--spacing) * 8);
}
.pr-\[24px\] {
padding-right: 24px;
}
.pb-0 {
padding-bottom: calc(var(--spacing) * 0);
}
.pb-2 {
padding-bottom: calc(var(--spacing) * 2);
}
@@ -2124,12 +2104,6 @@ body.zen-mode-enable {
.pl-0 {
padding-left: calc(var(--spacing) * 0);
}
.pl-4 {
padding-left: calc(var(--spacing) * 4);
}
.pl-\[24px\] {
padding-left: 24px;
}
.text-center {
text-align: center;
}
@@ -2533,27 +2507,6 @@ body.zen-mode-enable {
}
}
}
.group-hover\:text-primary-600 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
color: rgba(var(--color-primary-600), 1);
}
}
}
.group-hover\:underline {
&:is(:where(.group):hover *) {
@media (hover: hover) {
text-decoration-line: underline;
}
}
}
.group-hover\:decoration-primary-500 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
text-decoration-color: rgba(var(--color-primary-500), 1);
}
}
}
.group-hover\:opacity-100 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
@@ -3049,6 +3002,11 @@ body.zen-mode-enable {
padding-inline: calc(var(--spacing) * 24);
}
}
.md\:pr-4 {
@media (width >= 853px) {
padding-right: calc(var(--spacing) * 4);
}
}
.lg\:absolute {
@media (width >= 1024px) {
position: absolute;
@@ -3139,6 +3097,11 @@ body.zen-mode-enable {
width: auto;
}
}
.lg\:max-w-2xs {
@media (width >= 1024px) {
max-width: var(--container-2xs);
}
}
.lg\:max-w-7xl {
@media (width >= 1024px) {
max-width: var(--container-7xl);
@@ -3224,11 +3187,6 @@ body.zen-mode-enable {
grid-template-columns: repeat(5, minmax(0, 1fr));
}
}
.ltr\:mr-4 {
&:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *) {
margin-right: calc(var(--spacing) * 4);
}
}
.ltr\:-ml-12 {
&:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *) {
margin-left: calc(var(--spacing) * -12);
@@ -3244,21 +3202,11 @@ body.zen-mode-enable {
display: none;
}
}
.ltr\:inline {
&:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *) {
display: inline;
}
}
.rtl\:-mr-\[79px\] {
&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
margin-right: calc(79px * -1);
}
}
.rtl\:ml-4 {
&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
margin-left: calc(var(--spacing) * 4);
}
}
.rtl\:block {
&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
display: block;
@@ -3269,9 +3217,9 @@ body.zen-mode-enable {
display: none;
}
}
.rtl\:inline {
.rtl\:rotate-180 {
&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
display: inline;
rotate: 180deg;
}
}
.dark\:flex {
@@ -3517,15 +3465,6 @@ body.zen-mode-enable {
}
}
}
.dark\:group-hover\:text-primary-400 {
&:is(.dark *) {
&:is(:where(.group):hover *) {
@media (hover: hover) {
color: rgba(var(--color-primary-400), 1);
}
}
}
}
.dark\:hover\:\!bg-primary-700 {
&:is(.dark *) {
&:hover {
@@ -3657,11 +3596,6 @@ button, [role="button"] {
.prose div.min-w-0.max-w-prose > *:first-child {
margin-top: calc(var(--spacing) * 3);
}
#TableOfContents {
@media (width >= 1024px) {
max-width: 25vw;
}
}
#TOCView {
max-height: calc(100vh - 150px);
min-height: 0;
@@ -3746,8 +3680,8 @@ button, [role="button"] {
overflow: auto hidden;
}
.katex-display {
padding-right: 2px;
width: calc(100% - 2px);
padding: 1em;
width: calc(100% - 1em);
}
table {
display: block;
@@ -3773,6 +3707,7 @@ pre {
object-fit: cover;
}
.single_hero_background {
width: calc(100% + 1px);
z-index: -10;
}
.hero_gradient {

View File

@@ -66,10 +66,6 @@ button,
}
/* Table of Contents */
#TableOfContents {
@apply lg:max-w-[25vw];
}
#TOCView {
max-height: calc(100vh - 150px);
min-height: 0;
@@ -130,8 +126,8 @@ button,
/* Fix katex overflow https://github.com/nunocoracao/blowfish/issues/2138 */
.katex-display {
padding-right: 2px;
width: calc(100% - 2px);
padding: 1em;
width: calc(100% - 1em);
}
/* Fix long tables breaking out of article on mobile */
@@ -169,6 +165,7 @@ pre {
}
.single_hero_background {
width: calc(100% + 1px); /* patch for very small gap at right edge on mobile devices */
z-index: -10;
}

View File

@@ -22,6 +22,34 @@ if (document.documentElement.getAttribute("data-auto-appearance") === "true") {
});
}
// Mermaid dark mode support
var updateMermaidTheme = () => {
if (typeof mermaid !== 'undefined') {
const isDark = document.documentElement.classList.contains("dark");
const mermaids = document.querySelectorAll('pre.mermaid');
mermaids.forEach(e => {
if (e.getAttribute('data-processed')) {
// Already rendered, clean the processed attributes
e.removeAttribute('data-processed');
// Replace the rendered HTML with the stored text
e.innerHTML = e.getAttribute('data-graph');
} else {
// First time, store the text
e.setAttribute('data-graph', e.textContent);
}
});
if (isDark) {
initMermaidDark();
mermaid.run();
} else {
initMermaidLight();
mermaid.run();
}
}
}
window.addEventListener("DOMContentLoaded", (event) => {
const switcher = document.getElementById("appearance-switcher");
const switcherMobile = document.getElementById("appearance-switcher-mobile");
@@ -29,6 +57,9 @@ window.addEventListener("DOMContentLoaded", (event) => {
updateMeta();
this.updateLogo?.(getTargetAppearance());
// Initialize mermaid theme on page load
updateMermaidTheme();
if (switcher) {
switcher.addEventListener("click", () => {
document.documentElement.classList.toggle("dark");
@@ -38,6 +69,7 @@ window.addEventListener("DOMContentLoaded", (event) => {
targetAppearance
);
updateMeta();
updateMermaidTheme();
this.updateLogo?.(targetAppearance);
});
switcher.addEventListener("contextmenu", (event) => {
@@ -54,6 +86,7 @@ window.addEventListener("DOMContentLoaded", (event) => {
targetAppearance
);
updateMeta();
updateMermaidTheme();
this.updateLogo?.(targetAppearance);
});
switcherMobile.addEventListener("contextmenu", (event) => {

View File

@@ -2,30 +2,32 @@ function css(name) {
return "rgb(" + getComputedStyle(document.documentElement).getPropertyValue(name) + ")";
}
document.addEventListener("DOMContentLoaded", () => {
const mermaidDivs = document.querySelectorAll("div.mermaid");
function initMermaidLight() {
mermaid.initialize({
theme: "base",
themeVariables: {
background: css("--color-neutral"),
primaryColor: css("--color-primary-200"),
secondaryColor: css("--color-secondary-200"),
tertiaryColor: css("--color-neutral-100"),
primaryBorderColor: css("--color-primary-400"),
secondaryBorderColor: css("--color-secondary-400"),
tertiaryBorderColor: css("--color-neutral-400"),
lineColor: css("--color-neutral-600"),
fontFamily:
"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif",
fontSize: "16px",
},
});
}
for (const div of mermaidDivs) {
const preElement = div.querySelector("pre");
if (preElement) {
div.textContent = preElement.textContent;
}
}
});
mermaid.initialize({
theme: "base",
themeVariables: {
background: css("--color-neutral"),
primaryColor: css("--color-primary-200"),
secondaryColor: css("--color-secondary-200"),
tertiaryColor: css("--color-neutral-100"),
primaryBorderColor: css("--color-primary-400"),
secondaryBorderColor: css("--color-secondary-400"),
tertiaryBorderColor: css("--color-neutral-400"),
lineColor: css("--color-neutral-600"),
fontFamily:
"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif",
fontSize: "16px",
},
});
function initMermaidDark() {
mermaid.initialize({
theme: "dark",
themeVariables: {
fontFamily:
"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif",
fontSize: "16px",
},
});
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long