Skip to content

Commit

Permalink
Resize textareas
Browse files Browse the repository at this point in the history
  • Loading branch information
misterhay committed Jan 4, 2024
1 parent b824dbb commit 5e04e46
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions docs/pyscript-labyrinth.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@
<table>
<tr>
<td><div id="question_number"></div></td>
<td><td><div id="markdown"></div></td>
<td><td><div id="markdown">Loading...</div></td>
</tr>
</table>
<hr>
<textarea id="answer_box" cols="80", rows="1" placeholder="input answer here"></textarea>
<textarea id="answer_box" cols="160", rows="1" placeholder="input answer here"></textarea>
<br>
<button id="check_button">Check</button>
<hr>
<button id="run_button">▶Run</button>
<button id="clear_button">Clear Output</button>
<button id="clear_errors_button">Clear Errors</button>
<hr>
<textarea id="code_box" cols="80" rows="6"></textarea>
<textarea id="code_box" cols="160" rows="6"></textarea>
<div id="output"></div>

<!-- <script type="py" config="./pyscript.toml" target="output"> -->
<script type="py" target="output">
from pyscript import when, window, document, display

Expand Down Expand Up @@ -66,14 +66,12 @@
#display('world')
#display('finished loading', append=False) # overwrite


# set text
questionNumberDiv = document.getElementById('question_number')
questionNumberDiv.innerText = 1
markdownDiv = document.getElementById('markdown')
markdownDiv.innerText = window.location.hostname
markdownDiv.innerText = 'Is this the first question?'
</script>

<!-- <button py-click="click_handler" id="bad-practice" class="py-button">Don't do buttons this way</button> -->
</body>
</html>

0 comments on commit 5e04e46

Please sign in to comment.