2018-04-09 23:37:21 +02:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en">
|
2018-05-21 23:17:34 +02:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
2018-05-22 18:56:22 +02:00
|
|
|
<title>Converse: {{ title }}</title>
|
2018-04-08 18:02:01 +02:00
|
|
|
|
2018-05-21 23:17:34 +02:00
|
|
|
<!-- TODO -->
|
|
|
|
<meta http-equiv="Content-Security-Policy" content="script-src https://code.getmdl.io 'self';">
|
|
|
|
<!-- <link rel="shortcut icon" href="images/favicon.png"> -->
|
2018-04-08 20:20:17 +02:00
|
|
|
|
2018-05-21 23:17:34 +02:00
|
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu">
|
|
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu+Mono">
|
|
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
|
|
|
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.blue_grey-orange.min.css" />
|
|
|
|
<link rel="stylesheet" href="/static/styles.css">
|
|
|
|
<!-- Syntax highlighting for code -->
|
|
|
|
<link rel="stylesheet" href="/static/highlight.css">
|
|
|
|
<style>img { max-width:100%; height:auto; }</style>
|
|
|
|
<script src="/static/highlight.js"></script>
|
|
|
|
</head>
|
|
|
|
<body class="converse mdl-base mdl-color-text--grey-700 mdl-color--grey-100">
|
|
|
|
<div class="mdl-layout mdl-layout--fixed-header mdl-js-layout mdl-color--grey-100">
|
|
|
|
<header class="mdl-layout__header mdl-color--primary-dark">
|
|
|
|
<div class="mdl-layout__header-row">
|
2018-05-22 18:56:22 +02:00
|
|
|
<a href="/" class="mdl-layout-title mdl-color-text--blue-grey-50 cvs-title">Converse: {{ title }}</a>
|
2018-05-21 23:17:34 +02:00
|
|
|
<div class="mdl-layout-spacer"></div>
|
|
|
|
<a href="/">
|
|
|
|
<button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent mdl-js-ripple-effect">
|
|
|
|
Back to index
|
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<main class="mdl-layout__content">
|
|
|
|
{% for post in posts -%}
|
|
|
|
<section id="post-{{ post.id }}" class="section--center mdl-grid mdl-grid--no-spacing">
|
2018-05-22 18:56:22 +02:00
|
|
|
<!-- card to display avatars on desktop -->
|
2018-05-21 23:17:34 +02:00
|
|
|
<div class="mdl-card mdl-shadow--2dp mdl-cell--2-col mdl-cell--hide-phone mdl-cell--hide-tablet avatar-box">
|
|
|
|
<div class="avatar-card">
|
2018-05-22 10:17:34 +02:00
|
|
|
<img class="desktop-avatar" src="https://www.gravatar.com/avatar/{{ post.author_gravatar }}?d=monsterid&s=160" />
|
|
|
|
<p class="user-name">{{ post.author_name }}</p>
|
2018-05-21 23:17:34 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-22 18:56:22 +02:00
|
|
|
<!-- card for main post content -->
|
2018-05-21 23:17:34 +02:00
|
|
|
<div class="mdl-card mdl-shadow--2dp post-box mdl-cell--10-col">
|
2018-05-22 18:56:22 +02:00
|
|
|
<!-- card section for displaying user & post information on mobile -->
|
2018-05-21 23:17:34 +02:00
|
|
|
<div class="mdl-card__supporting-text mdl-card--border mdl-cell--hide-desktop mdl-color-text--blue-grey-500 mobile-user">
|
|
|
|
<img class="mobile-avatar" src="https://www.gravatar.com/avatar/{{ post.author_gravatar }}?d=monsterid"/>
|
|
|
|
<span> {{ post.author_name }} posted on </span>
|
|
|
|
<a class="mdl-color-text--blue-grey-500 mobile-date" href="/thread/{{ id }}#post-{{ post.id }}">{{ post.posted }}</a>
|
|
|
|
</div>
|
2018-05-22 18:56:22 +02:00
|
|
|
<!-- card section to display post date on desktop -->
|
2018-05-21 23:17:34 +02:00
|
|
|
<div class="mdl-card__menu mdl-cell--hide-phone mdl-cell--hide-tablet">
|
|
|
|
<a class="post-date mdl-color-text--blue-grey-500" href="/thread/{{ id }}#post-{{ post.id }}">{{ post.posted }}</a>
|
|
|
|
</div>
|
2018-05-22 18:56:22 +02:00
|
|
|
<!-- card section for actual post content -->
|
|
|
|
<div class="mdl-card__supporting-text post-box">{{ post.body|safe }}</div>
|
|
|
|
<!-- card section for post actions -->
|
2018-05-21 23:17:34 +02:00
|
|
|
<div class="mdl-card__actions post-actions">
|
|
|
|
<div class="mdl-layout-spacer"></div>
|
2018-04-15 12:38:33 +02:00
|
|
|
|
2018-05-21 23:17:34 +02:00
|
|
|
{% if post.editable %}
|
|
|
|
<a href="/post/{{ post.id }}/edit" class="mdl-button mdl-js-button mdl-button--accent" id="edit-post-{{ post.id }}" aria-label="Edit post">
|
|
|
|
<i class="material-icons">edit</i>
|
|
|
|
<span class="mdl-tooltip mdl-tooltip--top" for="edit-post-{{ post.id }}">Edit post</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
<button class="mdl-button mdl-js-button mdl-button--accent" id="quote-post-{{ post.id }}" aria-label="Quote post" disabled>
|
|
|
|
<i class="material-icons">reply</i>
|
|
|
|
<span class="mdl-tooltip mdl-tooltip--top" for="quote-post-{{ post.id }}">Quote post</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{% endfor %}
|
2018-04-15 12:38:33 +02:00
|
|
|
|
2018-05-22 18:56:22 +02:00
|
|
|
<!-- section for writing a response on the same page -->
|
2018-05-21 23:17:34 +02:00
|
|
|
<section id="post-reply" class="section--center mdl-grid mdl-grid--no-spacing reply-box">
|
|
|
|
<div class="mdl-card mdl-shadow--2dp mdl-cell--12-col">
|
|
|
|
<form id="reply-form" action="/thread/reply" method="post">
|
|
|
|
<input type="hidden" id="thread_id" name="thread_id" value="{{ id }}">
|
2018-04-11 13:25:12 +02:00
|
|
|
|
2018-05-21 23:17:34 +02:00
|
|
|
<div class="mdl-card__supporting-text">
|
|
|
|
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-cell--12-col">
|
|
|
|
<textarea class="mdl-textfield__input" type="text" rows="8" id="post" name="post" aria-label="reply content"></textarea>
|
|
|
|
<label class="mdl-textfield__label" for="post">Write a reply</label>
|
|
|
|
</div>
|
|
|
|
<button class="mdl-button mdl-button--raised mdl-button--primary mdl-js-button mdl-js-ripple-effect" type="submit">
|
|
|
|
Post!
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
<footer class="mdl-mini-footer">
|
|
|
|
<div class="mdl-mini-footer--right-section">
|
|
|
|
<p>Powered by <a href="https://github.com/tazjin/converse">Converse</a></p>
|
|
|
|
</div>
|
|
|
|
</footer>
|
2018-04-09 23:37:21 +02:00
|
|
|
</div>
|
2018-05-21 23:17:34 +02:00
|
|
|
<script src="https://code.getmdl.io/1.3.0/material.min.js"></script>
|
|
|
|
</body>
|
2018-04-08 18:02:01 +02:00
|
|
|
</html>
|