mirror of
https://github.com/captn3m0/plugo.git
synced 2024-09-20 06:57:14 +00:00
74 lines
2.7 KiB
HTML
74 lines
2.7 KiB
HTML
---
|
|
layout: default
|
|
---
|
|
|
|
{{content}}
|
|
|
|
{% assign zeroPowerBankLocations = 0 %}
|
|
<table id="plugo-data">
|
|
<thead>
|
|
<tr>
|
|
<th>Address</th>
|
|
<th>Location Type</th>
|
|
<th><span title="Number of Powerbanks">Count</span></th>
|
|
<th>Date Added</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% assign locations = site.data.plugo|sort:'state' %}
|
|
{% assign total = 0 %}
|
|
{% for row in locations %}
|
|
<tr>
|
|
{% assign state_lower_case = row.state|downcase %}
|
|
<!-- <td>{{site.data.city[city_lower_case] | default:row.city}}, {{site.data.state[state_lower_case] | default: row.state}}</td> -->
|
|
{% assign city_lower_case = row.city|downcase %}
|
|
<td>
|
|
{{row.name}}<br>
|
|
{% if row.floor!="NA"%}{{row.floor}}, {%endif %}
|
|
{% assign address = row.address %}
|
|
{% for mapping in site.data.city %}
|
|
{% assign old=mapping[0] %}
|
|
{% assign new=mapping[1] %}
|
|
{% assign address = address|replace:old,new %}
|
|
{% endfor %}
|
|
{{address}}
|
|
<br>
|
|
{% assign w=row.website|strip %}
|
|
{% if w!="" %}<br><a href="{% if w contains 'http' %}{%else%}http://{%endif%}{{w}}" title="Website for {{row.name|strip}}">🔗</a>{%endif%}
|
|
<a href="geo:{{row.lat}},{{row.lng}};z=19" title='Open in Maps Application'>🗺</a>
|
|
{%comment%}8047112182 is Plugo's office number{%endcomment%}
|
|
{% if row.mobile %}{%unless row.mobile contains '8047112182' %} <a href="tel:{{row.mobile| strip}}" title="Link to call {{row.name | strip}}">📞</a>{%endunless%}{%endif%}
|
|
</td>
|
|
<td>{{row.business}}</td>
|
|
<td>{{row.totalAvailablePowerbanks}}</td>
|
|
{% if row.totalAvailablePowerbanks == 0 %}
|
|
{% assign zeroPowerBankLocations = zeroPowerBankLocations | plus:1 %}
|
|
{% endif %}
|
|
<td>{{row.createdAt | date_to_string}}</td>
|
|
{% assign total = total|plus:row.totalAvailablePowerbanks %}
|
|
<!-- <td>{%if row.isVisible %}☑{%else%}❌{%endif%}</td> -->
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<h3>Statistics</h3>
|
|
<ul>
|
|
<li>Total Available Powerbanks: {{total}}</li>
|
|
<li>Total Locations: {{locations|size}}</li>
|
|
<li>{{zeroPowerBankLocations}} locations with zero powerbanks</li>
|
|
<li>Last Updated: {{site.time | date: "%Y-%m-%d %H:%M" }} IST</li>
|
|
<li>This page is automatically updated 5 times a day, at roughly 0930, 1230, 1530, 1830, 2130 IST</li>
|
|
</ul>
|
|
|
|
<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js" integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI=" crossorigin="anonymous"></script>
|
|
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.js" integrity="sha256-04C2SeXF6JtsrsX+sFnI+gFdm56VJdhW49hWm4m+0io=" crossorigin="anonymous"></script>
|
|
<script>
|
|
let table = new DataTable('#plugo-data', {
|
|
"paging": false,
|
|
"autoWidth": false,
|
|
"info": false
|
|
});
|
|
</script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/plugo/assets/style.css"> |