2018-04-15 21:13:20 +02:00
|
|
|
<!-- {#
|
|
|
|
This template is shared by the new thread, reply and post-editing pages.
|
|
|
|
|
|
|
|
The main display differences between the different editing styles are the
|
|
|
|
headline of the page ("Submit new thread", "Reply to thread", "Edit post")
|
|
|
|
and whether or not the subject line field is displayed in the input form.
|
|
|
|
|
|
|
|
Every one of these pages can have a variable length list of alerts submitted
|
|
|
|
into the template, which will be rendered as Boostrap alert boxes above the
|
|
|
|
user input form.
|
|
|
|
#} -->
|
|
|
|
|
|
|
|
<!doctype html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
2018-05-21 15:10:13 +02:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
|
|
|
<title>Converse: Post</title>
|
|
|
|
|
|
|
|
<!-- TODO -->
|
|
|
|
<meta http-equiv="Content-Security-Policy" content="script-src https://code.getmdl.io 'self';">
|
|
|
|
<!-- <link rel="shortcut icon" href="images/favicon.png"> -->
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu">
|
|
|
|
<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">
|
2018-04-15 21:13:20 +02:00
|
|
|
</head>
|
2018-05-21 15:10:13 +02:00
|
|
|
<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-layout__header--scroll mdl-color--primary-dark">
|
|
|
|
<div class="mdl-layout__header-row">
|
|
|
|
<a href="/" class="mdl-layout-title mdl-color-text--blue-grey-50 cvs-title">
|
2018-04-15 21:13:20 +02:00
|
|
|
{% if mode == "NewThread" %}
|
2018-05-21 15:10:13 +02:00
|
|
|
Converse: Submit new thread
|
2018-04-15 21:13:20 +02:00
|
|
|
{% elif mode == "PostReply" %}
|
2018-05-21 15:10:13 +02:00
|
|
|
Converse: Reply to thread
|
2018-04-15 21:13:20 +02:00
|
|
|
{% elif mode == "EditPost" %}
|
2018-05-21 15:10:13 +02:00
|
|
|
Converse: Edit post
|
2018-04-15 21:13:20 +02:00
|
|
|
{% endif %}
|
2018-05-21 15:10:13 +02:00
|
|
|
</a>
|
|
|
|
<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 mdl-grid">
|
|
|
|
<div class="mdl-card mdl-shadow--2dp mdl-cell--8-col">
|
2018-04-15 21:13:20 +02:00
|
|
|
{% if mode == "NewThread" %}
|
2018-05-21 15:10:13 +02:00
|
|
|
<form action="/thread/submit" method="post">
|
|
|
|
{% elif mode == "PostReply" %}
|
|
|
|
<form action="/thread/reply" method="post">
|
|
|
|
{% elif mode == "EditPost" %}
|
|
|
|
<form action="/post/edit" method="post">
|
2018-04-15 21:13:20 +02:00
|
|
|
{% endif %}
|
2018-05-21 15:10:13 +02:00
|
|
|
{% if mode == "PostReply" %}
|
|
|
|
<input type="hidden" id="thread_id" name="thread_id" value="{{ id }}">
|
|
|
|
{% elif mode == "EditPost" %}
|
|
|
|
<input type="hidden" id="thread_id" name="post_id" value="{{ id }}">
|
|
|
|
{% endif %}
|
|
|
|
<div class="mdl-card__supporting-text">
|
|
|
|
{%- for alert in alerts %}
|
|
|
|
<span class="mdl-chip mdl-color--red-200">
|
|
|
|
<span class="mdl-chip__text">{{ alert }} </span>
|
|
|
|
</span>
|
|
|
|
{% endfor -%}
|
2018-04-15 21:13:20 +02:00
|
|
|
|
2018-05-21 15:10:13 +02:00
|
|
|
{% if mode == "NewThread" %}
|
|
|
|
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-cell--12-col">
|
|
|
|
<input class="mdl-textfield__input" type="text" id="title" name="title" aria-label="thread title" required {% if title %}value="{{ title }}"{% endif %}>
|
|
|
|
<label class="mdl-textfield__label" for="title">Thread title</label>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-cell--12-col">
|
|
|
|
<textarea class="mdl-textfield__input" type="text" rows="25" id="post" name="post" aria-label="post content" required>
|
|
|
|
{%- if post %}{{ post }}{% endif -%}
|
|
|
|
</textarea>
|
|
|
|
<label class="mdl-textfield__label" for="body">Content ...</label>
|
2018-04-15 21:13:20 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-21 15:10:13 +02:00
|
|
|
<div class="mdl-card__actions">
|
|
|
|
<input class="mdl-button mdl-button--raised mdl-button--colored mdl-js-button mdl-js-ripple-effect" type="submit" value="Submit!">
|
2018-04-15 21:13:20 +02:00
|
|
|
</div>
|
2018-05-21 15:10:13 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="mdl-card mdl-shadow--2dp mdl-cell--4-col">
|
|
|
|
<div class="mdl-card__title mdl-card--border">
|
|
|
|
Quick Markdown primer:
|
|
|
|
</div>
|
|
|
|
<div class="mdl-card__supporting-text">
|
|
|
|
<p>
|
|
|
|
Remember that you can use <a href="https://daringfireball.net/projects/markdown/basics"><strong>Markdown</strong></a> when
|
|
|
|
writing your posts:
|
|
|
|
</p>
|
|
|
|
<p><i>*italic text*</i></p>
|
|
|
|
<p><strong>**bold text**</strong></p>
|
|
|
|
<p><s>~strikethrough text~</s></p>
|
|
|
|
<p><code>[link text](https://some.link.com/)</code></p>
|
|
|
|
<p><code>![image text](https://foo.com/thing.jpg)</code></p>
|
|
|
|
<p>Use <code>*</code> or <code>-</code> to enumerate lists.</p>
|
|
|
|
<p>See Markdown documentation for more information!</p>
|
2018-04-15 21:13:20 +02:00
|
|
|
</div>
|
2018-05-21 15:10:13 +02:00
|
|
|
</div>
|
|
|
|
</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-15 21:13:20 +02:00
|
|
|
</div>
|
2018-05-21 15:10:13 +02:00
|
|
|
<script src="https://code.getmdl.io/1.3.0/material.min.js"></script>
|
2018-04-15 21:13:20 +02:00
|
|
|
</body>
|
|
|
|
</html>
|