trying something
This commit is contained in:
@ -63,9 +63,9 @@ export const documentation_factory = (application: Editor) => {
|
|||||||
return `
|
return `
|
||||||
<details ${open ? "open" : ""}>
|
<details ${open ? "open" : ""}>
|
||||||
<summary >${description}
|
<summary >${description}
|
||||||
<button class="inline-block pl-2" onclick="app.api._playDocExample(app.api.codeExamples['${codeId}'])">▶</button>
|
<button class="py-1 align-top text-base rounded-lg pl-2 pr-2 hover:bg-green-700 bg-green-600 inline-block" onclick="app.api._playDocExample(app.api.codeExamples['${codeId}'])">▶️ Play</button>
|
||||||
<button class="inline-block pl-2" onclick="stop()">❚❚</button>
|
<button class="py-1 text-base rounded-lg pl-2 pr-2 hover:bg-neutral-600 bg-neutral-500 inline-block pl-2" onclick="stop()">⏸️ Pause</button>
|
||||||
<button class="inline-block pl-2" onclick="navigator.clipboard.writeText(app.api.codeExamples['${codeId}'])">copy</button>
|
<button class="py-1 text-base rounded-lg pl-2 pr-2 hover:bg-neutral-900 bg-neutral-800 inline-block " onclick="navigator.clipboard.writeText(app.api.codeExamples['${codeId}'])">📎 Copy</button>
|
||||||
</summary>
|
</summary>
|
||||||
\`\`\`javascript
|
\`\`\`javascript
|
||||||
${code}
|
${code}
|
||||||
@ -82,8 +82,8 @@ Welcome to the Topos documentation. These pages are offering you an introduction
|
|||||||
)}. Press again to make the documentation disappear. All your contributions are welcome!
|
)}. Press again to make the documentation disappear. All your contributions are welcome!
|
||||||
|
|
||||||
${makeExample(
|
${makeExample(
|
||||||
"Welcome! Eval to get started",
|
"Welcome! Eval to get started", `
|
||||||
`mod([1/4,1/8,1/16].div(8)):: sound('sine')
|
mod([1/4,1/8,1/16].div(8)):: sound('sine')
|
||||||
.freq([100,50].div(16) + 50 * ($(1)%10))
|
.freq([100,50].div(16) + 50 * ($(1)%10))
|
||||||
.gain(0.5).room(0.9).size(0.9)
|
.gain(0.5).room(0.9).size(0.9)
|
||||||
.sustain(0.1).out()
|
.sustain(0.1).out()
|
||||||
|
|||||||
@ -33,18 +33,19 @@ import showdown from "showdown";
|
|||||||
showdown.setFlavor("github");
|
showdown.setFlavor("github");
|
||||||
import showdownHighlight from "showdown-highlight";
|
import showdownHighlight from "showdown-highlight";
|
||||||
const classMap = {
|
const classMap = {
|
||||||
h1: "text-white lg:text-4xl text-xl lg:ml-4 lg:mx-4 mx-2 lg:my-4 my-2 lg:mb-8 mb-4 bg-neutral-900 rounded-lg py-2 px-2",
|
h1: "text-white lg:text-4xl text-xl lg:ml-4 lg:mx-4 mx-2 lg:my-4 my-2 lg:mb-4 mb-4 bg-neutral-900 rounded-lg py-2 px-2",
|
||||||
h2: "text-white lg:text-3xl text-xl lg:ml-4 lg:mx-4 mx-2 lg:my-4 my-2 lg:mb-8 mb-4 bg-neutral-900 rounded-lg py-2 px-2",
|
h2: "text-white lg:text-3xl text-xl lg:ml-4 lg:mx-4 mx-2 lg:my-4 my-2 lg:mb-4 mb-4 bg-neutral-900 rounded-lg py-2 px-2",
|
||||||
ul: "text-underline pl-6",
|
ul: "text-underline pl-6",
|
||||||
li: "list-disc lg:text-2xl text-base text-white lg:mx-4 mx-2 my-4 my-2 leading-normal",
|
li: "list-disc lg:text-2xl text-base text-white lg:mx-4 mx-2 my-4 my-2 leading-normal",
|
||||||
p: "lg:text-2xl text-base text-white lg:mx-4 mx-2 my-4 leading-normal",
|
p: "lg:text-2xl text-base text-white lg:mx-6 mx-2 my-4 leading-normal",
|
||||||
a: "lg:text-2xl text-base text-orange-300",
|
a: "lg:text-2xl text-base text-orange-300",
|
||||||
code: "lg:my-4 sm:my-1 text-base lg:text-xl block whitespace-pre overflow-x-hidden",
|
code: "lg:my-4 sm:my-1 text-base lg:text-xl block whitespace-pre overflow-x-hidden",
|
||||||
icode:
|
icode:
|
||||||
"lg:my-1 my-1 lg:text-xl sm:text-xs text-white font-mono bg-neutral-600",
|
"lg:my-1 my-1 lg:text-xl sm:text-xs text-white font-mono bg-neutral-600",
|
||||||
blockquote: "text-neutral-200 border-l-4 border-neutral-500 pl-4 my-4 mx-4",
|
blockquote: "text-neutral-200 border-l-4 border-neutral-500 pl-4 my-4 mx-4",
|
||||||
details:
|
details:
|
||||||
"lg:mx-12 py-1 px-6 lg:text-2xl text-white rounded-lg bg-neutral-600",
|
"lg:mx-12 py-2 px-6 lg:text-2xl text-white rounded-lg bg-neutral-600",
|
||||||
|
summary: "font-semibold text-xl",
|
||||||
table:
|
table:
|
||||||
"justify-center lg:my-8 my-2 lg:mx-8 mx-2 lg:text-2xl text-base w-full text-left text-white border-collapse",
|
"justify-center lg:my-8 my-2 lg:mx-8 mx-2 lg:text-2xl text-base w-full text-left text-white border-collapse",
|
||||||
thead:
|
thead:
|
||||||
|
|||||||
Reference in New Issue
Block a user