Skip to content

Commit

Permalink
➕ サイズ調整つけた
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-aiuto committed May 7, 2021
1 parent 8da278c commit e8f6114
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
26 changes: 26 additions & 0 deletions src/app/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

body {
font-family: sans-serif;
user-select: none;
}

.container {
Expand All @@ -14,4 +15,29 @@ body {

.timer-wrapper {
margin: 12px;
transform-origin: top;
}

.zoom-buttons {
margin: 8px;
text-align: center;

button {
font-size: 0.7rem;
margin: 6px;
padding: 8px 8px;
border-radius: 12px;
font-family: monospace;
touch-action: manipulation;
border: none;
border-top: solid 1px #eee;
background-color: #fff;
box-shadow: 0 1px 2px #777;
color: #555;
flex: 1;
}

button:active:not(:disabled) {
box-shadow: 0 0px 2px #777 inset;
}
}
5 changes: 4 additions & 1 deletion src/app/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import Timer from '@/app/components/timer.vue'
document.addEventListener('DOMContentLoaded', () => {
new Vue({
el: '#timer-ui',
components: { Timer }
components: { Timer },
data(): { scale: number } {
return { scale: 1 }
},
})
})
11 changes: 10 additions & 1 deletion src/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@
</head>
<body>
<div class="container" id="timer-ui">
<timer time-up-audio-src="timer-timeup.mp3" class="timer-wrapper"></timer>
<div class="zoom-buttons">
<button @click="scale += 0.1">拡大</button>
<button @click="scale -= 0.1">縮小</button>
<button @click="scale = 1">リセット</button>
</div>
<timer
time-up-audio-src="timer-timeup.mp3"
class="timer-wrapper"
:style="{transform: 'scale(' + scale + ')'}"
></timer>
</div>
</body>
</html>

0 comments on commit e8f6114

Please sign in to comment.