-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
158 lines (158 loc) · 13.1 KB
/
index.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="Melodic Avian Hover">
<meta name="keywords" content="Melodic Avian Hover, HTML Image Maps">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.2">
<meta name="author" content="Ravindra Mevada">
<title>Melodic Avian Hover</title>
<link rel="icon" href="src/images/favicon.png" type="image/png">
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
background-image: linear-gradient(#a4e1eb, #bcdc93);
}
.image-container {
max-width: 1000px;
width: 100%;
height: 80%;
overflow: hidden;
}
img {
width: 100%;
height: 100%;
object-fit: contain;
}
.image-container, .image {
-webkit-tap-highlight-color: transparent; /* Removes tap highlight on mobile devices */
outline: none; /* Removes default focus outline */
}
/* Styles for smartphones (min-width: 320px, max-width: 480px) */
@media (min-width: 320px) and (max-width: 480px) {
.image-container {
/* Adjusting max-width for smartphones - Tested on Samsung Galaxy A12 and Responsive Design Mode [Inspect Element (F12) tool] */
max-width: 90%;
}
}
/* Styles for tablets (min-width: 768px, max-width: 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
.image-container {
/* Adjusting max-width for tablets - Tested on Samsung Galaxy Tab A SM-T355Y and Responsive Design Mode [Inspect Element (F12) tool] */
max-width: 90%;
}
}
/* Github corner styling */
.github-corner:hover .octo-arm {
animation: octocat-wave 560ms ease-in-out;
}
@keyframes octocat-wave {
0%, 100% {
transform: rotate(0);
}
20%, 60% {
transform: rotate(-25deg);
}
40%, 80% {
transform: rotate(10deg);
}
}
@media (max-width:500px) {
.github-corner:hover .octo-arm {
animation: none;
}
.github-corner .octo-arm {
animation: octocat-wave 560ms ease-in-out;
}
}
</style>
</head>
<body>
<div class="image-container">
<img src="src/images/background.png" alt="Background" usemap="#image-map">
</div>
<audio id="european-green-woodpecker"><source src="src/sounds/european-green-woodpecker.mp3" type="audio/mpeg"></audio>
<audio id="eurasian-blackcap"><source src="src/sounds/eurasian-blackcap.mp3" type="audio/mpeg"></audio>
<audio id="yellow-legged-gull"><source src="src/sounds/yellow-legged-gull.mp3" type="audio/mpeg"></audio>
<audio id="common-house-martin"><source src="src/sounds/common-house-martin.mp3" type="audio/mpeg"></audio>
<audio id="little-egret"><source src="src/sounds/little-egret.mp3" type="audio/mpeg"></audio>
<audio id="grey-heron"><source src="src/sounds/grey-heron.mp3" type="audio/mpeg"></audio>
<audio id="cattle-egret"><source src="src/sounds/cattle-egret.mp3" type="audio/mpeg"></audio>
<audio id="mallard"><source src="src/sounds/mallard.mp3" type="audio/mpeg"></audio>
<audio id="great-egret"><source src="src/sounds/great-egret.mp3" type="audio/mpeg"></audio>
<audio id="great-cormorant"><source src="src/sounds/great-cormorant.mp3" type="audio/mpeg"></audio>
<audio id="black-crowned-night-heron"><source src="src/sounds/black-crowned-night-heron.mp3" type="audio/mpeg"></audio>
<audio id="common-sandpiper"><source src="src/sounds/common-sandpiper.mp3" type="audio/mpeg"></audio>
<audio id="common-chiffchaff"><source src="src/sounds/common-chiffchaff.mp3" type="audio/mpeg"></audio>
<audio id="short-toed-treecreeper"><source src="src/sounds/short-toed-treecreeper.mp3" type="audio/mpeg"></audio>
<audio id="eurasian-blue-tit"><source src="src/sounds/eurasian-blue-tit.mp3" type="audio/mpeg"></audio>
<audio id="long-tailed-tit"><source src="src/sounds/long-tailed-tit.mp3" type="audio/mpeg"></audio>
<audio id="cettis-warbler"><source src="src/sounds/cettis-warbler.mp3" type="audio/mpeg"></audio>
<audio id="great-tit"><source src="src/sounds/great-tit.mp3" type="audio/mpeg"></audio>
<audio id="barn-swallow"><source src="src/sounds/barn-swallow.mp3" type="audio/mpeg"></audio>
<audio id="eurasian-golden-oriole"><source src="src/sounds/eurasian-golden-oriole.mp3" type="audio/mpeg"></audio>
<audio id="eurasian-wren"><source src="src/sounds/eurasian-wren.mp3" type="audio/mpeg"></audio>
<audio id="european-robin"><source src="src/sounds/european-robin.mp3" type="audio/mpeg"></audio>
<audio id="common-nightingale"><source src="src/sounds/common-nightingale.mp3" type="audio/mpeg"></audio>
<audio id="common-blackbird"><source src="src/sounds/common-blackbird.mp3" type="audio/mpeg"></audio>
<audio id="white-wagtail"><source src="src/sounds/white-wagtail.mp3" type="audio/mpeg"></audio>
<audio id="common-kingfisher"><source src="src/sounds/common-kingfisher.mp3" type="audio/mpeg"></audio>
<audio id="grey-wagtail"><source src="src/sounds/grey-wagtail.mp3" type="audio/mpeg"></audio>
<audio id="little-ringed-plover"><source src="src/sounds/little-ringed-plover.mp3" type="audio/mpeg"></audio>
<audio id="common-moorhen"><source src="src/sounds/common-moorhen.mp3" type="audio/mpeg"></audio>
<!-- Mapping circles on the background image -->
<map name="image-map">
<area shape="circle" coords="93,132,55" title="European Green Woodpecker" alt="European Green Woodpecker" alt="European Green Woodpecker" onmouseover="playSound('european-green-woodpecker')" onmouseout="stopSound('european-green-woodpecker')">
<area shape="circle" coords="192,96,36" title="Eurasian Blackcap" alt="Eurasian Blackcap" onmouseover="playSound('eurasian-blackcap')" onmouseout="stopSound('eurasian-blackcap')">
<area shape="circle" coords="336,48,44" title="Yellow Legged Gull" alt="Yellow Legged Gull" onmouseover="playSound('yellow-legged-gull')" onmouseout="stopSound('yellow-legged-gull')">
<area shape="circle" coords="281,155,50" title="Common House Martin" alt="Common House Martin" onmouseover="playSound('common-house-martin')" onmouseout="stopSound('common-house-martin')">
<area shape="circle" coords="61,288,38" title="Little Egret" alt="Little Egret" onmouseover="playSound('little-egret')" onmouseout="stopSound('little-egret')">
<area shape="circle" coords="147,295,42" title="Grey Heron" alt="Grey Heron" onmouseover="playSound('grey-heron')" onmouseout="stopSound('grey-heron')">
<area shape="circle" coords="355,263,39" title="Cattle Egret" alt="Cattle Egret" onmouseover="playSound('cattle-egret')" onmouseout="stopSound('cattle-egret')">
<area shape="circle" coords="223,353,41" title="Mallard" alt="Mallard" onmouseover="playSound('mallard')" onmouseout="stopSound('mallard')">
<area shape="circle" coords="334,386,48" title="Great Egret" alt="Great Egret" onmouseover="playSound('great-egret')" onmouseout="stopSound('great-egret')">
<area shape="circle" coords="135,478,51" title="Great Cormorant" alt="Great Cormorant" onmouseover="playSound('great-cormorant')" onmouseout="stopSound('great-cormorant')">
<area shape="circle" coords="284,493,45" title="Black Crowned Night Heron" alt="Black Crowned Night Heron" onmouseover="playSound('black-crowned-night-heron')" onmouseout="stopSound('black-crowned-night-heron')">
<area shape="circle" coords="476,472,37" title="Common Sandpiper" alt="Common Sandpiper" onmouseover="playSound('common-sandpiper')" onmouseout="stopSound('common-sandpiper')">
<area shape="circle" coords="473,169,38" title="Common Chiffchaff" alt="Common Chiffchaff" onmouseover="playSound('common-chiffchaff')" onmouseout="stopSound('common-chiffchaff')">
<area shape="circle" coords="505,100,29" title="Short Toed Treecreeper" alt="Short Toed Treecreeper" onmouseover="playSound('short-toed-treecreeper')" onmouseout="stopSound('short-toed-treecreeper')">
<area shape="circle" coords="574,82,38" title="Eurasian Blue Tit" alt="Eurasian Blue Tit" onmouseover="playSound('eurasian-blue-tit')" onmouseout="stopSound('eurasian-blue-tit')">
<area shape="circle" coords="697,40,36" title="Long Tailed Tit" alt="Long Tailed Tit" onmouseover="playSound('long-tailed-tit')" onmouseout="stopSound('long-tailed-tit')">
<area shape="circle" coords="875,39,39" title="Cettis Warbler" alt="Cettis Warbler" onmouseover="playSound('cettis-warbler')" onmouseout="stopSound('cettis-warbler')">
<area shape="circle" coords="630,136,28" title="Great Tit" alt="Great Tit" onmouseover="playSound('great-tit')" onmouseout="stopSound('great-tit')">
<area shape="circle" coords="702,111,32" title="Barn Swallow" alt="Barn Swallow" onmouseover="playSound('barn-swallow')" onmouseout="stopSound('barn-swallow')">
<area shape="circle" coords="699,194,35" title="Eurasian Golden Oriole" alt="Eurasian Golden Oriole" onmouseover="playSound('eurasian-golden-oriole')" onmouseout="stopSound('eurasian-golden-oriole')">
<area shape="circle" coords="889,163,31" title="Eurasian Wren" alt="Eurasian Wren" onmouseover="playSound('eurasian-wren')" onmouseout="stopSound('eurasian-wren')">
<area shape="circle" coords="517,286,33" title="European Robin" alt="European Robin" onmouseover="playSound('european-robin')" onmouseout="stopSound('european-robin')">
<area shape="circle" coords="631,278,44" title="Common Nightingale" alt="Common Nightingale" onmouseover="playSound('common-nightingale')" onmouseout="stopSound('common-nightingale')">
<area shape="circle" coords="761,283,37" title="Common Blackbird" alt="Common Blackbird" onmouseover="playSound('common-blackbird')" onmouseout="stopSound('common-blackbird')">
<area shape="circle" coords="585,365,34" title="White Wagtail" alt="White Wagtail" onmouseover="playSound('white-wagtail')" onmouseout="stopSound('white-wagtail')">
<area shape="circle" coords="896,322,35" title="Common Kingfisher" alt="Common Kingfisher" onmouseover="playSound('common-kingfisher')" onmouseout="stopSound('common-kingfisher')">
<area shape="circle" coords="798,381,37" title="Grey Wagtail" alt="Grey Wagtail" onmouseover="playSound('grey-wagtail')" onmouseout="stopSound('grey-wagtail')">
<area shape="circle" coords="883,411,41" title="Little Ringed Plover" alt="Little Ringed Plover" onmouseover="playSound('little-ringed-plover')" onmouseout="stopSound('little-ringed-plover')">
<area shape="circle" coords="670,489,40" title="Common Moorhen" alt="Common Moorhen" onmouseover="playSound('common-moorhen')" onmouseout="stopSound('common-moorhen')">
</map>
<!-- Github corner -->
<a href="https://github.com/jagatpandya/melodic-avian-hover-image-maps-fun-project" class="github-corner" aria-label="View source on GitHub">
<svg width="80" height="80" viewBox="0 0 250 250" style="fill: #151513; color: #fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true">
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>
</svg>
</a>
<script>
function playSound(soundObj) {
document.getElementById(soundObj).play();
}
function stopSound(soundObj) {
document.getElementById(soundObj).pause();
document.getElementById(soundObj).currentTime = 0;
}
</script>
</body>
</html>