Browse Source

Mark offline locations with a smaller more subtile icon.

Bernhard Fröhlich 1 year ago
parent
commit
95b5028ec5
4 changed files with 70 additions and 4 deletions
  1. 59
    1
      images/tower-offline.svg
  2. 1
    1
      images/tower-online.svg
  3. 1
    1
      templates/locations.html
  4. 9
    1
      templates/map.js

+ 59
- 1
images/tower-offline.svg View File

@@ -1 +1,59 @@
1
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 48 60" style="enable-background:new 0 0 48 48;" xml:space="preserve"><style type="text/css">.st0{fill:#000000;}</style><g><g><path class="st0" d="M41.6,1.1c-0.7-0.8-2-0.8-2.8-0.1C38,1.8,38,3,38.7,3.8c6.5,6.9,6.5,18.2,0,25.1c-0.7,0.8-0.7,2,0.1,2.8    c0.4,0.4,0.9,0.5,1.3,0.5c0.5,0,1-0.2,1.4-0.6C49.4,23.2,49.4,9.5,41.6,1.1z"/><path class="st0" d="M35.6,7.5c-0.7-0.8-2-0.8-2.8-0.1c-0.8,0.7-0.8,2-0.1,2.8c3.2,3.4,3.2,8.9,0,12.3c-0.7,0.8-0.7,2,0.1,2.8    c0.4,0.4,0.9,0.5,1.3,0.5c0.5,0,1-0.2,1.4-0.6C40.1,20.3,40.1,12.4,35.6,7.5z"/><path class="st0" d="M9.3,3.8C10,3,10,1.8,9.2,1c-0.8-0.7-2-0.7-2.8,0.1c-7.9,8.4-7.9,22,0,30.4c0.4,0.4,0.9,0.6,1.4,0.6    c0.5,0,1-0.2,1.3-0.5c0.8-0.7,0.8-2,0.1-2.8C2.8,22,2.8,10.7,9.3,3.8z"/><path class="st0" d="M15.2,7.4c-0.8-0.7-2-0.7-2.8,0.1c-4.6,4.9-4.6,12.8,0,17.6c0.4,0.4,0.9,0.6,1.4,0.6c0.5,0,1-0.2,1.3-0.5    c0.8-0.7,0.8-2,0.1-2.8c-3.2-3.4-3.2-8.9,0-12.3C16,9.4,16,8.2,15.2,7.4z"/></g><path class="st0" d="M30.9,16.3c0-3.8-3.1-6.9-6.9-6.9s-6.9,3.1-6.9,6.9c0,3.1,2.1,5.7,4.9,6.6v22.6c0,1.1,0.9,2,2,2s2-0.9,2-2   V22.9C28.8,22.1,30.9,19.4,30.9,16.3z"/></g></svg>
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<svg
3
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+   xmlns:cc="http://creativecommons.org/ns#"
5
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+   xmlns:svg="http://www.w3.org/2000/svg"
7
+   xmlns="http://www.w3.org/2000/svg"
8
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
+   viewBox="0 -256 1792 1792"
11
+   id="svg3025"
12
+   version="1.1"
13
+   inkscape:version="0.48.3.1 r9886"
14
+   width="100%"
15
+   height="100%"
16
+   sodipodi:docname="map_marker_font_awesome.svg">
17
+  <metadata
18
+     id="metadata3035">
19
+    <rdf:RDF>
20
+      <cc:Work
21
+         rdf:about="">
22
+        <dc:format>image/svg+xml</dc:format>
23
+        <dc:type
24
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
25
+      </cc:Work>
26
+    </rdf:RDF>
27
+  </metadata>
28
+  <defs
29
+     id="defs3033" />
30
+  <sodipodi:namedview
31
+     pagecolor="#ffffff"
32
+     bordercolor="#666666"
33
+     borderopacity="1"
34
+     objecttolerance="10"
35
+     gridtolerance="10"
36
+     guidetolerance="10"
37
+     inkscape:pageopacity="0"
38
+     inkscape:pageshadow="2"
39
+     inkscape:window-width="640"
40
+     inkscape:window-height="480"
41
+     id="namedview3031"
42
+     showgrid="false"
43
+     inkscape:zoom="0.13169643"
44
+     inkscape:cx="896"
45
+     inkscape:cy="896"
46
+     inkscape:window-x="0"
47
+     inkscape:window-y="25"
48
+     inkscape:window-maximized="0"
49
+     inkscape:current-layer="svg3025" />
50
+  <g
51
+     transform="matrix(1,0,0,-1,364.47458,1270.2373)"
52
+     id="g3027">
53
+    <path
54
+       d="m 768,896 q 0,106 -75,181 -75,75 -181,75 -106,0 -181,-75 -75,-75 -75,-181 0,-106 75,-181 75,-75 181,-75 106,0 181,75 75,75 75,181 z m 256,0 q 0,-109 -33,-179 L 627,-57 q -16,-33 -47.5,-52 -31.5,-19 -67.5,-19 -36,0 -67.5,19 Q 413,-90 398,-57 L 33,717 Q 0,787 0,896 q 0,212 150,362 150,150 362,150 212,0 362,-150 150,-150 150,-362 z"
55
+       id="path3029"
56
+       inkscape:connector-curvature="0"
57
+       style="fill:currentColor" />
58
+  </g>
59
+</svg>

