adding new doc page
This commit is contained in:
@ -164,6 +164,7 @@
|
||||
<div class="space-y-2">
|
||||
<h2 class="font-semibold lg:text-xl text-gray-400">More</h2>
|
||||
<div class="flex flex-col">
|
||||
<a rel="noopener noreferrer" id="docs_oscilloscope" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Oscilloscope</a>
|
||||
<a rel="noopener noreferrer" id="docs_bonus" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Bonus/Trivia</a>
|
||||
<a rel="noopener noreferrer" id="docs_about" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">About Topos</a>
|
||||
</div>
|
||||
|
||||
@ -1976,11 +1976,18 @@ export class UserAPI {
|
||||
// =============================================================
|
||||
// Oscilloscope Configuration
|
||||
// =============================================================
|
||||
|
||||
public scope = (config: OscilloscopeConfig): void => {
|
||||
/**
|
||||
* Configures the oscilloscope.
|
||||
* @param config - The configuration object
|
||||
*/
|
||||
this.app.osc = config;
|
||||
// Dispatch the config to the old object so that missing options
|
||||
// are still specified
|
||||
|
||||
this.app.osc = {
|
||||
...this.app.osc,
|
||||
...config,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { type Editor } from "./main";
|
||||
import { introduction } from "./documentation/introduction";
|
||||
import { oscilloscope } from "./documentation/oscilloscope";
|
||||
import { samples } from "./documentation/samples";
|
||||
import { chaining } from "./documentation/chaining";
|
||||
import { software_interface } from "./documentation/interface";
|
||||
@ -85,6 +86,7 @@ export const documentation_factory = (application: Editor) => {
|
||||
functions: functions(application),
|
||||
reference: reference(),
|
||||
shortcuts: shortcuts(),
|
||||
oscilloscope: oscilloscope(application),
|
||||
bonus: bonus(application),
|
||||
about: about(),
|
||||
};
|
||||
|
||||
@ -451,6 +451,7 @@ export const installInterfaceLogic = (app: Editor) => {
|
||||
"shortcuts",
|
||||
"about",
|
||||
"bonus",
|
||||
"oscilloscope",
|
||||
].forEach((e) => {
|
||||
let name = `docs_` + e;
|
||||
document.getElementById(name)!.addEventListener("click", async () => {
|
||||
|
||||
8
src/documentation/oscilloscope.ts
Normal file
8
src/documentation/oscilloscope.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { type Editor } from "../main";
|
||||
import { makeExampleFactory } from "../Documentation";
|
||||
|
||||
export const oscilloscope = (application: Editor): string => {
|
||||
const makeExample = makeExampleFactory(application);
|
||||
return `# Oscilloscope
|
||||
`;
|
||||
};
|
||||
Reference in New Issue
Block a user