This commit is contained in:
Niccolo Borgioli 2023-11-16 15:46:19 +01:00
parent 8999b02a2b
commit 099d563718
No known key found for this signature in database
GPG Key ID: D93C615F75EE4F0B
7 changed files with 18 additions and 42 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -1,8 +1,3 @@
import include from 'markdown-it-include'
import { importPlugin } from '@nicco.io/markdown-it-import'
const options = {
includeRe: /#include(.+)/,
bracesAreOptional: true,
}
export default ({ marp }) => marp.use(include, options)
export default ({ marp }) => marp.use(importPlugin)

View File

@ -21,17 +21,17 @@ palette in :root
/* Code blok */div#\:\$p>svg>foreignObject>section .hljs-comment{color:var(--muted)}div#\:\$p>svg>foreignObject>section .hljs-attr{color:var(--foam)}div#\:\$p>svg>foreignObject>section .hljs-punctuation{color:var(--subtle)}div#\:\$p>svg>foreignObject>section .hljs-string{color:var(--gold)}div#\:\$p>svg>foreignObject>section .hljs-title{color:var(--foam)}div#\:\$p>svg>foreignObject>section .hljs-keyword{color:var(--pine)}div#\:\$p>svg>foreignObject>section .hljs-variable{color:var(--text)}div#\:\$p>svg>foreignObject>section .hljs-literal{color:var(--rose)}div#\:\$p>svg>foreignObject>section .hljs-type{color:var(--love)}div#\:\$p>svg>foreignObject>section .hljs-number{color:var(--gold)}div#\:\$p>svg>foreignObject>section .hljs-built_in{color:var(--love)}div#\:\$p>svg>foreignObject>section .hljs-params{color:var(--iris)}div#\:\$p>svg>foreignObject>section .hljs-symbol{color:var(--foam)}div#\:\$p>svg>foreignObject>section .hljs-meta{color:var(--subtle)}
/* @theme 7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6 */div#\:\$p>svg>foreignObject>section{justify-content:start}div#\:\$p>svg>foreignObject>section :is(pre,marp-pre){max-height:calc(100vh);overflow:auto}div#\:\$p>svg>foreignObject>section[data-marpit-scope-qoZH4qhv]{justify-content:center}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]{columns:initial!important;display:block!important;padding:0!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:before,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:before{display:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]{all:initial;display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container][data-marpit-advanced-background-direction=vertical]{flex-direction:column}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split]>div[data-marpit-advanced-background-container]{width:var(--marpit-advanced-background-split,50%)}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split=right]>div[data-marpit-advanced-background-container]{margin-left:calc(100% - var(--marpit-advanced-background-split, 50%))}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure{all:initial;background-position:center;background-repeat:no-repeat;background-size:cover;flex:auto;margin:0}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure>figcaption{position:absolute;border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content],div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo]{background:transparent!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo],div#\:\$p>svg[data-marpit-svg]>foreignObject[data-marpit-advanced-background=pseudo]{pointer-events:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background-split]{width:100%;height:100%}</style></head><body><div class="bespoke-marp-osc"><button data-bespoke-marp-osc="prev" tabindex="-1" title="Previous slide">Previous slide</button><span data-bespoke-marp-osc="page"></span><button data-bespoke-marp-osc="next" tabindex="-1" title="Next slide">Next slide</button><button data-bespoke-marp-osc="fullscreen" tabindex="-1" title="Toggle fullscreen (f)">Toggle fullscreen</button><button data-bespoke-marp-osc="presenter" tabindex="-1" title="Open presenter view (p)">Open presenter view</button></div><div id=":$p"><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="1" data-marpit-scope-qoZH4qhv="" data-footer="Some footer" data-style="section { justify-content: start; }
/* @theme pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc */div#\:\$p>svg>foreignObject>section{justify-content:start}div#\:\$p>svg>foreignObject>section :is(pre,marp-pre){max-height:calc(100vh);overflow:auto}div#\:\$p>svg>foreignObject>section[data-marpit-scope-me6GUSAY]{justify-content:center}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]{columns:initial!important;display:block!important;padding:0!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:before,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:before{display:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]{all:initial;display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container][data-marpit-advanced-background-direction=vertical]{flex-direction:column}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split]>div[data-marpit-advanced-background-container]{width:var(--marpit-advanced-background-split,50%)}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split=right]>div[data-marpit-advanced-background-container]{margin-left:calc(100% - var(--marpit-advanced-background-split, 50%))}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure{all:initial;background-position:center;background-repeat:no-repeat;background-size:cover;flex:auto;margin:0}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure>figcaption{position:absolute;border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content],div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo]{background:transparent!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo],div#\:\$p>svg[data-marpit-svg]>foreignObject[data-marpit-advanced-background=pseudo]{pointer-events:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background-split]{width:100%;height:100%}</style></head><body><div class="bespoke-marp-osc"><button data-bespoke-marp-osc="prev" tabindex="-1" title="Previous slide">Previous slide</button><span data-bespoke-marp-osc="page"></span><button data-bespoke-marp-osc="next" tabindex="-1" title="Next slide">Next slide</button><button data-bespoke-marp-osc="fullscreen" tabindex="-1" title="Toggle fullscreen (f)">Toggle fullscreen</button><button data-bespoke-marp-osc="presenter" tabindex="-1" title="Open presenter view (p)">Open presenter view</button></div><div id=":$p"><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="1" data-marpit-scope-me6GUSAY="" data-footer="Some footer" data-style="section { justify-content: start; }
pre {
max-height: calc(100vh);
overflow: auto;
}
" data-theme="7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6" lang="en-US" style="--footer:Some footer;--style:section { justify-content: start; }
" data-theme="pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc" lang="en-US" style="--footer:Some footer;--style:section { justify-content: start; }
pre {
max-height: calc(100vh);
overflow: auto;
}
;--theme:7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6;">
;--theme:pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc;">
<h1 id="some-big-title">Some big title</h1>
<p>Some subtitle</p>
<footer>Some footer</footer>
@ -41,12 +41,12 @@ pre {
max-height: calc(100vh);
overflow: auto;
}
" data-theme="7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6" lang="en-US" data-marpit-pagination="2" style="--footer:Some footer;--paginate:true;--style:section { justify-content: start; }
" data-theme="pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc" lang="en-US" data-marpit-pagination="2" style="--footer:Some footer;--paginate:true;--style:section { justify-content: start; }
pre {
max-height: calc(100vh);
overflow: auto;
}
;--theme:7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6;" data-marpit-pagination-total="4">
;--theme:pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc;" data-marpit-pagination-total="4">
<h1 id="this-is-very-important">This is very important</h1>
<ul>
<li>one</li>
@ -60,22 +60,22 @@ pre {
max-height: calc(100vh);
overflow: auto;
}
" data-theme="7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6" lang="en-US" style="--style:section { justify-content: start; }
" data-theme="pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc" lang="en-US" style="--style:section { justify-content: start; }
pre {
max-height: calc(100vh);
overflow: auto;
}
;--theme:7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6;" data-marpit-advanced-background="background"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;./images/keynote.jpg&quot;);"></figure></div></section></foreignObject><foreignObject width="1280" height="720"><section id="3" data-style="section { justify-content: start; }
;--theme:pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc;" data-marpit-advanced-background="background"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;./images/keynote.jpg&quot;);"></figure></div></section></foreignObject><foreignObject width="1280" height="720"><section id="3" data-style="section { justify-content: start; }
pre {
max-height: calc(100vh);
overflow: auto;
}
" data-theme="7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6" lang="en-US" style="--style:section { justify-content: start; }
" data-theme="pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc" lang="en-US" style="--style:section { justify-content: start; }
pre {
max-height: calc(100vh);
overflow: auto;
}
;--theme:7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6;" data-marpit-advanced-background="content">
;--theme:pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc;" data-marpit-advanced-background="content">
<h2 id=""></h2>
</section>
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section data-style="section { justify-content: start; }
@ -83,17 +83,17 @@ pre {
max-height: calc(100vh);
overflow: auto;
}
" data-theme="7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6" lang="en-US" style="" data-marpit-advanced-background="pseudo"></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="4" data-footer="Some footer" data-paginate="true" data-style="section { justify-content: start; }
" data-theme="pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc" lang="en-US" style="" data-marpit-advanced-background="pseudo"></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="4" data-footer="Some footer" data-paginate="true" data-style="section { justify-content: start; }
pre {
max-height: calc(100vh);
overflow: auto;
}
" data-theme="7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6" lang="en-US" data-marpit-pagination="4" style="--footer:Some footer;--paginate:true;--style:section { justify-content: start; }
" data-theme="pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc" lang="en-US" data-marpit-pagination="4" style="--footer:Some footer;--paginate:true;--style:section { justify-content: start; }
pre {
max-height: calc(100vh);
overflow: auto;
}
;--theme:7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6;" data-marpit-pagination-total="4">
;--theme:pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc;" data-marpit-pagination-total="4">
<h1 id="some-code">Some code</h1>
<pre is="marp-pre" data-auto-scaling="downscale-only"><code class="language-ts"><span class="hljs-keyword">function</span> <span class="hljs-title function_">add</span>(<span class="hljs-params">a: <span class="hljs-built_in">number</span>, b: <span class="hljs-built_in">number</span></span>) {
<span class="hljs-keyword">return</span> a + b

View File

@ -1,16 +1,13 @@
{
"type": "module",
"scripts": {
"build": "bunx @marp-team/marp-cli@latest presi.md",
"build": "bunx @marp-team/marp-cli@latest presentation.md",
"dev": "conc bun:watch bun:serve",
"serve": "bunx serve@latest . -p 80",
"watch": "bun run build -w"
},
"devDependencies": {
"@tsconfig/strictest": "latest",
"bun-types": "latest",
"concurrently": "^8.2.2",
"markdown-it-include": "^2.0.0",
"typescript": "latest"
"@nicco.io/markdown-it-import": "latest",
"concurrently": "latest"
}
}

View File

@ -42,5 +42,5 @@ _footer: ''
# Some code
```ts
#include(./src/example.ts)
@import(./snippets/sum.ts)
```

View File

@ -1,16 +0,0 @@
{
"extends": ["@tsconfig/strictest"],
"compilerOptions": {
"lib": ["ESNext"],
"module": "esnext",
"target": "esnext",
"moduleResolution": "bundler",
"moduleDetection": "force",
"allowImportingTsExtensions": true,
"noEmit": true,
"composite": true,
"types": [
"bun-types" // add Bun global
]
}
}