+ 1
- 1
images/tower-online.svg View File

@@ -1 +1 @@
1
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 48 60" style="enable-background:new 0 0 48 48;" xml:space="preserve"><style type="text/css">.st0{fill:#067A29;border: #000000;}</style><g><g><path class="st0" d="M41.6,1.1c-0.7-0.8-2-0.8-2.8-0.1C38,1.8,38,3,38.7,3.8c6.5,6.9,6.5,18.2,0,25.1c-0.7,0.8-0.7,2,0.1,2.8    c0.4,0.4,0.9,0.5,1.3,0.5c0.5,0,1-0.2,1.4-0.6C49.4,23.2,49.4,9.5,41.6,1.1z"/><path class="st0" d="M35.6,7.5c-0.7-0.8-2-0.8-2.8-0.1c-0.8,0.7-0.8,2-0.1,2.8c3.2,3.4,3.2,8.9,0,12.3c-0.7,0.8-0.7,2,0.1,2.8    c0.4,0.4,0.9,0.5,1.3,0.5c0.5,0,1-0.2,1.4-0.6C40.1,20.3,40.1,12.4,35.6,7.5z"/><path class="st0" d="M9.3,3.8C10,3,10,1.8,9.2,1c-0.8-0.7-2-0.7-2.8,0.1c-7.9,8.4-7.9,22,0,30.4c0.4,0.4,0.9,0.6,1.4,0.6    c0.5,0,1-0.2,1.3-0.5c0.8-0.7,0.8-2,0.1-2.8C2.8,22,2.8,10.7,9.3,3.8z"/><path class="st0" d="M15.2,7.4c-0.8-0.7-2-0.7-2.8,0.1c-4.6,4.9-4.6,12.8,0,17.6c0.4,0.4,0.9,0.6,1.4,0.6c0.5,0,1-0.2,1.3-0.5    c0.8-0.7,0.8-2,0.1-2.8c-3.2-3.4-3.2-8.9,0-12.3C16,9.4,16,8.2,15.2,7.4z"/></g><path class="st0" d="M30.9,16.3c0-3.8-3.1-6.9-6.9-6.9s-6.9,3.1-6.9,6.9c0,3.1,2.1,5.7,4.9,6.6v22.6c0,1.1,0.9,2,2,2s2-0.9,2-2   V22.9C28.8,22.1,30.9,19.4,30.9,16.3z"/></g></svg>
1
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 48 60" style="enable-background:new 0 0 48 48;" xml:space="preserve"><style type="text/css">.st0{fill:#000000;}</style><g><g><path class="st0" d="M41.6,1.1c-0.7-0.8-2-0.8-2.8-0.1C38,1.8,38,3,38.7,3.8c6.5,6.9,6.5,18.2,0,25.1c-0.7,0.8-0.7,2,0.1,2.8    c0.4,0.4,0.9,0.5,1.3,0.5c0.5,0,1-0.2,1.4-0.6C49.4,23.2,49.4,9.5,41.6,1.1z"/><path class="st0" d="M35.6,7.5c-0.7-0.8-2-0.8-2.8-0.1c-0.8,0.7-0.8,2-0.1,2.8c3.2,3.4,3.2,8.9,0,12.3c-0.7,0.8-0.7,2,0.1,2.8    c0.4,0.4,0.9,0.5,1.3,0.5c0.5,0,1-0.2,1.4-0.6C40.1,20.3,40.1,12.4,35.6,7.5z"/><path class="st0" d="M9.3,3.8C10,3,10,1.8,9.2,1c-0.8-0.7-2-0.7-2.8,0.1c-7.9,8.4-7.9,22,0,30.4c0.4,0.4,0.9,0.6,1.4,0.6    c0.5,0,1-0.2,1.3-0.5c0.8-0.7,0.8-2,0.1-2.8C2.8,22,2.8,10.7,9.3,3.8z"/><path class="st0" d="M15.2,7.4c-0.8-0.7-2-0.7-2.8,0.1c-4.6,4.9-4.6,12.8,0,17.6c0.4,0.4,0.9,0.6,1.4,0.6c0.5,0,1-0.2,1.3-0.5    c0.8-0.7,0.8-2,0.1-2.8c-3.2-3.4-3.2-8.9,0-12.3C16,9.4,16,8.2,15.2,7.4z"/></g><path class="st0" d="M30.9,16.3c0-3.8-3.1-6.9-6.9-6.9s-6.9,3.1-6.9,6.9c0,3.1,2.1,5.7,4.9,6.6v22.6c0,1.1,0.9,2,2,2s2-0.9,2-2   V22.9C28.8,22.1,30.9,19.4,30.9,16.3z"/></g></svg>

