Skip to content

Commit

Permalink
Scaffold pane layout
Browse files Browse the repository at this point in the history
  • Loading branch information
m90 committed Jan 25, 2025
1 parent ed28df0 commit b182316
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 17 deletions.
61 changes: 44 additions & 17 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,50 @@
<p>{{ globalError.message }}</p>
<pre>{{ globalError.stack }}</pre>
</div>
<div v-else-if="pyodide">
<h1 class="sans-serif f1">
Pyla
</h1>
<label>
Script
<textarea class="db" v-model="script"></textarea>
</label>
<label>
Requirements
<textarea class="db" v-model="requirements"></textarea>
</label>
<button @click="run">Run Script</button>
<div>
<pre v-if="output.length">{{ output.join('\n') }}</pre>
<pre v-else>Output goes here ...</pre>
</div>
<div v-else-if="pyodide" id="container">
<splitpanes horizontal class="default-theme">
<pane max-size="20">
<h1 class="sans-serif f1 ml4">
Pyla
</h1>
</pane>
<pane>
<splitpanes>
<pane max-size="25">
File Tree goes here ...
</pane>
<pane>
<splitpanes horizontal>
<pane>
<splitpanes>
<pane>
<label>
Script
<textarea class="db w-100 h-100" v-model="script"></textarea>
</label>
</pane>
<pane>
<label>
Requirements
<textarea class="db w-100 h-100" v-model="requirements"></textarea>
</label>
</pane>
</splitpanes>
</pane>
<pane max-size="42">
<div>
<button @click="run">Run Script</button>
</div>
<div>
<pre v-if="output.length">{{ output.join('\n') }}</pre>
<pre v-else>Output goes here ...</pre>
</div>
</pane>
</splitpanes>
</pane>
</splitpanes>
</pane>
</splitpanes>
</div>
<div v-else>
<p>Python runtime is initializing ...</p>
Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"splitpanes": "^3.1.8",
"vue": "^3.5.13"
},
"devDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
#app {
max-width: 1280px;
}

html, body, #app, #container {
height: 100%;
}
3 changes: 3 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { createApp } from 'vue'
import { Splitpanes, Pane } from 'splitpanes'
import 'splitpanes/dist/splitpanes.css'

createApp({
components: { Splitpanes, Pane },
data() {
return {
pyodide: null,
Expand Down

0 comments on commit b182316

Please sign in to comment.