Browse Source

Mark offline locations with a smaller more subtile icon.

master
Bernhard Fröhlich 2 years 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 @@
<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>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
viewBox="0 -256 1792 1792"
id="svg3025"
version="1.1"
inkscape:version="0.48.3.1 r9886"
width="100%"
height="100%"
sodipodi:docname="map_marker_font_awesome.svg">
<metadata
id="metadata3035">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3033" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview3031"
showgrid="false"
inkscape:zoom="0.13169643"
inkscape:cx="896"
inkscape:cy="896"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="0"
inkscape:current-layer="svg3025" />
<g
transform="matrix(1,0,0,-1,364.47458,1270.2373)"
id="g3027">
<path
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"
id="path3029"
inkscape:connector-curvature="0"
style="fill:currentColor" />
</g>
</svg>

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

@@ -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>
<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 @@
<span class="oi oi-map-marker" title="icon map-marker" aria-hidden="true"></span>
</a>
</td>
<td><img src="/css/images/tower-{{ loc.status }}.svg" style="height: 2em" alt="{{ loc.status }}"></td>
<td><img src="/images/tower-{{ loc.status }}.svg" style="height: 2em" alt="{{ loc.status }}"></td>
<td><a href="/location/{{ loc.locationid }}" class="btn btn-primary btn-sm">Show</a></td>
</tr>
{% endfor %}

+ 9
- 1
templates/map.js View File

@@ -50,8 +50,16 @@ function initmap() {
}
});

var OfflineIcon = L.Icon.extend({
options: {
iconSize: [ 10, 10 ],
iconAnchor: [ 12, 20 ],
popupAnchor: [ 0, -12 ]
}
});

var onlineIcon = new TowerIcon({iconUrl: '/images/tower-online.svg'});
var offlineIcon = new TowerIcon({iconUrl: '/images/tower-offline.svg'});
var offlineIcon = new OfflineIcon({iconUrl: '/images/tower-offline.svg'});
var tunnelIcon = new TowerIcon({iconUrl: '/images/tower-tunnel.svg'});

{% for loc in locations %}

Loading…
Cancel
Save