-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeditate.html
143 lines (124 loc) · 3.74 KB
/
meditate.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html>
<head>
<title>Mediheal - Peace out</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="shortcut-icon" type="x-image/icon" href="favicon.ico">
<link rel="icon" type="x-image/icon" href="favicon.ico">
</head>
<style>
body{
padding: 0;
margin: 0;
background: rgb(255, 186, 108);
}
.bg{
width: 100%;
height: auto;
color: #fff;
margin: 30px auto;
text-align: center;
align-items: center;
justify-content: center;
}
h2{
text-align: center;
color: #fff;
margin-bottom: 60px;
}
button{
background-color: #fff;
border-style: solid;
border-width: 3px;
border-color: #fff;
color: #964fd8;
border-radius: 10px;
margin-right: 20px;
font-size: 20px;
}
button:hover{
background-color: #fff;
border: solid 1px #fff;
color: #00e29f;
}
#seconds, #tens, p{
font-size: 50;
font-weight: 500px;
}
</style>
<body>
<audio id="music" src="audio.mp3" loop="true" hidden="true"></audio>
<a href="mood.html"><i class="fa fa-arrow-circle-left fa-3x" style="color: white;margin-top: 20px; margin-left: 20px;"></i></a>
<div class="bg">
<h2>Take a deep breath,have a relaxing posture and let the flow of time begin</h2>
<!--<img src="man.png">-->
<img src="timer.png">
<!--<img src="woman.png">-->
<p style="font-size: 30px;"><span id="seconds">00</span> : <span id="tens">00</span></p>
<button id="start">Start</button>
<button id="stop">Stop</button>
<button id="reset">Reset</button>
</div>
<img src="chakra.jpg" width="100%">
<script type="text/javascript" src="meditimer.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#start").on('click',function(){
$("#music")[0].play();
});
$("#stop").on('click',function(){
$("#music")[0].pause();
});
});
</script>
<!--<script type="text/javascript">
window.onload = function () {
var seconds = 00;
var tens = 00;
var appendTens = document.getElementById("tens")
var appendSeconds = document.getElementById("seconds")
var buttonStart = document.getElementById('start');
var buttonStop = document.getElementById('stop');
var buttonReset = document.getElementById('reset');
var Interval ;
buttonStart.onclick = function() {
clearInterval(Interval);
Interval = setInterval(startTimer, 10);
}
buttonStop.onclick = function() {
clearInterval(Interval);
}
buttonReset.onclick = function() {
clearInterval(Interval);
tens = "00";
seconds = "00";
appendTens.innerHTML = tens;
appendSeconds.innerHTML = seconds;
}
function startTimer () {
tens++;
if(tens <= 9){
appendTens.innerHTML = "0" + tens;
}
if (tens > 9){
appendTens.innerHTML = tens;
}
if (tens > 99) {
console.log("seconds");
seconds++;
appendSeconds.innerHTML = "0" + seconds;
tens = 0;
appendTens.innerHTML = "0" + 0;
}
if (seconds > 9){
appendSeconds.innerHTML = seconds;
}
}
}
</script>-->
</body>
</html>