+ 1
- 1
templates/locations.html View File

@@ -14,7 +14,7 @@
14 14
               <span class="oi oi-map-marker" title="icon map-marker" aria-hidden="true"></span>
15 15
               </a>
16 16
             </td>
17
-            <td><img src="/css/images/tower-{{ loc.status }}.svg" style="height: 2em" alt="{{ loc.status }}"></td>
17
+            <td><img src="/images/tower-{{ loc.status }}.svg" style="height: 2em" alt="{{ loc.status }}"></td>
18 18
             <td><a href="/location/{{ loc.locationid }}" class="btn btn-primary btn-sm">Show</a></td>
19 19
           </tr>
20 20
         {% endfor %}

+ 9
- 1
templates/map.js View File

@@ -50,8 +50,16 @@ function initmap() {
50 50
       }
51 51
    });
52 52
 
53
+   var OfflineIcon = L.Icon.extend({
54
+      options: {
55
+         iconSize: [ 10, 10 ],
56
+         iconAnchor: [ 12, 20 ],
57
+         popupAnchor: [ 0, -12 ]
58
+      }
59
+   });
60
+
53 61
    var onlineIcon = new TowerIcon({iconUrl: '/images/tower-online.svg'});
54
-   var offlineIcon = new TowerIcon({iconUrl: '/images/tower-offline.svg'});
62
+   var offlineIcon = new OfflineIcon({iconUrl: '/images/tower-offline.svg'});
55 63
    var tunnelIcon = new TowerIcon({iconUrl: '/images/tower-tunnel.svg'});
56 64
 
57 65
    {% for loc in locations %}

Loading…
Cancel
Save