This commit is contained in:
flash 2018-05-19 02:51:31 +02:00
parent 387ab2ccb4
commit 1e5f98bc33
3 changed files with 21 additions and 9 deletions

View file

@ -23,6 +23,7 @@
text-align: center;
flex-grow: 0;
flex-shrink: 0;
align-self: flex-start;
}
&__info {
@ -42,11 +43,21 @@
}
}
&__description {
&__description,
&__subforums {
font-size: .8em;
line-height: 1.3em;
}
&__subforum {
content: inherit;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
&__stats {
text-align: right;
flex-grow: 0;

View file

@ -3,6 +3,8 @@ use Misuzu\Database;
require_once __DIR__ . '/../../misuzu.php';
$db = Database::connection();
$categories = $db->query('
SELECT
f.`forum_id`, f.`forum_name`, f.`forum_type`,

View file

@ -43,15 +43,14 @@
<a href="/forum/forum.php?f={{ forum.forum_id }}" class="forum__listing__entry__title">{{ forum.forum_name }}</a>
<div class="forum__listing__entry__description">
{{ forum.forum_description|nl2br }}
{% if forum.forum_subforums is defined and forum.forum_subforums|length > 0 %}
<br>
{% set listing = [] %}
{% for subforum in forum.forum_subforums %}
{% set listing = listing|merge(['<a href="/forum/forum.php?f='|raw ~ subforum.forum_id ~ '">'|raw ~ subforum.forum_name ~ '</a>'|raw]) %}
{% endfor %}
{{ listing|join(', ')|raw }}
{% endif %}
</div>
{% if forum.forum_subforums is defined and forum.forum_subforums|length > 0 %}
<div class="forum__listing__entry__subforums">
{% for subforum in forum.forum_subforums %}
<a href="/forum/forum.php?f={{ subforum.forum_id }}" class="forum__listing__entry__subforum">{{ subforum.forum_name }}</a>
{% endfor %}
</div>
{% endif %}
</div>
<div class="forum__listing__entry__stats">