[wip] top menu browsable by mobile devices

This commit is contained in:
Ali Gator 2022-01-15 09:05:56 +01:00
parent d29cbb307b
commit 71ae224956
4 changed files with 44 additions and 30 deletions

View File

@ -1,10 +1,5 @@
<template> <template>
<div id="main"> <div id="main">
<h1
id="main-title"
>
Cellular Automata Explorer
</h1>
<div id="container"> <div id="container">
<MainMenu /> <MainMenu />
<Canvas /> <Canvas />
@ -47,29 +42,18 @@ body {
font-family: Courier New; font-family: Courier New;
} }
body, html {
height: calc(100vh - 100px);
}
canvas { canvas {
flex: auto; flex: auto;
background: #110812; background: #110812;
margin-right: 10px; margin-right: 10px;
} }
h1, h2 {
font-weight: bold;
}
h1 {
margin : 10px auto;
font-size: larger;
text-align: center;
}
#main {
}
#container { #container {
display: flex;
height: calc(100vh - 100px);
overflow: hidden; overflow: hidden;
width: 100%;
} }
</style> </style>

View File

@ -114,7 +114,6 @@ export default {
this.draw2d(board) this.draw2d(board)
}, },
async draw2dLast() { async draw2dLast() {
console.log(this.lastBoard)
this.draw2d(this.lastBoard) this.draw2d(this.lastBoard)
}, },
stop() { stop() {
@ -122,13 +121,13 @@ export default {
}, },
reset() { reset() {
this.stop() this.stop()
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height) this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight)
} }
} }
} }
</script> </script>
<style> <style>
#mainContent { #mainContent {
min-width: 70%;
} }
</style> </style>

View File

@ -1,9 +1,14 @@
<template> <template>
<div id="sidebar"> <div id="mainMenu">
<MenuGeneralOptions /> <MenuGeneralOptions />
<MenuCellProperties /> <MenuCellProperties />
<MenuElementaryCA /> <MenuElementaryCA />
<Menu2dCA /> <Menu2dCA />
<h1
id="main-title"
>
Cellular Automata Explorer
</h1>
</div> </div>
</template> </template>
@ -24,9 +29,22 @@ export default {
</script> </script>
<style> <style>
#sidebar { #mainMenu {
width: 25%; width: 25%;
padding: 0 10px; padding: 0 10px;
overflow-y: scroll; overflow: scroll;
display: flex;
width: 100%;
}
h1, h2 {
font-weight: bold;
}
h1 {
margin : 10px 20px;
font-size: larger;
text-align: center;
width: 100%;
} }
</style> </style>

View File

@ -45,14 +45,21 @@ export default {
</script> </script>
<style> <style>
.menu-row, h1 {
white-space: nowrap;
position: relative;
}
.menu-row h2 { .menu-row h2 {
font-size: medium; font-size: small;
padding: 10px; padding: 10px;
cursor: pointer; cursor: pointer;
border: 2px solid darkgrey;
margin: 0 0 10px 0; margin: 0 0 10px 0;
} }
.menu-row h2:hover {
color: darkgrey;
}
select { select {
margin-top: 10px; margin-top: 10px;
padding: 5px; padding: 5px;
@ -71,11 +78,17 @@ input[type="button"] {
} }
.menu-row { .menu-row {
flex: 1; flex-basis: max-content;
} }
label, .form-field label { label, .form-field label {
margin-right: 10px; margin-right: 10px;
font-weight: bold; font-weight: bold;
} }
.menu-row-content {
font-size: small;
background: black;
position: relative;
}
</style> </style>