66 lines
2.3 KiB
HTML
66 lines
2.3 KiB
HTML
{% extends "base.html" %}
|
|
{% load static sass_tags compress %}
|
|
{% block head %}
|
|
{% endblock %}
|
|
{% block main %}
|
|
<div class="content">
|
|
</div>
|
|
<form class="add-comment" style="display: none">
|
|
<div class="comment-fields">
|
|
{% csrf_token %}
|
|
<textarea name="text" placeholder="your comment" required></textarea>
|
|
<div class="user">
|
|
{% if request.user.is_anonymous %}
|
|
<div class="user-info">
|
|
<input name="name" type="text" placeholder="your name" required></input>
|
|
<input name="email" type="email" placeholder="your email" required></input>
|
|
</div>
|
|
</div>
|
|
<div class="buttons guest active">
|
|
<button id="add-comment">Add comment as guest</button>
|
|
<button id="login">Login</button>
|
|
</div>
|
|
<div class="buttons login">
|
|
<input name="username" type="text" placeholder="your username" required></input>
|
|
<input name="password" type="password" placeholder="your password" required></input>
|
|
<input name="email" type="email" placeholder="your email" style="display: none"></input>
|
|
<button id="login">Login</button>
|
|
<button id="register">Register</button>
|
|
<div class="error"></div>
|
|
</div>
|
|
{% else %}
|
|
<div class="buttons active">
|
|
<button id="add-comment">Add comment</button>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|
|
{% block end %}
|
|
<script>
|
|
var comments = {{ comments }};
|
|
var user = {{ user }};
|
|
</script>
|
|
{% compress js file m %}
|
|
<script src="/static/js/utils.js"></script>
|
|
<script src="/static/js/api.js"></script>
|
|
<script src="/static/js/icons.js"></script>
|
|
<script src="/static/js/VideoElement.js"></script>
|
|
<script src="/static/js/VideoPlayer.js"></script>
|
|
<script src="/static/js/documents.js"></script>
|
|
<script src="/static/js/edits.js"></script>
|
|
<script src="/static/js/item.js"></script>
|
|
<script src="/static/js/render.js"></script>
|
|
{% endcompress %}
|
|
|
|
<script>
|
|
pandora.url = new URL('{{ item.url|escapejs }}');
|
|
pandora.comment = '{{ item.id | escapejs }}';
|
|
pandora.hostname = pandora.url.hostname
|
|
pandoraURL = `https://${pandora.hostname}`
|
|
</script>
|
|
<script src="/static/js/overwrite.js"></script>
|
|
|
|
<script src="/static/js/main.js"></script>
|
|
<script src="/static/js/comments.js"></script>
|
|
{% endblock %}
|