An attempt to rebase leftypol software on vichan.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

77 lines
1.8 KiB

<script src='{{ root }}main.js'></script>
<script src='{{ root }}js/jquery.min.js'></script>
<script src='{{ root }}js/mobile-style.js'></script>
<script src="{{ root }}js/chartist/chartist.min.js"></script>
<link rel='stylesheet' href='{{ root }}stylesheets/chartist/chartist.min.css'>
{% if (mod) or (public_hourly) %}
<h2>Hourly Statistics</h2>
<section>
<div class="ct-chart" id="hourly"></div>
</section>
{% endif %}
<h2>Weekly Statistics (for this and previous week)</h2>
<section>
<div class="ct-chart" id="week"></div>
</section>
<h2>View Board Specific Stats</h2>
<section>
{% if mod %}
<a href="?/statistics">[Full Statistics]</a>
{% for board in boards %}
<a href="?/{{board.uri}}/statistics">[{{board.uri}}]</a>
{% endfor %}
{% else %}
<a href="{{ config.root }}/{{ stat_filename }}">[Full Statistics]</a>
{% for board in boards %}
<a href="{{ config.root }}/{{ board.uri }}/{{ stat_filename }}">[{{board.uri}}]</a>
{% endfor %}
{% endif %}
</section>
<script type="text/javascript">{% raw %}
{% endraw %}{% if (mod) or (public_hourly) %}{% raw %}
var data_24h = {
labels: [ "AM", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11",
"PM", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11" ],
series: [
[{% endraw %}{{ statistics_24h }}{% raw %}]
]
};
var options_24h = {
width: 800,
height: 300
};
new Chartist.Line('#hourly', data_24h, options_24h);
{% endraw %}{% endif %}{% raw %}
var data_week = {
labels: [{% endraw %}{{ statistics_week_labels }}{% raw %}],
series: [
[{% endraw %}{{ statistics_week_past }}{% raw %}],
[{% endraw %}{{ statistics_week }}{% raw %}]
]
};
var options_week = {
width: 800,
height: 300,
seriesBarDistance: 10,
reverseData: true,
horizontalBars: true,
axisY: {
offset: 70
}
};
new Chartist.Bar('#week', data_week, options_week);
{% endraw %}</script>