Showing 1 changed files with 63 additions and 29 deletions
+63 -29
index.php
... ...
@@ -8,36 +8,66 @@
8 8
   <link rel="shortcut icon" href="favicon.png">
9 9
   <link rel="icon" type="image/png" href="favicon.png" sizes="16x16">
10 10
   <link rel="icon" type="image/png" href="favicon.png" sizes="32x32">
11
-  <style>
12
-  [class*="maps-"],
13
-  .maps
14
-  {
15
-    position:absolute;
16
-    top: 20px;
17
-    left: 10px;
18
-    z-index: 1;
19
-    /*width: 853; height: 480px;*/
20
-    width: 80%;
21
-  }
22
-  .maps-0 {opacity: 1;filter: grayscale(0);}
23
-  .maps-1 {opacity: 0.9;filter: grayscale(20);}
24
-  .maps-2 {opacity: 0.8;filter: grayscale(30);}
25
-  .maps-3 {opacity: 0,7;filter: grayscale(40);}
26
-  .maps-4 {opacity: 0.6;filter: grayscale(50);}
27
-  .maps-5 {opacity: 0.5;filter: grayscale(60);}
28
-  .maps-6 {opacity: 0.4;filter: grayscale(70);}
29
-  .maps-7 {opacity: 0.3;filter: grayscale(80);}
30
-  .maps-8 {opacity: 0.2;filter: grayscale(90);}
31
-  .maps-9 {opacity: 0.1;filter: grayscale(100);}
32
-  .icon {
33
-    font-size: 0.7em;
34
-    font-family: "Lucida Sans", sans-serif;
35
-  }
36
-  </style>
11
+<style>
12
+* {
13
+  box-sizing: border-box;
14
+}
15
+a:link { color: #5b7e96; }
16
+a:visited { color: #5b7e96; }
17
+a:hover { color: #ccc; }
18
+
19
+.holder {
20
+  width: 80%;
21
+}
22
+.legend {
23
+  /* Nothing Yet */
24
+}
25
+.map {
26
+  /* Nothing Yet */
27
+}
28
+
29
+
30
+[class*="maps-"],
31
+.maps
32
+{
33
+  display:inline;
34
+  position:absolute;
35
+  z-index: 1;
36
+  /*width: 853; height: 480px;*/
37
+  width: inherit;
38
+}
39
+
40
+.maps-0 {opacity: 1;filter: grayscale(0);}
41
+.maps-1 {opacity: 0.9;filter: grayscale(20);}
42
+.maps-2 {opacity: 0.8;filter: grayscale(30);}
43
+.maps-3 {opacity: 0,7;filter: grayscale(40);}
44
+.maps-4 {opacity: 0.6;filter: grayscale(50);}
45
+.maps-5 {opacity: 0.5;filter: grayscale(60);}
46
+.maps-6 {opacity: 0.4;filter: grayscale(70);}
47
+.maps-7 {opacity: 0.3;filter: grayscale(80);}
48
+.maps-8 {opacity: 0.2;filter: grayscale(90);}
49
+.maps-9 {opacity: 0.1;filter: grayscale(100);}
50
+.icon {
51
+  font-size: 0.7em;
52
+  font-family: "Lucida Sans", sans-serif;
53
+}
54
+
55
+.legend {
56
+  position:absolute;
57
+  width: 40%;
58
+  bottom: 1%;
59
+  left: 8px;
60
+  z-index: 1;
61
+  opacity: 0.7;
62
+  margin: auto;
63
+}
64
+</style>
65
+
37 66
 </head>
38 67
 <body>
68
+<div class="icon">Icon made by <a href="//www.flaticon.com/authors/smashicons">Smashicons</a> from <a href="//www.flaticon.com">www.flaticon.com</a></div>
69
+<div class="holder map">
39 70
 <img src="https://www.nea.gov.sg/assets/images/map/base-853.png" class="maps" >
40
-<!-- <img src="https://www.nea.gov.sg/assets/images/map/Landmarks.png" class="fishes" > -->
41 71
 <img src="https://www.nea.gov.sg/assets/images/map/SG-Township.png" class="maps" >
42 72
 <?php
43 73
 $currDate = time();
... ...
@@ -56,10 +86,14 @@ for($i=$countImg;$i>=$iStart;$i--) {
56 86
   $classIdx=$i-$iStart;
57 87
   if($classIdx > 9) $classIdx=9;
58 88
   echo "<img src=\"$urlImg\" class=\"maps-$classIdx\">".PHP_EOL;
59
-  //echo $urlImg."<br>".PHP_EOL;  
60 89
 }
61 90
 ?>
62
-<div class="icon">Icon made by <a href="//www.flaticon.com/authors/smashicons">Smashicons</a> from <a href="//www.flaticon.com">www.flaticon.com</a></div>
91
+</div><!-- ./map-holder -->
92
+<div class="holder legend">
93
+  <div class="centered">
94
+    <img class="legend-img" src="https://www.nea.gov.sg/assets/images/temp/rain-legend.jpg">
95
+  </div><!-- ./centered -->
96
+</div><!-- ./legend-holder -->
63 97
 </body>
64 98
 </html>
65 99