mirror of
https://github.com/Mistake35/Cedar-Django.git
synced 2026-07-18 00:21:14 +10:00
Discord video support and more cleaning up
This commit is contained in:
@@ -31,6 +31,10 @@
|
||||
<div class="body post-content">
|
||||
{% if post.yt_vid %}
|
||||
<a href="{% url "main:post-view" post.id %}" class="screenshot-container video"><img height="48" src="https://i.ytimg.com/vi/{{ post.yt_vid }}/default.jpg"></a>
|
||||
{% elif post.discord_vid %}
|
||||
<div class="DiscordCDN-container video">
|
||||
<video class="discord-player" src="{{ post.url }}" controls></video>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if post.drawing %}
|
||||
<p class="post-content-memo"><img src="{{ post.drawing }}" class="post-memo"></p>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
|
||||
{% if user.has_freedom %}
|
||||
<input type="text" class="textarea-line url-form" name="url" placeholder="URL/YT video" maxlength="1024">
|
||||
<input type="text" class="textarea-line url-form" name="url" placeholder="URL/YT/Discord video" maxlength="1024">
|
||||
{% file_button %}
|
||||
{% endif %}
|
||||
|
||||
@@ -66,4 +66,4 @@
|
||||
|
||||
{% if not user.is_active %}
|
||||
<p>Your account has been disabled.</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
</p>
|
||||
{% if post.yt_vid %}
|
||||
<a href="{% url "main:post-view" post.id %}" class="screenshot-container video"><img height="48" src="https://i.ytimg.com/vi/{{ post.yt_vid }}/default.jpg"></a>
|
||||
{% endif %}
|
||||
{% elif post.discord_vid %}
|
||||
<div class="screenshot-container video"><video src="{{ post.url }}" width="50" height="48"></video></div>
|
||||
{% endif %}
|
||||
{% if post.screenshot %}
|
||||
<a href="{% url "main:post-view" post.id %}" class="screenshot-container still-image"><img src="{{ post.screenshot }}"></a>
|
||||
{% endif %}
|
||||
@@ -61,4 +63,4 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -84,6 +84,11 @@
|
||||
|
||||
{% if post.yt_vid %}
|
||||
<div class="screenshot-container video"><iframe class="youtube-player" type="text/html" width="490" height="276" src="https://www.youtube.com/embed/{{ post.yt_vid }}?rel=0&modestbranding=1&iv_load_policy=3" frameborder="0"></iframe></div>
|
||||
{% elif post.discord_vid %}
|
||||
<div class="DiscordCDN-container video">
|
||||
<video class="discord-player" src="{{ post.url }}" controls></video>
|
||||
</div>
|
||||
<a>Discord embedded video</a>
|
||||
{% elif post.url %}
|
||||
<p class="url-link"><a class="link-confirm" href="{{ post.url }}" target="_blank">{{ post.url }}</a></p>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user