mirror of
https://github.com/Xevion/power-math.git
synced 2025-12-06 05:15:56 -06:00
finish settings menu open/close buttons & styling
This commit is contained in:
25
src/App.vue
25
src/App.vue
@@ -2,7 +2,18 @@
|
|||||||
<div id="app">
|
<div id="app">
|
||||||
<div class="columns is-justify-content-end pt-2">
|
<div class="columns is-justify-content-end pt-2">
|
||||||
<div class="column is-1 mr-2">
|
<div class="column is-1 mr-2">
|
||||||
<b-icon @click.native="openSettings" id="settingsCog" pack="fas" icon="cog" custom-size="3x"></b-icon>
|
<b-icon @click.native="isSettingsMenuActive = true" id="settingsCog" pack="fas" icon="cog" custom-size="3x"></b-icon>
|
||||||
|
<b-modal
|
||||||
|
v-model="isSettingsMenuActive"
|
||||||
|
has-modal-card
|
||||||
|
trap-focus
|
||||||
|
:destroy-on-hide="false"
|
||||||
|
aria-role="dialog"
|
||||||
|
aria-modal>
|
||||||
|
<template #default="props">
|
||||||
|
<SettingsMenu v-bind="settings" @close="props.close"></SettingsMenu>
|
||||||
|
</template>
|
||||||
|
</b-modal>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="expression" class="animate__animated animate__faster" :class="currentAnimation"
|
<div id="expression" class="animate__animated animate__faster" :class="currentAnimation"
|
||||||
@@ -65,7 +76,9 @@ html::-webkit-scrollbar {
|
|||||||
|
|
||||||
a, p, span {
|
a, p, span {
|
||||||
color: hsl(0, 0%, 91%);
|
color: hsl(0, 0%, 91%);
|
||||||
text-shadow: hsl(0, 0%, 5%) 5px 5px;
|
#expression {
|
||||||
|
text-shadow: hsl(0, 0%, 5%) 5px 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#question-text {
|
#question-text {
|
||||||
@@ -97,9 +110,11 @@ a, p, span {
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import arithmetic from './arithmetic.js';
|
import arithmetic from './arithmetic.js';
|
||||||
|
import SettingsMenu from "@/components/SettingsMenu";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
|
components: {SettingsMenu},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
answer: null,
|
answer: null,
|
||||||
@@ -108,7 +123,11 @@ export default {
|
|||||||
inputClass: '',
|
inputClass: '',
|
||||||
allowInputSubmit: true,
|
allowInputSubmit: true,
|
||||||
currentAnimation: '',
|
currentAnimation: '',
|
||||||
chances: 3
|
chances: 3,
|
||||||
|
settings: {
|
||||||
|
levels: []
|
||||||
|
},
|
||||||
|
isSettingsMenuActive: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
27
src/components/SettingsMenu.vue
Normal file
27
src/components/SettingsMenu.vue
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<template>
|
||||||
|
<div class="modal-card">
|
||||||
|
<header class="modal-card-head">
|
||||||
|
<p class="modal-card-title">Settings</p>
|
||||||
|
<b-icon @click.native="$parent.close()" class="is-clickable" pack="fas" icon="times"></b-icon>
|
||||||
|
</header>
|
||||||
|
<section class="modal-card-body">
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'SettingsMenu',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
levels: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueKatex from 'vue-katex';
|
import VueKatex from 'vue-katex';
|
||||||
import {ConfigProgrammatic, Input, Field, Button, Icon} from 'buefy';
|
import {ConfigProgrammatic, Input, Field, Button, Icon, Modal} from 'buefy';
|
||||||
import {library} from '@fortawesome/fontawesome-svg-core';
|
import {library} from '@fortawesome/fontawesome-svg-core';
|
||||||
import {faCog} from "@fortawesome/free-solid-svg-icons";
|
import {faCog, faTimes} from "@fortawesome/free-solid-svg-icons";
|
||||||
import {FontAwesomeIcon} from "@fortawesome/vue-fontawesome";
|
import {FontAwesomeIcon} from "@fortawesome/vue-fontawesome";
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import 'katex/dist/katex.min.css';
|
import 'katex/dist/katex.min.css';
|
||||||
@@ -10,13 +10,14 @@ import './scss/buefy.scss';
|
|||||||
import 'animate.css/animate.min.css';
|
import 'animate.css/animate.min.css';
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
library.add(faCog);
|
library.add(faCog, faTimes);
|
||||||
Vue.component('vue-fontawesome', FontAwesomeIcon);
|
Vue.component('vue-fontawesome', FontAwesomeIcon);
|
||||||
|
|
||||||
Vue.use(Input);
|
Vue.use(Input);
|
||||||
Vue.use(Field);
|
Vue.use(Field);
|
||||||
Vue.use(Button);
|
Vue.use(Button);
|
||||||
Vue.use(Icon);
|
Vue.use(Icon);
|
||||||
|
Vue.use(Modal);
|
||||||
ConfigProgrammatic.setOptions({
|
ConfigProgrammatic.setOptions({
|
||||||
defaultIconComponent: 'vue-fontawesome',
|
defaultIconComponent: 'vue-fontawesome',
|
||||||
defaultIconPack: 'fas'
|
defaultIconPack: 'fas'
|
||||||
|
|||||||
@@ -1,9 +1,17 @@
|
|||||||
|
@charset "utf-8";
|
||||||
|
|
||||||
// Import Bulma's core
|
// Import Bulma's core
|
||||||
@import "~bulma/sass/utilities/_all";
|
@import "~bulma/sass/utilities/_all";
|
||||||
|
|
||||||
// Dark Mode
|
// Dark Mode
|
||||||
|
$background: hsl(0, 0%, 13%);
|
||||||
$scheme-main: hsl(0, 0%, 6%);
|
$scheme-main: hsl(0, 0%, 6%);
|
||||||
$scheme-invert: $white;
|
$scheme-invert: $white;
|
||||||
|
$text: hsl(0, 0%, 90%);
|
||||||
|
$text-strong: hsl(0, 0%, 95%);
|
||||||
|
$modal-background-background-color: bulmaRgba($scheme-main, 0.6);
|
||||||
|
$modal-card-body-background-color: darken($background, 4%);
|
||||||
|
$border: darken($modal-background-background-color, 30%);
|
||||||
|
|
||||||
// Import Bulma and Buefy styles
|
// Import Bulma and Buefy styles
|
||||||
@import "~bulma";
|
@import "~bulma";
|
||||||
|
|||||||
Reference in New Issue
Block a user