Mustache-based templating engine
This commit is contained in:
55
templates/main.html
Normal file
55
templates/main.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>{{title}} - {{index}}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="./style.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
|
||||
{{& header}}
|
||||
</header>
|
||||
<main>
|
||||
|
||||
{{#sections}}
|
||||
<section id="{{index}}">
|
||||
|
||||
{{#post.images}}
|
||||
<a href="{{& .}}"> <figure> <img src="{{& .}}" loading="lazy"></img> </figure> </a>
|
||||
{{/post.images}}
|
||||
<details>
|
||||
|
||||
<summary><b>{{post.source.displayName}} ({{post.source.type}})</b> {{date.month}}.{{date.day}}.{{date.year}} <a href="{{& post.link}}">open</a></summary>
|
||||
<ul>
|
||||
|
||||
{{#post.title}}
|
||||
<li> <b>title</b> {{.}} </li>
|
||||
{{/post.title}}
|
||||
{{#categories}}
|
||||
<li> <b>categories</b> {{#entries}}<mark>{{.}}</mark>, {{/entries}}<mark>{{final}}</mark> </li>
|
||||
{{/categories}}
|
||||
<li> <b>source</b> <a href="{{& post.source.hostname}}">{{post.source.hostname}}</a> </li>
|
||||
{{#occurances}}
|
||||
<li> <b>lists</b> {{#entries}}{{> occurance-link}} {{/entries}}{{#final}}{{> occurance-link}}{{/final}} </li>
|
||||
{{/occurances}}
|
||||
|
||||
</ul>
|
||||
|
||||
</details>
|
||||
|
||||
</section>
|
||||
<hr>
|
||||
{{/sections}}
|
||||
|
||||
</main>
|
||||
<footer>
|
||||
<a href="{{& lastPageLink}}">next</a>
|
||||
|
||||
{{& footer}}
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1
templates/nav-link.html
Normal file
1
templates/nav-link.html
Normal file
@@ -0,0 +1 @@
|
||||
<a href="{{indexFilename}}">{{displayName}}</a>{{#errored}} (errored){{/errored}}{{^errored}}{{#empty}} (empty){{/empty}}{{/errored}}
|
||||
30
templates/nav.html
Normal file
30
templates/nav.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<details>
|
||||
|
||||
<summary>Feeds</summary>
|
||||
<section>
|
||||
|
||||
<ul>
|
||||
|
||||
{{#feeds}}
|
||||
{{#entries}}{{> nav-link}} {{/entries}}{{#final}}{{> nav-link}}{{/final}}
|
||||
{{/feeds}}
|
||||
|
||||
</ul>
|
||||
<hr>
|
||||
<ul>
|
||||
|
||||
{{#sourceTypes}}
|
||||
<li>
|
||||
|
||||
<b>{{final.type}}</b><br>
|
||||
{{#entries}}{{> nav-link}} {{/entries}}{{#final}}{{> nav-link}}{{/final}}
|
||||
|
||||
</li>
|
||||
{{/sourceTypes}}
|
||||
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
</details>
|
||||
<hr>
|
||||
1
templates/occurance-link.html
Normal file
1
templates/occurance-link.html
Normal file
@@ -0,0 +1 @@
|
||||
<a href="{{page.filename}}#{{index}}">{{list.displayName}}</a>
|
||||
Reference in New Issue
Block a user