add posts graph
This commit is contained in:
parent
e82058d961
commit
ee7004fc42
@ -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>
|
||||
|
@ -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>
|
||||
|
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