Add rudimentary script for generating the forum archive.

This commit is contained in:
2020-08-10 01:21:33 -05:00
parent 7026bc2b34
commit f3b0319d5a
15 changed files with 295 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
{{>header}}
{{#categories}}
<h2 class="category-name">{{name}}</h2>
{{>child_boards}}
{{/categories}}
{{>footer}}

View File

@@ -0,0 +1,4 @@
<html>
<head><meta http-equiv="refresh" content="0; url=page-0.html" /></head>
<body><p><a href="page-0.html">Redirect</a></p></body>
</html>

View File

@@ -0,0 +1,7 @@
{{#children}}
<li class="board">
<div class="name"><a href="board-{{id_board}}">{{name}}</a></div>
<div class="description">{{description}}</div>
{{>child_boards}}
</li>
{{/children}}

View File

@@ -0,0 +1,2 @@
</body>
</html>

View File

@@ -0,0 +1,7 @@
<html>
<head>
<title>Glitch City Laboratories Archives{{title}}</title>
<link href="{{base}}style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1><a href="{{base}}">Glitch City Laboratories Archives</a></h1>

View File

@@ -0,0 +1,4 @@
<div class="pagination">
<a class="prev" href="page-{{prev}}.html">Previous Page</a>
<a class="next" href="page-{{next}}.html">Next Page</a>
</div>

16
templates/posts.mustache Normal file
View File

@@ -0,0 +1,16 @@
{{>header}}
<h2><a href="../">{{board.name}}</a></h2>
<h3>{{thread.subject}} - Page {{next}}</h3>
{{>pagination}}
{{#posts}}
<article id="post-{{id_msg}}">
<header>
<h4>{{subject}}</h4>
<div><span class="label">Posted by:</span> {{poster_name}}</div>
<div><span class="label">Date:</span> {{datetime}}</div>
</header>
<section>{{{body}}}</section>
</article>
{{/posts}}
{{>pagination}}
{{>footer}}

View File

@@ -0,0 +1,17 @@
{{>header}}
<h2>{{board.name}}</h2>
<table id="threads">
<tr>
<th>Title</th>
<th>Poster</th>
<th>Date</th>
</tr>
{{#threads}}
<tr>
<td class="thread-subject"><a href="thread-{{id_topic}}">{{subject}}</a></td>
<td class="thread-poster">{{poster_name}}</td>
<td class="thread-date">{{datetime}}</td>
</tr>
{{/threads}}
</table>
{{>footer}}