Add back button for segments
This commit is contained in:
parent
dc64aa0bc8
commit
b0353dc334
1 changed files with 46 additions and 12 deletions
|
|
@ -6,21 +6,55 @@ const mode = ref<"text">();
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<CSegmentText v-if="mode === 'text'" />
|
||||
<section v-else class="choose">
|
||||
<p>What do you want to print?</p>
|
||||
<div class="list">
|
||||
<button @click="mode = 'text'">Calendar</button>
|
||||
<button @click="mode = 'text'">Cellular Automaton</button>
|
||||
<button @click="mode = 'text'">Chat Message</button>
|
||||
<button @click="mode = 'text'">Easter Egg</button>
|
||||
<button @click="mode = 'text'">Text</button>
|
||||
<button @click="mode = 'text'">Tic Tac Toe</button>
|
||||
</div>
|
||||
</section>
|
||||
<div class="outer">
|
||||
<button v-if="mode" class="close" @click="mode = undefined">X</button>
|
||||
<CSegmentText v-if="mode === 'text'" />
|
||||
<section v-else class="choose">
|
||||
<p>What do you want to print?</p>
|
||||
<div class="list">
|
||||
<button @click="mode = 'text'">Calendar</button>
|
||||
<button @click="mode = 'text'">Cellular Automaton</button>
|
||||
<button @click="mode = 'text'">Chat Message</button>
|
||||
<button @click="mode = 'text'">Easter Egg</button>
|
||||
<button @click="mode = 'text'">Text</button>
|
||||
<button @click="mode = 'text'">Tic Tac Toe</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.outer {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
|
||||
color: white;
|
||||
background-color: black;
|
||||
|
||||
border: 2px solid black;
|
||||
border-radius: 100px;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.close:hover {
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
.close:active {
|
||||
background-color: #666;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 1ch;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue