Skip to content

Commit 1e675a6

Browse files
committed
add footer and update tab behavior
1 parent 01a1f8d commit 1e675a6

File tree

4 files changed

+205
-150
lines changed

4 files changed

+205
-150
lines changed

src/App.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22
<div id="app">
33
<barra/>
44
<Base/>
5+
<br>
6+
<footerVue/>
57
</div>
68
</template>
79
<script>
8-
910
import barra from './components/barra.vue'
1011
import Base from './components/basecanvas.vue'
11-
12+
import footerVue from './components/extra/footerVue.vue'
1213
export default {
1314
name: 'App',
1415
components: {
1516
barra,
16-
Base
17+
Base,
18+
footerVue
1719
}
1820
}
19-
</script>
21+
</script>

src/components/basecanvas.vue

Lines changed: 64 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<template>
22
<b-container>
3-
<b-card
4-
:class="bytheme"
5-
class="dracula col-md-12 mb-3 w-100 mt-2 shadow-lg"
6-
>
3+
<b-card :class="bytheme" class="yonce col-md-12 mb-3 w-100 mt-2 shadow-lg">
74
<b-container style="display: inline">
85
<b-form-select
96
class="text-center mt-1 text-secondary col-sm-2 font-weight-bold"
@@ -66,12 +63,21 @@
6663
<b-icon variant="white" icon="puzzle-fill"></b-icon>
6764
</b-button>
6865
<b-modal id="extra-modal" title="addons">
69-
<b-button v-b-modal.notas-modal variant="dark">Notas</b-button>
66+
<b-button
67+
v-b-modal.notas-modal
68+
title="mostrar panel de notas"
69+
variant="dark"
70+
>Notas</b-button
71+
>
7072
<b-modal id="notas-modal" hide-footer>
7173
<notas />
7274
</b-modal>
7375

74-
<b-button class="ml-1" v-b-modal.themes-modal variant="dark"
76+
<b-button
77+
title="mostrar lista de themas"
78+
class="ml-1"
79+
v-b-modal.themes-modal
80+
variant="dark"
7581
>themes</b-button
7682
>
7783
<b-modal id="themes-modal">
@@ -91,11 +97,25 @@
9197
<div class="row">
9298
<div class="rounded col-md-12 shadow-md mt-2">
9399
<div id="file-list" class="files mb-3">
94-
<button @click="changeMode" class="classmode">class</button>
95-
<button class="classmode" id="newspace-button" @click="addSpace">
100+
101+
<button
102+
title="cambiar a modo de clases"
103+
@click="changeMode"
104+
class="classmode"
105+
>
106+
{{getClassModeName}}
107+
</button>
108+
109+
<button
110+
title="añadir un nuevo archivo"
111+
class="classmode"
112+
id="newspace-button"
113+
@click="addSpace"
114+
>
96115
<b-icon variant="white" icon="file-earmark-plus"></b-icon>
97116
</button>
98117
<button
118+
title="tab home"
99119
id="tab_id0"
100120
@click="setSpace({ id: 'tab_id0' })"
101121
class="tabs"
@@ -104,6 +124,8 @@
104124
</button>
105125
</div>
106126

