From 04f2b905afb9614399fea10f47bd7e845e701e97 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 12 Nov 2022 21:28:07 +0100 Subject: [PATCH] basic intro tab --- repl/src/App.jsx | 97 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 75 insertions(+), 22 deletions(-) diff --git a/repl/src/App.jsx b/repl/src/App.jsx index 7e0c574a..24a9443f 100644 --- a/repl/src/App.jsx +++ b/repl/src/App.jsx @@ -109,7 +109,7 @@ const isEmbedded = window.location !== window.parent.location; function App() { const [view, setView] = useState(); // codemirror view const [lastShared, setLastShared] = useState(); - const [activeFooter, setActiveFooter] = useState('console'); + const [activeFooter, setActiveFooter] = useState('intro'); // logger const [log, setLog] = useState([]); @@ -139,7 +139,7 @@ function App() { // scroll log box to bottom when log changes footerContent.current.scrollTop = footerContent.current?.scrollHeight; } - }, [log]); + }, [log, activeFooter]); const { code, setCode, scheduler, evaluate, activateCode, error, isDirty, activeCode, pattern, started, stop } = useStrudel({ @@ -252,8 +252,8 @@ function App() {
setActiveFooter(name)} className={cx( - 'h-8 px-2 text-white cursor-pointer hover:text-highlight flex items-center space-x-1 border-b', - activeFooter === name ? 'border-white hover:border-highlight' : 'border-transparent', + 'h-8 px-2 text-white cursor-pointer hover:text-tertiary flex items-center space-x-1 border-b', + activeFooter === name ? 'border-white hover:border-tertiary' : 'border-transparent', )} > {name} @@ -279,26 +279,32 @@ function App() { isEmbedded ? 'h-12 md:h-8' : 'h-25 md:h-14', )} > -
- + {/* logo + /> */}

- strudel REPL +
🌀
+
+ strudel REPL +

- {!isEmbedded && ( - @@ -326,7 +332,7 @@ function App() { {!isEmbedded && ( learn @@ -335,7 +341,7 @@ function App() { {!isEmbedded && ( )} {isEmbedded && ( -