add posts graph
This commit is contained in:
parent
e82058d961
commit
ee7004fc42
@ -1,7 +1,8 @@
|
|||||||
{{!
|
{{!
|
||||||
frontpage.mustache -- template for index.html
|
frontpage.mustache -- template for index.html
|
||||||
template parameters:
|
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 )
|
- totalposts ( the number of total posts we have ever seen )
|
||||||
- frontend ( the name of the frontend )
|
- frontend ( the name of the frontend )
|
||||||
- prefix ( the site's prefix )
|
- prefix ( the site's prefix )
|
||||||
@ -36,7 +37,7 @@
|
|||||||
<th> Post per Day </th>
|
<th> Post per Day </th>
|
||||||
<th> Total </th>
|
<th> Total </th>
|
||||||
</tr>
|
</tr>
|
||||||
{{# graph}}
|
{{# boardgraph}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{prefix}}{{Board}}-0.html">{{Board}}</a>
|
<a href="{{prefix}}{{Board}}-0.html">{{Board}}</a>
|
||||||
@ -51,10 +52,11 @@
|
|||||||
{{All}}
|
{{All}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/ graph}}
|
{{/ boardgraph}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
{{{postgraph.Render}}}
|
||||||
</div>
|
</div>
|
||||||
</center>
|
</center>
|
||||||
</body>
|
</body>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
- prefix ( the site prefix )
|
- prefix ( the site prefix )
|
||||||
- mod_prefix ( the prefix to the mod panel, could be something like https://mod.site.tld/ or /mod/ )
|
- 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 )
|
- message ( the message returned from the login attempt )
|
||||||
- fail ( present if the login failed )
|
- fail ( present if the login failed ) // not yet added
|
||||||
}}
|
}}
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
26
contrib/templates/default/posts_graph.mustache
Normal file
26
contrib/templates/default/posts_graph.mustache
Normal 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>
|
Reference in New Issue
Block a user