127+
<br v-if="local_widthMatch">
128+
107129
<div id="files">
108130
<codemirror
109131
:style="codeSpaces[0].class"
@@ -135,22 +157,29 @@
135157
</b-card>
136158
</div>
137159
<b-button
160+
title="establer entrada del programa"
138161
v-b-modal.program-input
139162
variant="primary"
140163
class="ml-1 float-right mt-1"
141164
>entrada <b-icon icon="input-cursor-text"></b-icon>
142165
</b-button>
143166
<b-button
167+
id="establercer las librerias en el modo clasess"
144168
v-b-modal.headers
145169
class="float-right mt-1 ml-2"
146170
variant="secondary"
147171
v-if="mode"
148172
>#include</b-button
149173
>
150-
<b-button @click="compile" variant="success" class="ml-1 float-right mt-1"
174+
<b-button
175+
title="compilar"
176+
@click="compile"
177+
variant="success"
178+
class="ml-1 float-right mt-1"
151179
>compilar</b-button
152180
>
153181
<b-button
182+
title="resetear la salida"
154183
class="float-right mx-auto mt-1 ml-1"
155184
variant="danger"
156185
@click="reset"
@@ -197,9 +226,26 @@ export default {
197226
});
198227
},
199228
229+
mounted() {
230+
this.local_widthQuery.addEventListener('change',()=>{
231+
this.local_widthMatch = this.local_widthQuery.matches;
232+
});
233+
},
234+
235+
data(){
236+
const local_widthQuery = matchMedia("(min-width: 300px) and (max-width: 991px )")
237+
return {
238+
local_class_mode_name: 'class mode ',
239+
local_mode: 'off',
240+
local_widthQuery: local_widthQuery,
241+
local_widthMatch: local_widthQuery.matches
242+
}
243+
},
244+
200245
methods: {
201246
changeMode() {
202247
this.$store.commit("changeMode");
248+
this.local_mode = this.$store.state.mode ? 'on' : 'off';
203249
},
204250
205251
setSpace(value) {
@@ -298,6 +344,9 @@ export default {
298344
bytheme() {
299345
return this.$store.state.bytheme;
300346
},
347+
getClassModeName() {
348+
return this.local_widthMatch ? '.h' : this.local_class_mode_name + this.local_mode;
349+
}
301350
},
302351
};
303352
</script>
@@ -327,7 +376,7 @@ export default {
327376
width: 100%;
328377
height: 28px;
329378
border-radius: 4px;
330-
overflow: hidden;
379+
overflow: auto;
331380
}
332381
.tabs {
333382
width: 10%;
@@ -339,12 +388,15 @@ export default {
339388
}
340389
341390
.classmode {
342-
width: 5%;
391+
width: 13%;
343392
height: 28px;
344393
border-radius: 4px;
345394
background: transparent;
346395
border: 1px solid white;
347396
color: white;
348397
margin-right: 10px;
349398
}
350-
</style>
399+
400+
401+
402+
</style>

src/components/extra/footerVue.vue

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<template>
2+
<b-card class="w-100 footer-vw" type="dark">
3+
<hr class="bg-dark" />
4+
<ul class="float-left mt-3 footer-list">
5+
<li><b-icon icon="code"></b-icon> Kevin Bohorquez</li>
6+
<br />
7+
<li><b-icon icon="github"></b-icon> scyth3-c</li>
8+
<li><b-icon icon="twitter"></b-icon> scyth3_c</li>
9+
</ul>
10+
11+
<b-card no-body class="col-md-4 float-center mx-auto footer-vw">
12+
<b-badge style="background: rgba(0, 0, 0, 0)" variant="dark" class="p-2"
13+
>enviame algun mensaje:</b-badge
14+
>
15+
<b-input
16+
title="escribe el mensaje aqui"
17+
v-model="model"
18+
placeholder="¡Hola!, ¿Cómo Estás?"
19+
></b-input>
20+
<b-button
21+
title="enviar mensaje"
22+
class="btn-sm my-2 col-md-3 float-center mx-auto"
23+
variant="dark"
24+
@click="sendMsg"
25+
>enviar</b-button
26+
>
27+
</b-card>
28+
<hr class="bg-dark" />
29+
</b-card>
30+
</template>
31+
32+
<script>
33+
import store from "@/store";
34+
35+
export default {
36+
name: "footerVue",
37+
methods: {
38+
sendMsg() {
39+
store.commit("sendMsg");
40+
},
41+
},
42+
computed: {
43+
model: {
44+
get() {
45+
return store.state.direct_msg;
46+
},
47+
set(value) {
48+
store.state.direct_msg = value;
49+
},
50+
},
51+
},
52+
};
53+
</script>
54+
55+
<style scoped>
56+
.footer-vw {
57+
background: rgb(27, 27, 27);
58+
}
59+
.footer-list {
60+
list-style: none;
61+
color: white;
62+
}
63+
.text {
64+
font-family: "Courier New", Courier, monospace;
65+
}
66+
</style>

0 commit comments

Comments
 (0)