forked from tanner/qotnews
118 lines
3.7 KiB
HTML
118 lines
3.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
|
|
<meta
|
|
name="description"
|
|
content="{{ description }}"
|
|
/>
|
|
<meta content="{{ url }}" name="og:site_name">
|
|
<meta name="robots" content="{{ robots }}">
|
|
|
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
|
<link rel="manifest" href="/site.webmanifest">
|
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
|
|
<meta name="msapplication-TileColor" content="#da532c">
|
|
<meta name="theme-color" content="#000000">
|
|
|
|
<!--
|
|
Notice the use of %PUBLIC_URL% in the tags above.
|
|
It will be replaced with the URL of the `public` folder during the build.
|
|
Only files inside the `public` folder can be referenced from the HTML.
|
|
|
|
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
work correctly both with client-side routing and a non-root public URL.
|
|
Learn how to configure a non-root public URL by running `npm run build`.
|
|
-->
|
|
<title>{{ title }}</title>
|
|
|
|
{% if css_file %}
|
|
<link href="/static/css/{{ css_file }}" rel="stylesheet">
|
|
{% endif %}
|
|
<style>
|
|
html {
|
|
overflow-y: scroll;
|
|
}
|
|
body {
|
|
background: #eeeeee;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="nojs">
|
|
<noscript></noscript>
|
|
</div>
|
|
<div id="root">
|
|
{% if story %}
|
|
<div class="article-container">
|
|
<div class="article">
|
|
<h1>{{ story.title }}</h1>
|
|
|
|
{% if show_comments %}
|
|
<div class="info">
|
|
<a href="/{{ story.id }}">View article</a>
|
|
</div>
|
|
{% else %}
|
|
<div class="info">
|
|
Source: <a class="source" href="{{ story.url or story.link }}">{{ url }}</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="info">
|
|
{{ story.score }} points
|
|
by <a href="{{ story.author_link }}">{{ story.author }}</a>
|
|
on <a href="{{ story.link }}">{{ story.source }}</a> |
|
|
<a href="/{{ story.id }}/c">
|
|
{{ story.num_comments }} comment{{ 's' if story.num_comments != 1 }}
|
|
</a>
|
|
</div>
|
|
|
|
{% if not show_comments and story.text %}
|
|
<div class="story-text">{{ story.text | safe }}</div>
|
|
{% elif show_comments %}
|
|
{% macro render_comment(comment, level) %}
|
|
<div class="comment{% if level > 0 %} lined{% endif %}">
|
|
<div class="info">
|
|
<p>
|
|
{% if comment.author == story.author %}[OP] {% endif %}{{ comment.author or '[Deleted]' }}
|
|
</p>
|
|
</div>
|
|
<div class="text">{{ (comment.text | safe) if comment.text else '<p>[Empty / deleted comment]</p>' }}</div>
|
|
{% for reply in comment.comments %}
|
|
{{ render_comment(reply, level + 1) }}
|
|
{% endfor %}
|
|
</div>
|
|
{% endmacro %}
|
|
<div class="comments">
|
|
{% for comment in story.comments %}{{ render_comment(comment, 0) }}{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class='dot toggleDot'>
|
|
<div class='button'>
|
|
<a href="/{{ story.id }}{{ '/c' if not show_comments else '' }}">
|
|
{{ '' if not show_comments else '' }}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<!--
|
|
This HTML file is a template.
|
|
If you open it directly in the browser, you will see an empty page.
|
|
|
|
You can add webfonts, meta tags, or analytics to this file.
|
|
The build step will place the bundled scripts into the <body> tag.
|
|
|
|
To begin the development, run `npm start` or `yarn start`.
|
|
To create a production bundle, use `npm run build` or `yarn build`.
|
|
-->
|
|
</body>
|
|
</html>
|