[Archived] Archived WIP of vielle.dev

Add margins

vielle.dev 7b465e8a c86a60c0

verified
+45 -8
-5
posts/full-test.md
··· 17 17 18 18 ## Paragraphs 19 19 20 - <!-- margins --> 21 - 22 20 here is a paragraph 23 21 24 22 and here is another ··· 58 56 59 57 ### Unordered 60 58 61 - <!-- indent --> 62 - 63 59 - an unordered list 64 60 - with nesting 65 61 - going back ··· 81 77 82 78 ## Image 83 79 84 - <!-- flags --> 85 80 86 81 ![An unimportiant image](./assets/minecraft.png) 87 82
+45 -3
src/pages/blog/[id].astro
··· 24 24 25 25 if (!post.filePath) throw new Error("Post does not have a filepath"); 26 26 return import(`../../content/posts/${parse(post.filePath).name}.mdx`).then( 27 - (x) => x.Content, 27 + (x) => x.Content 28 28 ); 29 29 })(); 30 30 --- ··· 51 51 const els = document.querySelectorAll("main[data-colour-scheme-nojs]"); 52 52 if (els.length !== 1) 53 53 throw new Error( 54 - "No `main[data-colour-scheme-nojs]`` found, or multiple found", 54 + "No `main[data-colour-scheme-nojs]`` found, or multiple found" 55 55 ); 56 56 const el = els[0]; 57 57 if (!(el instanceof HTMLElement)) throw new Error("Not HTML Element!"); ··· 142 142 } 143 143 } 144 144 145 - p { 145 + p, 146 + blockquote { 146 147 clear: both; 148 + margin-block: 2rem; 149 + } 150 + 151 + ul, 152 + ol { 153 + margin-inline-start: 4rem; 154 + & & { 155 + margin-inline-start: 2rem; 156 + } 157 + } 158 + 159 + h2, 160 + h3, 161 + h4 { 162 + margin-block-start: 2rem; 163 + margin-block-end: 2rem; 164 + 165 + & + & { 166 + margin-block-start: 0; 167 + } 168 + 169 + :has(+ &) { 170 + margin-block-end: 0; 171 + } 172 + } 173 + 174 + h2 { 175 + font-size: 3.6rem; 176 + } 177 + 178 + h3 { 179 + font-size: 2.8rem; 180 + } 181 + 182 + h4 { 183 + font-size: 2.4rem; 184 + } 185 + 186 + h5, 187 + h6 { 188 + color: red; /* i shouldnt use these except testing; so make em bad */ 147 189 } 148 190 149 191 img {