From 1e5f98bc33be9b33df40bf349b1480c4178af308 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sat, 19 May 2018 02:51:31 +0200 Subject: [PATCH] slow day --- assets/less/mio/classes/forum/listing.less | 13 ++++++++++++- public/forum/index.php | 2 ++ views/mio/forum/macros.twig | 15 +++++++-------- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/assets/less/mio/classes/forum/listing.less b/assets/less/mio/classes/forum/listing.less index 2a99de33..9d672488 100644 --- a/assets/less/mio/classes/forum/listing.less +++ b/assets/less/mio/classes/forum/listing.less @@ -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; diff --git a/public/forum/index.php b/public/forum/index.php index 083f9e87..800b19cb 100644 --- a/public/forum/index.php +++ b/public/forum/index.php @@ -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`, diff --git a/views/mio/forum/macros.twig b/views/mio/forum/macros.twig index ef628629..360f7335 100644 --- a/views/mio/forum/macros.twig +++ b/views/mio/forum/macros.twig @@ -43,15 +43,14 @@ {{ forum.forum_name }}
{{ forum.forum_description|nl2br }} - {% if forum.forum_subforums is defined and forum.forum_subforums|length > 0 %} -
- {% set listing = [] %} - {% for subforum in forum.forum_subforums %} - {% set listing = listing|merge([''|raw ~ subforum.forum_name ~ ''|raw]) %} - {% endfor %} - {{ listing|join(', ')|raw }} - {% endif %}
+ {% if forum.forum_subforums is defined and forum.forum_subforums|length > 0 %} +
+ {% for subforum in forum.forum_subforums %} + {{ subforum.forum_name }} + {% endfor %} +
+ {% endif %}