Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design: responsive display #60

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
15 changes: 12 additions & 3 deletions src/components/MainMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<v-container
id="menu-container"
fluid
class="flex-column max-w-3xl menu-container"
class="flex-column menu-container"
>
<p />
<v-container
fluid
class="flex structure-list justify-center"
class="flex flex-column structure-list justify-center align-center"
>
<StructureItem
v-for="item in dataStructures"
:key="item.code"
:name="item.name"
:data-structure="item"
class="mb-4 mx-4"
/>
</v-container>
<v-row
Expand Down Expand Up @@ -93,4 +93,13 @@ export default {
.menu-container {
flex-wrap: wrap;
}
.structure-list {
overflow: scroll;
width: fit-content;
}
@media (min-width: 850px) {
.structure-list {
flex-direction: row !important;
}
}
</style>
30 changes: 22 additions & 8 deletions src/components/TreeVisualizerHandler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Structure: {{ title }}
</h1>
</div>
<div class="flex buttons">
<div class="flex flex-column align-center buttons">
<InsertInput
:disabled="isAnimating"
@myEvent="insertInputEvent"
Expand All @@ -25,11 +25,11 @@
:current-frame-number="currentFrame"
:tree-type="$route.params.code"
/>
<div class="arrow-button-container flex mx-auto my-2">
<div class="arrow-button-container flex flex-column mx-auto my-2">
<div class="history-btn-container">
<HistoryButtons
id="history.buttons"
class="mx-4"
class="mx-4 mb-2"
:current="currentSequenceNumber"
:length="sequences.length"
:disabled="historyButtonsAreDisabled"
Expand All @@ -38,17 +38,17 @@
/>
</div>
<v-btn
class="button"
class="button mb-4"
color="primary"
:disabled="isAnimating"
:disabled="isAnimating || sequences.length < 1"
@click="replay"
>
Replay <v-icon>mdi-play</v-icon>
</v-btn>
<div class="step-btn-container">
<HistoryButtons
id="step-buttons"
class="mx-4"
class="mx-4 mb-2"
:current-frame="currentFrame"
:length="currentSequence ? currentSequence.frames.length : 0"
:disabled="stepButtonsAreDisabled"
Expand Down Expand Up @@ -220,6 +220,11 @@ export default {

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.name {
font-size: 2rem;
line-height: 2rem;
height: fit-content;
}
.structies-button:hover {
background-color:#3c48fa;
}
Expand All @@ -230,12 +235,21 @@ export default {
}
.buttons {
place-content: space-around;

flex: 0 0 auto;
}
.tree-container {
width: 100%;
height: 90vh;
flex-direction: column;
}
@media (min-width: 850px) {
.name {
font-size: 3rem;
}
.buttons, .arrow-button-container {
flex-direction: row !important;
}
.tree-container {
height: 90vh;
}
}
</style>
2 changes: 1 addition & 1 deletion src/components/shared/DeleteInput.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="flex button-container align-center">
<div class="flex button-container align-center justify-center">
<v-text-field
v-if="!onlypop"
color="error"
Expand Down
6 changes: 5 additions & 1 deletion src/components/shared/Visualizer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ export default {

<style>
.view-container {
height: 600px;
align-items: center;
}
@media (min-width: 850px) {
.view-container {
height: 600px;
}
}
</style>