Skip to content

Commit

Permalink
review example programs; show by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMayfield committed Jul 11, 2024
1 parent 0eb363c commit 8df377a
Show file tree
Hide file tree
Showing 6 changed files with 246 additions and 229 deletions.
12 changes: 6 additions & 6 deletions main.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ <h1 id="titleRefresh">Praxly 🍂</h1>
<span class="material-symbols-rounded close">close</span>

<div class="exampleModalText">
<h3>Here are some example programs to practice with!</h2>
<p>Click on the blue links to browse and try out some sample code.</p>
<h3>Example Programs</h2>
<p>Click on the blue links to try out some sample code.</p>
</div>

<!-- This div is just to separate things-->
Expand Down Expand Up @@ -82,8 +82,8 @@ <h3>Here are some example programs to practice with!</h2>
<span class="button-text">Debug Mode</span>
</button>
</li>
<li class="debugOptions">
<button id="stepButton" class="MainMenu-button" title="Step Over">
<li>
<button id="stepButton" class="MainMenu-button debugOptions" title="Step Over">
<span class="material-symbols-rounded step">tools_ladder</span>
<span class="button-text">Step Over</span>
</button>
Expand All @@ -93,8 +93,8 @@ <h3>Here are some example programs to practice with!</h2>
<span class="button-text">Step Into</span>
</button>
</li>
<li class="debugOptions">
<button id="stopButton" class="MainMenu-button" title="Stop Debugger">
<li>
<button id="stopButton" class="MainMenu-button debugOptions" title="Stop Debugger">
<span class="material-symbols-rounded stop">stop</span>
<span class="button-text">Exit Debug</span>
</button>
Expand Down
5 changes: 3 additions & 2 deletions public/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ h1 {
font-family: sans-serif;
}

#titleRefresh {
/*#titleRefresh {
cursor: pointer;
}
}*/

#title-version {
display: flex;
Expand Down Expand Up @@ -368,6 +368,7 @@ h1 {
/* border: 1px solid var(--text-color); */
background-color: rgb(25, 25, 25);
color: var(--text-color);
cursor: pointer;
transition: 0.2s background-color;
}

Expand Down
10 changes: 7 additions & 3 deletions src/debugger.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
import { getStepInto, isPrimative, setStepInto, stepButton, stepIntoButton, stopButton } from "./common";


export function showDebug() {
let debugOptions = document.querySelectorAll('.debugOptions');
let runButton = document.getElementById('runButton');
let debugButton = document.getElementById('debugButton');

for (let button of debugOptions) {
button.style.display = 'inline-flex';
}
runButton.style.display = 'none';
debugButton.style.display = 'none';
document.querySelector('#runButton').style.display = 'none';
}

export function hideDebug(configuration) {
let debugOptions = document.querySelectorAll('.debugOptions');
let runButton = document.getElementById('runButton');
let debug = document.getElementById('debugButton');

for (let button of debugOptions) {
button.style.display = 'none';
}
if (!configuration.embed || configuration.button === 'both') {
document.querySelector('#runButton').style.display = 'inline-flex';
if (!configuration.embed || configuration.button !== 'debug') {
runButton.style.display = 'inline-flex';
}
debug.style.display = 'inline-flex';
}
Expand Down
Loading

0 comments on commit 8df377a

Please sign in to comment.