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>
|
||||
Reference in New Issue
Block a user