Ajout du style et d'un peut d'affichage pour les topics

J'ai fait mon possible pour que ça rende bien et que le css ne soit pas
trop moche. Il faudra peut-être modifier légèrement l'afichage du
profil, ce dernier est pas assez bien en place à mon goût.
This commit is contained in:
Eragon 2019-12-03 23:13:22 +01:00
parent b5e875e136
commit 134eaa4d58
No known key found for this signature in database
GPG Key ID: 41F8C3FE5948FDAB
3 changed files with 25 additions and 5 deletions

View File

@ -61,3 +61,13 @@ table.topiclist th > td:last-child,
table.topiclist tr > td:last-child {
width: 20%; text-align: center;
}
/* Thread table */
table.thread {
width: 100%;
}
table.thread td.member {
width: 20%;
}

View File

@ -1,23 +1,33 @@
{% extends "base/base.html" %}
{% import "widgets/editor.html" as widget_editor %}
{% import "widgets/member.html" as widget_member %}
{% block title %}
<a href='/forum'>Forum de Planète Casio</a> » <h1>{{ t.forum.name }}</h1>
<a href='/forum'>Forum de Planète Casio</a> » <a href="{{ url_for('forum_page', f=t.forum) }}">{{ t.forum.name }}</a> » <h1>{{ t.title }}</h1>
{% endblock %}
{% block content %}
<section>
<h1>{{ t.title }}</h1>
<table class="thread"><tr>
<td class="member">{{ widget_member.profile(t.author ) }}</td>
<td>{{ t.thread.top_comment.text }}</td>
</tr></table>
<hr>
<div>{{ t.thread.top_comment.text }}</div>
<table class="thread">
{% for i, c in enumerate(t.thread.comments) %}
<tr>
{% if c != t.thread.top_comment %}
<div>{{ c.text }}</div>
<td class="member">{{ widget_member.profile(c.author ) }}</td>
<td>{{ c.text }}
{% elif i != 0 %}
<div>Ce message est le top comment</div>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
<div class=form>
<h3>Commenter le sujet</h3>

View File

@ -1,7 +1,7 @@
{% macro text_editor(field, label=True) %}
<div class=editor>
{{ field.label if label }}
<div>Widgets. Lots of widgets :3</div>
<div>Widgets. Lots of widgets :3 For lightscript</div>
{{ field() }}
{% for error in field.errors %}
<span class=msgerror>{{ error }}</span>