diff --git a/src/css/default.css b/src/css/default.css
index 76ab86a..b809c65 100644
--- a/src/css/default.css
+++ b/src/css/default.css
@@ -1,5 +1,6 @@
@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap");
+@import url("https://fonts.cdnfonts.com/css/latin-modern-math");
@tailwind base;
@tailwind components;
@@ -44,7 +45,10 @@
div.sourceCode {
@apply p-4 rounded-lg;
}
- .math.display {
- @apply overflow-x-auto;
+ math {
+ @apply font-math;
+ }
+ math[display="block"] {
+ @apply overflow-x-auto my-1 text-xl;
}
}
diff --git a/src/js/main.js b/src/js/main.js
index 9201722..fd45b9c 100644
--- a/src/js/main.js
+++ b/src/js/main.js
@@ -2,19 +2,19 @@ import "../css/default.css"
// @ts-check
-document.addEventListener("DOMContentLoaded", () => {
- var mathElements = document.querySelectorAll(".math.inline, .math.display")
- mathElements.forEach(function (element) {
- var tex = element.textContent
- var displayMode = element.classList.contains("display")
- var renderedMath = katex.renderToString(tex, {
- displayMode: displayMode,
- throwOnError: false,
- })
- element.innerHTML = renderedMath
- })
-})
-
+// document.addEventListener("DOMContentLoaded", () => {
+// var mathElements = document.querySelectorAll(".math.inline, .math.display")
+// mathElements.forEach(function (element) {
+// var tex = element.textContent
+// var displayMode = element.classList.contains("display")
+// var renderedMath = katex.renderToString(tex, {
+// displayMode: displayMode,
+// throwOnError: false,
+// })
+// element.innerHTML = renderedMath
+// })
+// })
+//
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches
const themeSystem = () => {
if (prefersDark) {
diff --git a/src/out/bundle.css b/src/out/bundle.css
index 850d3fc..fff6bdf 100644
--- a/src/out/bundle.css
+++ b/src/out/bundle.css
@@ -1 +1 @@
-@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap");/* ! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com */*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}::before,::after{--tw-content:''}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type='button']),input:where([type='reset']),input:where([type='submit']){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type='search']{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder, textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role="button"]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}body{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity));font-family:Merriweather,serif;--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity))}body:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x:;--tw-pan-y:;--tw-pinch-zoom:;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position:;--tw-gradient-via-position:;--tw-gradient-to-position:;--tw-ordinal:;--tw-slashed-zero:;--tw-numeric-figure:;--tw-numeric-spacing:;--tw-numeric-fraction:;--tw-ring-inset:;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur:;--tw-brightness:;--tw-contrast:;--tw-grayscale:;--tw-hue-rotate:;--tw-invert:;--tw-saturate:;--tw-sepia:;--tw-drop-shadow:;--tw-backdrop-blur:;--tw-backdrop-brightness:;--tw-backdrop-contrast:;--tw-backdrop-grayscale:;--tw-backdrop-hue-rotate:;--tw-backdrop-invert:;--tw-backdrop-opacity:;--tw-backdrop-saturate:;--tw-backdrop-sepia:;--tw-contain-size:;--tw-contain-layout:;--tw-contain-paint:;--tw-contain-style:}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x:;--tw-pan-y:;--tw-pinch-zoom:;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position:;--tw-gradient-via-position:;--tw-gradient-to-position:;--tw-ordinal:;--tw-slashed-zero:;--tw-numeric-figure:;--tw-numeric-spacing:;--tw-numeric-fraction:;--tw-ring-inset:;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur:;--tw-brightness:;--tw-contrast:;--tw-grayscale:;--tw-hue-rotate:;--tw-invert:;--tw-saturate:;--tw-sepia:;--tw-drop-shadow:;--tw-backdrop-blur:;--tw-backdrop-brightness:;--tw-backdrop-contrast:;--tw-backdrop-grayscale:;--tw-backdrop-hue-rotate:;--tw-backdrop-invert:;--tw-backdrop-opacity:;--tw-backdrop-saturate:;--tw-backdrop-sepia:;--tw-contain-size:;--tw-contain-layout:;--tw-contain-paint:;--tw-contain-style:}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:0.5rem;margin-bottom:0.5rem}.mb-14{margin-bottom:3.5rem}.mb-3{margin-bottom:0.75rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:0.5rem}.mt-1{margin-top:0.25rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:0.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.inline{display:inline}.h-0{height:0px}.h-0\.5{height:0.125rem}.h-1{height:0.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.max-w-3xl{max-width:48rem}.max-w-\[200px\]{max-width:200px}.max-w-sm{max-width:24rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.rounded-lg{border-radius:0.5rem}.rounded-md{border-radius:0.375rem}.rounded-sm{border-radius:0.125rem}.rounded-xl{border-radius:0.75rem}.border-0{border-width:0px}.bg-accent-light{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity))}.bg-muted-light{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity))}.p-1{padding:0.25rem}.p-2{padding:0.5rem}.px-1{padding-left:0.25rem;padding-right:0.25rem}.px-2{padding-left:0.5rem;padding-right:0.5rem}.px-4{padding-left:1rem;padding-right:1rem}.pb-12{padding-bottom:3rem}.font-serif{font-family:Merriweather,serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.font-medium{font-weight:500}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.duration-\[2s\]{transition-duration:2s}.external-link{position:relative;border-radius:0.125rem;padding-right:0.75rem;--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:300ms}.external-link:hover{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity))}.external-link:where(.dark,.dark *){--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity))}.external-link:hover:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity))}.external-link::after{position:absolute;top:0.25rem;right:0.5rem;height:0.5rem;width:0.5rem;--tw-translate-x:50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity))}.external-link:where(.dark,.dark *)::after{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity))}.external-link::after{content:""}.post{h1{font-size:1.5rem;line-height:2rem}h1{font-weight:700}h2,h3,h4,h5,h6{margin-top:1rem}h2,h3,h4,h5,h6{font-size:1.25rem;line-height:1.75rem}h2,h3,h4,h5,h6{font-weight:700}p{margin-top:0.5rem;margin-bottom:0.5rem}p{line-height:2}img{margin-left:auto;margin-right:auto}img{margin-top:1rem;margin-bottom:1rem}img{border-radius:0.5rem}div.sourceCode{border-radius:0.5rem}div.sourceCode{padding:1rem}}.hover\:bg-secondary-light:hover{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.group:hover .group-hover\:max-w-\[250px\]{max-width:250px}.group:hover .group-hover\:bg-secondary-light{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.group:hover .group-hover\:text-muted-light{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity))}@media (min-width:640px){.sm\:mr-2{margin-right:0.5rem}}@media (min-width:768px){.md\:mt-24{margin-top:6rem}.md\:space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.md\:text-5xl{font-size:3rem;line-height:1}}.dark\:bg-accent-dark:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.dark\:bg-muted-dark:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.dark\:hover\:bg-secondary-dark:hover:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity))}.dark\:hover\:text-muted-dark:hover:where(.dark,.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.group:hover .dark\:group-hover\:bg-secondary-dark:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity))}.group:hover .dark\:group-hover\:text-muted-dark:where(.dark,.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}
+@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap");@import url("https://fonts.cdnfonts.com/css/latin-modern-math");/* ! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com */*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}::before,::after{--tw-content:''}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type='button']),input:where([type='reset']),input:where([type='submit']){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type='search']{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder, textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role="button"]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}body{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity));font-family:Merriweather,serif;--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity))}body:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x:;--tw-pan-y:;--tw-pinch-zoom:;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position:;--tw-gradient-via-position:;--tw-gradient-to-position:;--tw-ordinal:;--tw-slashed-zero:;--tw-numeric-figure:;--tw-numeric-spacing:;--tw-numeric-fraction:;--tw-ring-inset:;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur:;--tw-brightness:;--tw-contrast:;--tw-grayscale:;--tw-hue-rotate:;--tw-invert:;--tw-saturate:;--tw-sepia:;--tw-drop-shadow:;--tw-backdrop-blur:;--tw-backdrop-brightness:;--tw-backdrop-contrast:;--tw-backdrop-grayscale:;--tw-backdrop-hue-rotate:;--tw-backdrop-invert:;--tw-backdrop-opacity:;--tw-backdrop-saturate:;--tw-backdrop-sepia:;--tw-contain-size:;--tw-contain-layout:;--tw-contain-paint:;--tw-contain-style:}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x:;--tw-pan-y:;--tw-pinch-zoom:;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position:;--tw-gradient-via-position:;--tw-gradient-to-position:;--tw-ordinal:;--tw-slashed-zero:;--tw-numeric-figure:;--tw-numeric-spacing:;--tw-numeric-fraction:;--tw-ring-inset:;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur:;--tw-brightness:;--tw-contrast:;--tw-grayscale:;--tw-hue-rotate:;--tw-invert:;--tw-saturate:;--tw-sepia:;--tw-drop-shadow:;--tw-backdrop-blur:;--tw-backdrop-brightness:;--tw-backdrop-contrast:;--tw-backdrop-grayscale:;--tw-backdrop-hue-rotate:;--tw-backdrop-invert:;--tw-backdrop-opacity:;--tw-backdrop-saturate:;--tw-backdrop-sepia:;--tw-contain-size:;--tw-contain-layout:;--tw-contain-paint:;--tw-contain-style:}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:0.5rem;margin-bottom:0.5rem}.mb-14{margin-bottom:3.5rem}.mb-3{margin-bottom:0.75rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:0.5rem}.mt-1{margin-top:0.25rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:0.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.inline{display:inline}.h-0{height:0px}.h-0\.5{height:0.125rem}.h-1{height:0.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.max-w-3xl{max-width:48rem}.max-w-\[200px\]{max-width:200px}.max-w-sm{max-width:24rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.rounded-lg{border-radius:0.5rem}.rounded-md{border-radius:0.375rem}.rounded-sm{border-radius:0.125rem}.rounded-xl{border-radius:0.75rem}.border-0{border-width:0px}.bg-accent-light{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity))}.bg-muted-light{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity))}.p-1{padding:0.25rem}.p-2{padding:0.5rem}.px-1{padding-left:0.25rem;padding-right:0.25rem}.px-2{padding-left:0.5rem;padding-right:0.5rem}.px-4{padding-left:1rem;padding-right:1rem}.pb-12{padding-bottom:3rem}.font-serif{font-family:Merriweather,serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.font-medium{font-weight:500}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.duration-\[2s\]{transition-duration:2s}.external-link{position:relative;border-radius:0.125rem;padding-right:0.75rem;--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:300ms}.external-link:hover{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity))}.external-link:where(.dark,.dark *){--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity))}.external-link:hover:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity))}.external-link::after{position:absolute;top:0.25rem;right:0.5rem;height:0.5rem;width:0.5rem;--tw-translate-x:50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity))}.external-link:where(.dark,.dark *)::after{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity))}.external-link::after{content:""}.post{h1{font-size:1.5rem;line-height:2rem}h1{font-weight:700}h2,h3,h4,h5,h6{margin-top:1rem}h2,h3,h4,h5,h6{font-size:1.25rem;line-height:1.75rem}h2,h3,h4,h5,h6{font-weight:700}p{margin-top:0.5rem;margin-bottom:0.5rem}p{line-height:2}img{margin-left:auto;margin-right:auto}img{margin-top:1rem;margin-bottom:1rem}img{border-radius:0.5rem}div.sourceCode{border-radius:0.5rem}div.sourceCode{padding:1rem}math{font-family:Latin Modern Math,serif}math[display="block"]{margin-top:0.25rem;margin-bottom:0.25rem}math[display="block"]{overflow-x:auto}math[display="block"]{font-size:1.25rem;line-height:1.75rem}}.hover\:bg-secondary-light:hover{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.group:hover .group-hover\:max-w-\[250px\]{max-width:250px}.group:hover .group-hover\:bg-secondary-light{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.group:hover .group-hover\:text-muted-light{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity))}@media (min-width:640px){.sm\:mr-2{margin-right:0.5rem}}@media (min-width:768px){.md\:mt-24{margin-top:6rem}.md\:space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.md\:text-5xl{font-size:3rem;line-height:1}}.dark\:bg-accent-dark:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.dark\:bg-muted-dark:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.dark\:hover\:bg-secondary-dark:hover:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity))}.dark\:hover\:text-muted-dark:hover:where(.dark,.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.group:hover .dark\:group-hover\:bg-secondary-dark:where(.dark,.dark *){--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity))}.group:hover .dark\:group-hover\:text-muted-dark:where(.dark,.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}
diff --git a/src/out/bundle.js b/src/out/bundle.js
index d4ed814..1aeeb16 100644
--- a/src/out/bundle.js
+++ b/src/out/bundle.js
@@ -1 +1 @@
-document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".math.inline, .math.display").forEach((function(e){var t=e.textContent,a=e.classList.contains("display"),n=katex.renderToString(t,{displayMode:a,throwOnError:!1});e.innerHTML=n}))}));const e=window.matchMedia("(prefers-color-scheme: dark)").matches,t=()=>{document.documentElement.classList.remove("dark")},a=()=>{document.documentElement.classList.add("dark")};let n="dark"===localStorage.getItem("theme")?2:"light"===localStorage.getItem("theme")?1:0;const m=document.getElementById("theme-toggle");m.addEventListener("click",(()=>{switch(n=(n+1)%3,n){case 0:localStorage.removeItem("theme"),e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),m.innerText="theme: system";break;case 1:e?(localStorage.setItem("theme","light"),t(),m.innerText="theme: light"):(localStorage.setItem("theme","dark"),a(),m.innerText="theme: dark");break;case 2:e?(localStorage.setItem("theme","dark"),a(),m.innerText="theme: dark"):(localStorage.setItem("theme","light"),t(),m.innerText="theme: light")}}));
+const e=window.matchMedia("(prefers-color-scheme: dark)").matches,t=()=>{document.documentElement.classList.remove("dark")},m=()=>{document.documentElement.classList.add("dark")};let a="dark"===localStorage.getItem("theme")?2:"light"===localStorage.getItem("theme")?1:0;const c=document.getElementById("theme-toggle");c.addEventListener("click",(()=>{switch(a=(a+1)%3,a){case 0:localStorage.removeItem("theme"),e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),c.innerText="theme: system";break;case 1:e?(localStorage.setItem("theme","light"),t(),c.innerText="theme: light"):(localStorage.setItem("theme","dark"),m(),c.innerText="theme: dark");break;case 2:e?(localStorage.setItem("theme","dark"),m(),c.innerText="theme: dark"):(localStorage.setItem("theme","light"),t(),c.innerText="theme: light")}}));
diff --git a/src/posts/2020-09-21-hello-world.md b/src/posts/2020-09-21-hello-world.md
deleted file mode 100644
index 3f34bcf..0000000
--- a/src/posts/2020-09-21-hello-world.md
+++ /dev/null
@@ -1,26 +0,0 @@
----
-author: "Youwen Wu"
-authorTwitter: "@youwen"
-desc: "I announce myself to the world"
-image: "./images/waiheke-stony-batter.jpg"
-keywords: "hello, announcement"
-lang: "en"
-title: "Hello, world!"
-updated: "2020-09-22T12:00:00Z"
----
-
-Hello, world! I am here!
-
-
-
-Haskell, for example:
-
-```haskell
-toSlug :: T.Text -> T.Text
-toSlug =
- T.intercalate (T.singleton '-') . T.words . T.toLower . clean
-```
diff --git a/src/posts/2020-09-22-ni-hao.md b/src/posts/2024-05-25-haskell-blog.md
similarity index 57%
rename from src/posts/2020-09-22-ni-hao.md
rename to src/posts/2024-05-25-haskell-blog.md
index bb7c3d0..3fe746a 100644
--- a/src/posts/2020-09-22-ni-hao.md
+++ b/src/posts/2024-05-25-haskell-blog.md
@@ -1,15 +1,16 @@
---
author: "Youwen Wu"
authorTwitter: "@youwen"
-desc: "The first post"
+desc: "a purely functional...blog?"
image: "./images/waiheke-stony-batter.jpg"
-keywords: "hola, anuncio"
-lang: "cn"
-title: "Ni Hao"
-updated: "2020-09-23T12:00:00Z"
+keywords: "haskell, blog, functional programming"
+lang: "en"
+title: "Why I made my blog in haskell"
+updated: "2024-05-25T12:00:00Z"
---
-Welcome!
+Welcome! This is the first post on _gradient ascent_ and also one that tests all
+of the features.
-Haskell is a great language. It is a pure functional programming language with
-strong static typing. It is also a lazy language, which means that it does not
-evaluate expressions until it is absolutely necessary. This can lead to some
-interesting performance characteristics.
-
```haskell
toSlug :: T.Text -> T.Text
toSlug =
diff --git a/ssg/src/Main.hs b/ssg/src/Main.hs
index 35db5ec..810fe0b 100644
--- a/ssg/src/Main.hs
+++ b/ssg/src/Main.hs
@@ -21,7 +21,6 @@ import Text.Pandoc.Highlighting (Style, breezeDark, styleToCss)
import Text.Pandoc.Options (
HTMLMathMethod (..),
WriterOptions (..),
- defaultKaTeXURL,
)
--------------------------------------------------------------------------------
@@ -223,7 +222,7 @@ pandocWriterOpts =
defaultHakyllWriterOptions
{ writerExtensions = pandocExtensionsCustom
, writerHighlightStyle = Just pandocHighlightStyle
- , writerHTMLMathMethod = KaTeX defaultKaTeXURL
+ , writerHTMLMathMethod = MathML
}
pandocHighlightStyle :: Style
diff --git a/tailwind.config.js b/tailwind.config.js
index 8479d32..a358dc9 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -7,6 +7,7 @@ module.exports = {
fontFamily: {
sans: ["Inter", "sans-serif"],
serif: ["Merriweather", "serif"],
+ math: ["Latin Modern Math", "serif"],
},
colors: {
primary: {
@@ -33,4 +34,4 @@ module.exports = {
},
},
plugins: [require("@tailwindcss/typography")],
-};
+}