From 25afb0bde9b8a2c064135a534231c232a461b341 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 16 Feb 2020 22:45:07 +0100 Subject: Set up a first version of tabata timer --- public/icon.png | Bin 0 -> 886 bytes public/index.html | 101 +++++++++++++++++++++++++++++ public/main.css | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++ public/sounds/c3.mp3 | Bin 0 -> 47469 bytes public/sounds/c4.mp3 | Bin 0 -> 57357 bytes public/sounds/c5.mp3 | Bin 0 -> 65742 bytes 6 files changed, 276 insertions(+) create mode 100644 public/icon.png create mode 100644 public/index.html create mode 100644 public/main.css create mode 100644 public/sounds/c3.mp3 create mode 100644 public/sounds/c4.mp3 create mode 100644 public/sounds/c5.mp3 (limited to 'public') diff --git a/public/icon.png b/public/icon.png new file mode 100644 index 0000000..a489112 Binary files /dev/null and b/public/icon.png differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..5668682 --- /dev/null +++ b/public/index.html @@ -0,0 +1,101 @@ + + + + + + + Tabata timer + + + + + + +
Tabata timer
+ +
+ +
+ + + + + + + + + + + +
+ duration +
8
+
+ + + +
+ +
+ + + +
+ +
+
Tabata
+ + / + +
+ +
+
Cycle
+ + / + +
+ +
+ + + +
+ +
+ + + + + + diff --git a/public/main.css b/public/main.css new file mode 100644 index 0000000..9421a3c --- /dev/null +++ b/public/main.css @@ -0,0 +1,175 @@ +/* Box sizing */ + +html { + box-sizing: border-box; +} +*, *:before, *:after { + box-sizing: inherit; +} + +/* Constants */ + +:root { + --color-header: #333333; + --color-action: #993333; + --color-action-darker: #773333; + --color-timer-arc-total: #EEEEEE; + --color-timer-arc-progress: #71b571; + --color-timer-hover: #DDEEDD; + + --dial-width: 20rem; + + --base-font-size: 18px; +} + +@media all and (max-width: 800px) { + :root { + --base-font-size: 14px; + } +} + +/* Layout */ + +html { + font-size: var(--base-font-size); +} + +body { + margin: 0; +} + +.g-Layout__Header { + background-color: var(--color-header); + color: white; + padding: 1rem 2rem; + font-size: 2rem; +} + +#g-Layout__Main { + transition: all 0.2s ease-in-out; +} + +.g-Layout__HideMain { + opacity: 0; + padding-left: 2rem; +} + +/* Config */ + +#g-Form { + display: flex; + flex-direction: column; + align-items: center; + margin-top: 5rem; +} + +.g-Form__Label { + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 1rem; + text-align: center; + font-size: 1.3rem; +} + +.g-Form__Input { + display: block; + text-align: center; + margin-top: 0.5rem; + font-size: 1.3rem; + width: 10rem; +} + +.g-Form__Duration { + text-align: center; + font-size: 1.5rem; + margin-top: 1rem; +} + +.g-Form__Start { + font-size: 1.5rem; + background-color: var(--color-action); + border: 3px solid var(--color-action-darker); + color: white; + padding: 0.5rem 0.8rem; + width: 10rem; + margin-top: 2rem; + cursor: pointer; +} + +/* Timer */ + +#g-Timer { + display: flex; + flex-direction: column; + align-items: center; + display: none; +} + +#g-Timer__Dial { + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + width: var(--dial-width); + height: var(--dial-width); + cursor: pointer; + background-color: white; + font-size: 3rem; + margin: 5rem 0; + position: relative; + border: none; +} + +.g-Timer__Arc { + width: inherit; + height: inherit; + position: absolute; + top: 0; + left: 0; +} + +.g-Timer__ArcTotal { + stroke: var(--color-timer-arc-total); + fill: none; + stroke-width: 10; +} + +#g-Timer__ArcProgress { + stroke: var(--color-timer-arc-progress); + fill: none; + stroke-width: 10; +} + +#g-Timer__Step { + margin-bottom: 0.5rem; +} + +#g-Timer__Duration:hover { + background-color: var(--color-timer-hover); + color: initial; +} + +.g-Timer__TabataAndCycle { + display: flex; + justify-content: space-around; + font-size: 1.5rem; + width: var(--dial-width); +} + +.g-Timer__Tabata, +.g-Timer__Cycle { + text-align: center; + margin-bottom: 1rem; +} + +#g-Timer__Stop { + font-size: 1.5rem; + background-color: var(--color-action); + border: 3px solid var(--color-action-darker); + color: white; + padding: 0.5rem 0.8rem; + width: 10rem; + margin-top: 2rem; + cursor: pointer; +} diff --git a/public/sounds/c3.mp3 b/public/sounds/c3.mp3 new file mode 100644 index 0000000..13e661a Binary files /dev/null and b/public/sounds/c3.mp3 differ diff --git a/public/sounds/c4.mp3 b/public/sounds/c4.mp3 new file mode 100644 index 0000000..0266119 Binary files /dev/null and b/public/sounds/c4.mp3 differ diff --git a/public/sounds/c5.mp3 b/public/sounds/c5.mp3 new file mode 100644 index 0000000..8ff926e Binary files /dev/null and b/public/sounds/c5.mp3 differ -- cgit v1.2.3