diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..24a672b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM nginx:latest + +##USER www-data + +WORKDIR /usr/share/nginx/html + +COPY --chown=www-data:www-data --chmod=755 . . + diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100755 index 0000000..691ebed --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,75 @@ +pipeline { + + agent none + + options { + + disableConcurrentBuilds(abortPrevious: true) + + buildDiscarder(logRotator(numToKeepStr: '1')) + } + + stages { + + stage('docker compose build') { + + agent { + + label "aventador" + + } + + steps { + + dir('.') { + + sh 'docker compose build' + + } + + } + + } + + stage('docker compose push') { + + agent { + + label "aventador" + + } + + steps { + + dir('.') { + + sh 'docker compose push' + + } + + } + + } + + stage('prune') { + + agent { + + label "aventador" + + } + + steps { + + dir('.') { + + sh 'docker system prune -a -f' + + } + + } + + } + +}} + diff --git a/assets/countdown.js b/assets/countdown.js new file mode 100755 index 0000000..873820e --- /dev/null +++ b/assets/countdown.js @@ -0,0 +1,42 @@ +const pomodoroTime = document.querySelector('.pomodoro__time'); +const pomodoroState = document.querySelector('.pomodoro__state'); +const modes = document.querySelectorAll('.mode'); +const getStartedMessage = document.querySelector('.get-started'); +const sound = document.querySelector('audio'); +let countdown; + +modes.forEach(mode => mode.addEventListener('click', switchModes)); + +function switchModes(e) { + const secondsForMode = parseInt(e.target.dataset.time, 10); + modes.forEach(mode => mode.classList.remove('active')); + e.target.classList.add('active'); + getStartedMessage.style.display = 'none'; + timer(secondsForMode); +} + +function timer(seconds) { + clearInterval(countdown); + const start = Date.now(); + const finish = start + seconds * 1000; + displayTimeLeft(seconds); + + countdown = setInterval(() => { + const secondsLeft = Math.round((finish - Date.now()) / 1000); + if (secondsLeft <= 0) { + clearInterval(countdown); + document.title = 'Time Up!'; + sound.currentTime = 5; + sound.play(); + } + displayTimeLeft(secondsLeft); + }, 1000); +} + +function displayTimeLeft(seconds) { + const minutes = Math.floor(seconds / 60); + const secondsRemaining = seconds % 60; + const displayTime = `${minutes}:${secondsRemaining < 10 ? '0' : ''}${secondsRemaining}`; + document.title = displayTime; + pomodoroTime.textContent = displayTime; +} diff --git a/assets/css/.recycle/style.css.map b/assets/css/.recycle/style.css.map new file mode 100755 index 0000000..c1ace82 --- /dev/null +++ b/assets/css/.recycle/style.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "AAAA,AAAA,CAAC,AAAA,QAAQ,CACT,CAAC,AAAA,OAAO,CACR,CAAC,AAAC,CACD,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CACV,UAAU,CAAE,OAAO,CACnB,AAED,AAAA,IAAI,AAAC,CACJ,UAAU,CAAE,UAAU,CACtB,SAAS,CAAE,KAAK,CAChB,AAED,AAAA,IAAI,AAAC,CACJ,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,MAAM,CACtB,eAAe,CAAE,YAAY,CAC7B,WAAW,CAAE,MAAM,CACnB,UAAU,CAAE,IAAI,CAChB,WAAW,CAAE,qBAAqB,CAClC,gBAAgB,CAAE,OAAO,CACzB,KAAK,CAAE,KAAK,CAkFZ,AA1FD,AAUC,IAVG,CAUH,aAAa,AAAC,CACb,SAAS,CAAE,MAAM,CACjB,WAAW,CAAE,GAAG,CAChB,AAbF,AAeC,IAfG,CAeH,IAAI,AAAC,CACJ,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,KAAK,CACb,aAAa,CAAE,GAAG,CAClB,UAAU,CAAE,MAAM,CAClB,AApBF,AAsBC,IAtBG,CAsBH,MAAM,AAAC,CACN,SAAS,CAAE,MAAM,CACjB,OAAO,CAAE,WAAW,CACpB,UAAU,CAAE,OAAO,CACnB,aAAa,CAAE,KAAK,CAkBnB,AA5CH,AA4BE,IA5BE,CAsBH,MAAM,CAML,CAAC,AAAC,CACD,YAAY,CAAE,GAAG,CACjB,eAAe,CAAE,IAAI,CACrB,WAAW,CAAE,GAAG,CAChB,KAAK,CAAE,OAAO,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AClB,YAAY,CAAE,KAAK,CACnB,YAAY,CAAE,2CAA2C,CACzD,AA9CH,AAiDC,cAjDa,CAiDb,GAAG,AAAC,CACH,OAAO,CAAE,GAAG,CACZ,MAAM,CAAE,OAAO,CACf,AAGF,MAAM,CAAC,MAAM,MAAM,SAAS,EAAE,KAAK,OAAO,SAAS,EAAE,KAAK,EACzD,AAAA,IAAI,AAAC,CAAE,SAAS,CAAE,UAAU,CAAI,AAEhC,AAAA,IAAI,CAAC,MAAM,AAAC,CAAE,SAAS,CAAE,MAAM,CAAI", + "sources": [ + "../style.scss" + ], + "names": [], + "file": "style.css" +} \ No newline at end of file diff --git a/assets/css/.recycle/style.scss b/assets/css/.recycle/style.scss new file mode 100755 index 0000000..cf887c9 --- /dev/null +++ b/assets/css/.recycle/style.scss @@ -0,0 +1,171 @@ +*::before, +*::after, +* { + margin: 0; + padding: 0; + box-sizing: inherit; +} + +html { + box-sizing: border-box; + font-size: 62.5%; +} + +body { + display: flex; + flex-direction: column; + justify-content: space-evenly; + align-items: center; + min-height: 90vh; + font-family: 'Poppins', sans-serif; + background-color: #1e2140; + color: white; + + .main-heading { + font-size: 3.2rem; + font-weight: 500; + } + + main { + width: 40rem; + height: 40rem; + border-radius: 50%; + text-align: center; + } + + .modes { + font-size: 1.8rem; + padding: 1.6rem 1rem; + background: #151932; + border-radius: 10rem; + + a { + margin-right: 2em; + text-decoration: none; + font-weight: 500; + color: #484c67; + transition: all 300ms ease-out; + + &.active { + padding: 0.5em 1em; + border-radius: 50px; + background-color: #fa6f71; + color: #1c2244; + } + + &:last-child { margin-right: 0; } + } + } + + .get-started { + background: royalblue; + padding: 1.2rem 2rem; + border-radius: 0.4rem; + font-size: 1.8rem; + margin-top: 2rem; + } + + .pomodoro { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; + position: relative; + margin: 2.5rem 0; + text-align: center; + border-radius: 50%; + background: #151932; + box-shadow: 50px 50px 82px #0e1021, -50px -50px 82px #1c2244; + + &::before { + content: ''; + position: absolute; + border: 10px solid royalblue; + border-radius: 50%; + width: 35rem; + height: 35rem; + } + + &__time { + font-size: 7rem; + font-weight: 500; + } + + &__state { + font-size: 2rem; + margin-top: 1em; + padding-left: 1em; + letter-spacing: 1em; + text-transform: uppercase; + } + } +} + +.tooltip-container { + position: fixed; + bottom: 2.5rem; + right: 5.5rem; +} + +.help__tooltip { + position: relative; + padding: 0.8rem; + background: rgba(65, 105, 225, 0.7); + border-radius: 50%; + text-align: center; + + &:hover .help__tooltip-content { + opacity: 1; + visibility: visible; + } + + &-content { + opacity: 0; + visibility: hidden; + width: 15rem; + position: absolute; + bottom: 150%; + left: 30%; + background-color: #151932; + font-size: 1.4rem; + color: #fff; + text-align: center; + border-radius: 6px; + padding: 1rem; + margin-left: -6.5rem; + z-index: 1; + transition: visibility 200ms, opacity 200ms ease-in-out; + + h4 { margin-bottom: 0.8rem; } + + ul { + list-style: none; + + li:nth-child(even) { margin-bottom: 0.8rem; } + } + + &::after { + content: ''; + position: absolute; + top: 100%; + left: 50%; + margin-left: -10px; + border-width: 10px; + border-style: solid; + border-color: #151932 transparent transparent transparent; + } + } + + img { + opacity: 0.6; + cursor: pointer; + } +} + +@media screen and (min-width: 320px) and (max-width: 480px) { + main { transform: scale(0.8); } + + body .modes { font-size: 1.5rem; } +} diff --git a/assets/css/styling.css b/assets/css/styling.css new file mode 100755 index 0000000..8c4bef5 --- /dev/null +++ b/assets/css/styling.css @@ -0,0 +1,133 @@ +*::before, +*::after, +* { + margin: 0; + padding: 0; + -webkit-box-sizing: inherit; + box-sizing: inherit; +} +html { + -webkit-box-sizing: border-box; + box-sizing: border-box; + font-size: 62.5%; +} +body { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: space-evenly; + -ms-flex-pack: space-evenly; + justify-content: space-evenly; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + min-height: 90vh; + font-family: "Poppins", sans-serif; + 2background-color: #1e2140; + color: white; +} +body .main-heading { + font-size: 3.2rem; + font-weight: 500; +} +body main { + width: 40rem; + height: 40rem; + border-radius: 50%; + text-align: center; +} +body .modes { + font-size: 1.8rem; + padding: 1.6rem 1rem; + 2background: #151932; + border-radius: 10rem; +} +body .modes a { + margin-right: 2em; + text-decoration: none; + font-weight: 500; + color: #484c67; + -webkit-transition: all 300ms ease-out; + transition: all 300ms ease-out; +} + +body .modes a.active { + + padding: 0.5em 1em; + + border-radius: 50px; + + background-color: hotpink; + + color: #1c2244; + +} + +body .modes a:last-child { + margin-right: 0; +} +body .get-started { + background: royalblue; + padding: 1.2rem 2rem; + border-radius: 0.4rem; + font-size: 1.8rem; + margin-top: 2rem; +} +body .pomodoro { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + width: 100%; + height: 100%; + position: relative; + margin: 2.5rem 0; + text-align: center; + border-radius: 50%; + 23background: #151932; + -webkit-box-shadow: 50px 50px 82px #0e1021, -50px -50px 82px #1c2244; + box-shadow: 50px 50px 82px #0e1021, -50px -50px 82px #1c2244; +} +body .pomodoro::before { + content: ""; + position: absolute; + border: 10px solid hotpink; + border-radius: 50%; + width: 35rem; + height: 35rem; +} +body .pomodoro__time { + font-size: 7rem; + font-weight: 500; +} +body .pomodoro__state { + font-size: 2rem; + margin-top: 1em; + padding-left: 1em; + letter-spacing: 1em; + text-transform: uppercase; +} + +@media screen and (min-width: 320px) and (max-width: 480px) { + main { + -webkit-transform: scale(0.8); + transform: scale(0.8); + } + body .modes { + font-size: 1.5rem; + } +} +/*# sourceMappingURL=style.css.map */ diff --git a/assets/question.svg b/assets/question.svg new file mode 100755 index 0000000..00d22d0 --- /dev/null +++ b/assets/question.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/sounds/alarm.mp3 b/assets/sounds/alarm.mp3 new file mode 100755 index 0000000..b32e1f2 Binary files /dev/null and b/assets/sounds/alarm.mp3 differ diff --git a/assets/sounds/short-alarm-clock-sound.mp3 b/assets/sounds/short-alarm-clock-sound.mp3 new file mode 100755 index 0000000..b32e1f2 Binary files /dev/null and b/assets/sounds/short-alarm-clock-sound.mp3 differ diff --git a/cascade.bash b/cascade.bash new file mode 100755 index 0000000..e69de29 diff --git a/compose.bash b/compose.bash new file mode 100755 index 0000000..8a61369 --- /dev/null +++ b/compose.bash @@ -0,0 +1,19 @@ +#!/bin/bash + +## + +reset + +clear + +## + +set -e + +set -x + +## + +docker compose down --remove-orphans + +docker compose up --build -d diff --git a/compose.yaml b/compose.yaml new file mode 100755 index 0000000..ad7e3bc --- /dev/null +++ b/compose.yaml @@ -0,0 +1,20 @@ + +services: + + clocks.softwareshinobi.digital: + + container_name: clocks.softwareshinobi.digital + + image: softwareshinobi/clocks.softwareshinobi.digital + + build: + + context: . + + dockerfile: Dockerfile + + restart: unless-stopped + + ports: + + - "8080:80" diff --git a/cover.png b/cover.png new file mode 100755 index 0000000..1723a39 Binary files /dev/null and b/cover.png differ diff --git a/index.html b/index.html new file mode 100755 index 0000000..fef6408 --- /dev/null +++ b/index.html @@ -0,0 +1,66 @@ + + + + +
+ + + + + + + + + + + + + +