Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions components/DisplayContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@
prepend-icon="mdi-party-popper"
>Finish</v-btn
>

<v-btn @click="restart" class="me-2"><v-icon>mdi-restart</v-icon></v-btn>

<v-btn class="bg-info rounded-pill lighten-4 mx-4 mdi mdi-format-list-bulleted"
variant="Flat"
@click.stop="drawer = !drawer_courses"
target="_blank">All Courses</v-btn
>

<v-btn
class="bg-primary rounded-pill lighten-4 mx-4"
variant="flat"
Expand Down Expand Up @@ -68,6 +75,7 @@ export default {
var step = ref(route.query.step ? route.query.step : 0);
const pathParent = route.path;
const path = route.path + id.value;


// Get Tuto pages
const tutosList = await queryContent(path).find();
Expand Down
93 changes: 36 additions & 57 deletions pages/language/[lang]/[...slug].vue
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
<template>
<v-navigation-drawer
:width="325"
v-model="drawer"
absolute
temporary
location="right"
>
<v-navigation-drawer style=" height: calc(100vh - 60px); top: 0px; bottom: 0px;" :width="325" v-model="drawer" temporary
location="right">
<div v-for="(n, key) in navigation" :key="key">
<div v-for="(section, sectionKey) in n.children" :key="sectionKey">
<div v-for="(c, keyC) in section.children" :key="keyC">
<h3
class="text-black"
style="margin-bottom: 2%; margin-left: 4%; margin-top: 4%"
>
{{ c.title }}
</h3>
<h3 class="text-black" style="margin-bottom: 2%; margin-left: 4%; margin-top: 4%;"> {{ c.title }}</h3>
<v-list>
<v-list-item
@click="changePath(section._path, c._dir)"
v-for="(c2, keyC2) in c.children"
:key="keyC2"
>
<v-list-item-title style="margin-bottom: 2%; margin-left: 4%">{{
c2.title
}}</v-list-item-title>
<v-list-item @click="changePath(section._path, c._dir)" v-for="(c2, keyC2) in c.children" :key="keyC2">
<v-list-item-title style="margin-bottom: 2%; margin-left: 4%;">{{ c2.title }}</v-list-item-title>
<v-divider></v-divider>
</v-list-item>
</v-list>
</div>
</div>
</div>
</v-navigation-drawer>

<v-navigation-drawer style=" height: calc(100vh - 60px); top: 0px; bottom: 0px;" :width="325"
v-model="drawer_current_course" temporary location="right">
<div v-for="(n, key) in navigation" :key="key">
<div v-for="(section, sectionKey) in n.children" :key="sectionKey">
<div v-for="(c, keyC) in section.children" :key="keyC">
<h3 class="text-black" style="margin-bottom: 2%; margin-left: 4%; margin-top: 4%;"> {{ c.title }}</h3>
<v-list>
<v-list-item @click="changePath(section._path, c._dir)" v-for="(c2, keyC2) in c.children" :key="keyC2">
<v-list-item-title style="margin-bottom: 2%; margin-left: 4%;">{{ c2.title }}</v-list-item-title>
<v-divider></v-divider>
</v-list-item>
</v-list>
</div>
</div>
</div>
</v-navigation-drawer>

<v-row class="fill-height">
<v-col class="fill-height overflow-y-auto">
<DisplayContent />
Expand All @@ -43,17 +45,11 @@
<div class="code" id="out">
<p>Loading {{ lang }} WASM environnement, please wait...</p>
</div>
<v-textarea
style="
<v-textarea style="
font-family: monospace, monospace !important;
margin-top: -20px !important;
"
:prefix="precommand"
v-on:keyup.enter="onEnter"
v-model="command"
variant="underlined"
active="true"
></v-textarea>
" :prefix="precommand" v-on:keyup.enter="onEnter" v-model="command" variant="underlined"
active="true"></v-textarea>
</v-card-text>
</v-card>
</div>
Expand All @@ -66,35 +62,15 @@
<v-card-text class="fill-height">
<v-window v-model="tab" class="fill-height">
<v-window-item value="plot" class="fill-height text-center">
<div
style="width: 100%; background-color: gainsboro"
class="text-left"
>
<v-btn
variant="text"
@click="changePlot('prev')"
icon="mdi-chevron-left"
size="x-small"
></v-btn>
<v-btn
variant="text"
@click="changePlot('next')"
icon="mdi-chevron-right"
size="x-small"
></v-btn>
<div style="width: 100%; background-color: gainsboro" class="text-left">
<v-btn variant="text" @click="changePlot('prev')" icon="mdi-chevron-left" size="x-small"></v-btn>
<v-btn variant="text" @click="changePlot('next')" icon="mdi-chevron-right" size="x-small"></v-btn>
<v-btn size="x-small" @click="saveCanvas">Save</v-btn>
</div>
<canvas
id="plot-canvas"
width="1008"
height="1008"
style="margin: auto; height: calc(100% - 50px)"
></canvas>
<canvas id="plot-canvas" width="1008" height="1008"
style="margin: auto; height: calc(100% - 50px)"></canvas>
</v-window-item>
<v-window-item
value="editorTab"
class="fill-height text-center"
>
<v-window-item value="editorTab" class="fill-height text-center">
<Editor :lang="lang" />
</v-window-item>
</v-window>
Expand Down Expand Up @@ -137,6 +113,7 @@ export default {
canvasArray: [],
canvasPos: 0,
drawer: null,
drawer_current_course: null,
};
},
async setup() {
Expand Down Expand Up @@ -369,7 +346,7 @@ print("Welcome to the Pyodide terminal emulator 🐍\\n" + BANNER)
}
},
async runR() {
for (;;) {
for (; ;) {
const output = await this.webConsole.webR.read();
var element = document.getElementById("out");
switch (output.type) {
Expand Down Expand Up @@ -495,9 +472,11 @@ pre {
overflow-x: auto !important;
margin-bottom: 10px !important;
}

li {
margin-left: 25px;
}

.math {
font-family: Courier, monospace;
}
Expand Down