Archived
1
0

add posts graph

This commit is contained in:
jeff 2015-10-31 07:27:26 -04:00
parent e82058d961
commit ee7004fc42
3 changed files with 32 additions and 4 deletions

View File

@ -1,7 +1,8 @@
{{!
frontpage.mustache -- template for index.html
template parameters:
- graph ( a list of 4 string tuples: (board, posts_per_hour, posts_per_day, total_posts) )
- boardgraph ( a boardPageRows instance, see srnd/model.go )
- postgraph ( a postsGraph instance , see srnd/model.go )
- totalposts ( the number of total posts we have ever seen )
- frontend ( the name of the frontend )
- prefix ( the site's prefix )
@ -36,7 +37,7 @@
<th> Post per Day </th>
<th> Total </th>
</tr>
{{# graph}}
{{# boardgraph}}
<tr>
<td>
<a href="{{prefix}}{{Board}}-0.html">{{Board}}</a>
@ -51,10 +52,11 @@
{{All}}
</td>
</tr>
{{/ graph}}
{{/ boardgraph}}
</tbody>
</table>
</div>
{{{postgraph.Render}}}
</div>
</center>
</body>

View File

@ -4,7 +4,7 @@
- prefix ( the site prefix )
- mod_prefix ( the prefix to the mod panel, could be something like https://mod.site.tld/ or /mod/ )
- message ( the message returned from the login attempt )
- fail ( present if the login failed )
- fail ( present if the login failed ) // not yet added
}}
<html>
<head>

View File

@ -0,0 +1,26 @@
{{!
posts graph.mustache -- post frequence graph
parameters:
* graph - a postsGraph instance (see srnd/model.go)
}}
<div id="posts_graph">
<table>
<thead>
<tr>
<th>Day</th>
<th>Posts</th>
<th></th>
</tr>
</thead>
<tbody>
{{#graph}}
<tr>
<td>{{Day}}</td>
<td>{{Num}}</td>
<td>{{OvercockGraph}}</td>
</tr>
{{/graph}}
</tbody>
</table>
</div>