Skip to content

Instantly share code, notes, and snippets.

@jrson83
jrson83 / index.html
Created September 28, 2022 11:43 — forked from Akifcan/index.html
carousel
<style>
.slider {
border-radius: 0.5rem;
margin: 1rem;
min-height: 15rem;
background: linear-gradient(
to right,
#314755,
#26a0da
); /* Default Background */
@jrson83
jrson83 / lume_code.js
Last active September 8, 2022 14:39
markdown-it lume-code plugin
export default class LumeCode extends HTMLElement {
connectedCallback() {
document.querySelectorAll('[role="tab"]')?.forEach((tab) => {
tab.addEventListener("click", this.handleTabChange);
});
}
handleTabChange(e) {
const target = e.target;
const parent = target.parentNode;
@jrson83
jrson83 / custom_markup.js
Created September 7, 2022 02:26 — forked from offbynull/custom_markup.js
Custom markup in markdown-it
var MarkdownIt = require("markdown-it");
var md = new MarkdownIt('commonmark');
// Add custom INLINE rule that pulls in anything wrapped in a ::: <TEXT> ::: and wrap in a span tag
function custom_inline(state, silent) {
let pos = state.pos;