this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make blockquote() consistent with other custom syntax

+15 -16
+3 -10
rehype-custom-html.ts
··· 29 29 ) 30 30 child.children.shift(); 31 31 32 - if (!node.properties.class) 33 - node.properties.class = ["flag-" + flag[0].toLowerCase()]; 34 - else if (node.properties.class instanceof Array) 35 - node.properties.class.push("flag-" + flag[0].toLowerCase()); 36 - else if (typeof node.properties.class === "string") 37 - node.properties.class + "flag-" + flag[0].toLowerCase(); 38 - else 39 - throw new Error( 40 - `${node.position?.start.line}:${node.position?.start.column} [class] malformed!! (${node.properties.class})`, 41 - ); 32 + console.log(`data-bq-flag--${flag[0]}`, flag[0]); 33 + 34 + node.properties[`data-bq-flag--${flag[0].toLowerCase()}`] = true; 42 35 } 43 36 } 44 37 }
+12 -6
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!"); ··· 104 104 } 105 105 } 106 106 107 - blockquote.flag-note { 107 + blockquote[data-bq-flag--note] { 108 108 --accent: skyblue; 109 109 --icon: "📝"; 110 110 --name: "Note"; 111 111 } 112 112 113 - blockquote.flag-alert { 113 + blockquote[data-bq-flag--alert] { 114 114 --accent: orangered; 115 115 --icon: "🚨"; 116 116 --name: "Alert"; 117 + } 118 + 119 + blockquote[data-bq-flag--info] { 120 + --accent: rebeccapurple; 121 + --icon: "📚"; 122 + --name: "Info"; 117 123 } 118 124 119 125 /* get a checkbox */ ··· 227 233 228 234 & th, 229 235 & td { 230 - border: .1rem solid white; 231 - padding: .5rem; 236 + border: 0.1rem solid white; 237 + padding: 0.5rem; 232 238 } 233 239 234 240 & thead th {