First Commit

This commit is contained in:
mrtoine 2025-09-12 11:11:44 +02:00
commit ce0758fbbb
496 changed files with 52062 additions and 0 deletions

37
templates/posts/post.html Executable file
View file

@ -0,0 +1,37 @@
{% extends 'layout.html' %}
{% load bbcode_tags %}
{% block content %}
<div class="container">
<h2>{{ post.title }}</h2>
{% if post.parent %}
{% if subposts %}
<div class="postmenu">
<div class="header">Menu</div>
<div class="body">
<ul>
{% for subpost in subposts %}
<li><a href="{% url 'view_post' subpost.slug %}">{{ subpost.title }}</a></li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% else %}
{% if post.post_parent %}
<ul class="breadcrumbs">
<li><a href="{% url 'view_post' post.post_parent.slug %}">{{ post.post_parent.title }}</a> »</li>
<li>{{ post.title }}</li>
</ul>
{% endif %}
{% endif %}
{% if post.type == 'news' %}
<div style="float:left;margin:5px"><img src="/media/{{ post.image }}" style="max-width: 200px;" alt="{{ post.title }}"></div>
{% endif %}
<p>{{ post.content|bbcode|safe|linebreaksbr }}</p>
{% if post.type == 'news' %}
<p style="text-align: center;"><a href="/{{ post.forum_link }}" class="btn btn-default">Participer au sujet sur le forum</a></p>
{% endif %}
<small>Article créer le {{ post.created }} par <a href="{% url 'profile' post.author.id %}" class="{{ request.user.username_decoration }}">{{ post.author.username }}</a></small>
</div>
{% endblock %}