mirror of
https://github.com/captn3m0/plugo.git
synced 2024-09-20 06:57:14 +00:00
61 lines
2.0 KiB
HTML
61 lines
2.0 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 id="{{row.id}}">
|
|
<td>
|
|
{%comment%}
|
|
{% 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> -->
|
|
{%endcomment%}
|
|
{% include location.html data=row %}
|
|
</td>
|
|
<td>{{row.business}}</td>
|
|
<td>{{row.totalAvailablePowerbanks}}</td>
|
|
{% if row.totalAvailablePowerbanks == 0 %}
|
|
{% assign zeroPowerBankLocations = zeroPowerBankLocations | plus:1 %}
|
|
{% endif %}
|
|
<td data-sort="{{row.createdAt | date_to_xmlschema}}">{{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"> |