-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
72 lines (72 loc) · 3.38 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:description" content="The important news, without the toxicity." />
<meta property="og:image" content="static/favicon.svg" />
<link rel="icon" type="image/svg+xml" href="static/favicon.svg" />
<title>{{ settings.siteName }}</title>
<link rel="stylesheet" href="static/style.css">
</head>
<body>
<header class="header">
<h1>detoxed<span class="header-dot">.</span>news</h1>
</header>
<main>
{%- for day in news -%}
<h2 class="day-header">{{ day.date }}</h2>
<section class="day">
{%- for topic in day.topics -%}
<h3 class="topic-header">{{ topic.name }}</h3>
<section class="topic">
{%- for entry in topic.entries -%}
<section class="entry">
<div>
<div>
{%- for entryPart in entry.body -%}
{%- if entryPart.type == "plain" -%}
{{ entryPart.text }}
{%- elsif entryPart.type == "link" -%}
<a class="entry-part-link" href="{{ entryPart.url }}" title="{{ entryPart.title }}" rel="nofollow noopener">{{ entryPart.text }}</a>
{%- endif -%}
{%- endfor -%}
</div>
<div>
{%- for tag in entry.tags -%}
<a class="entry-tag" href="{{ tag.url }}" rel="nofollow noopener">{{ tag.name }}</a>
{%- endfor -%}
</div>
{%- if entry.url -%}
<div class="entry-url">
Source:
<a href="{{ entry.url }}">
{{ entry.sourceName }} <img alt="external link" src="/static/images/external-link-icon.svg" />
</a>
</div>
{%- endif -%}
</div>
{%- if entry.ogMetadata.ogImage.url -%}
<div class="entry-img-container">
<a href="{{ entry.url }}">
<img class="entry-img" alt="source's featured photo" loading="lazy" src="{{ entry.ogMetadata.ogImage.url }}" width="100" />
</a>
</div>
{%- endif -%}
</section>
{%- endfor -%}
</section>
{%- endfor -%}
</section>
{%- endfor -%}
</main>
<footer>
<p>
Text is sourced from <a href="https://en.wikipedia.org/wiki/Portal:Current_events" rel="nofollow noopener">https://en.wikipedia.org/wiki/Portal:Current_events</a> and made available under the <a href="https://creativecommons.org/licenses/by-sa/3.0/" rel="nofollow noopener">Creative Commons Attribution-ShareAlike License</a>.
</p>
<p>
This website is open source. The code is available at <a href="https://github.com/tom-james-watson/detoxed.news" rel="nofollow noopener">https://github.com/tom-james-watson/detoxed.news</a> and is available under the <a href="https://github.com/tom-james-watson/detoxed.news/blob/master/LICENSE.md" rel="nofollow noopener">MIT license</a>.
</p>
</footer>
</body>
</html>