From 2d2b2c62a03a25990cdc1e1c92dd95f89558df18 Mon Sep 17 00:00:00 2001 From: flashwave Date: Mon, 15 Oct 2018 16:29:35 +0200 Subject: [PATCH] Renamed forum locked container to status. --- assets/less/classes/forum/status.less | 30 ++++++++++++++++++++++++++ assets/less/classes/forum/topic.less | 30 -------------------------- assets/less/main.less | 1 + templates/forum/macros.twig | 31 ++++++++++++++------------- 4 files changed, 47 insertions(+), 45 deletions(-) create mode 100644 assets/less/classes/forum/status.less diff --git a/assets/less/classes/forum/status.less b/assets/less/classes/forum/status.less new file mode 100644 index 00000000..d55446fb --- /dev/null +++ b/assets/less/classes/forum/status.less @@ -0,0 +1,30 @@ +.forum__status { + border: 1px solid var(--accent-colour); + display: flex; + align-items: center; + min-height: 40px; + margin-bottom: 2px; + box-shadow: 0 1px 2px var(--accent-colour); + + &__icon { + height: 40px; + width: 40px; + background-size: 35px; + background-image: url('https://static.flash.moe/images/topic-icons/topic-locked-read.png'); + background-position: center; + background-repeat: no-repeat; + background-color: var(--accent-colour); + flex-grow: 0; + flex-shrink: 0; + } + + &__text { + margin: 0 10px; + flex-grow: 1; + flex-shrink: 1; + } + + &__emphasis { + font-weight: 700; + } +} diff --git a/assets/less/classes/forum/topic.less b/assets/less/classes/forum/topic.less index 76f869be..8730c930 100644 --- a/assets/less/classes/forum/topic.less +++ b/assets/less/classes/forum/topic.less @@ -1,32 +1,2 @@ .forum__topic { - &__locked { - border: 1px solid var(--accent-colour); - display: flex; - align-items: center; - min-height: 40px; - margin-bottom: 2px; - box-shadow: 0 1px 2px var(--accent-colour); - - &__icon { - height: 40px; - width: 40px; - background-size: 35px; - background-image: url('https://static.flash.moe/images/topic-icons/topic-locked-read.png'); - background-position: center; - background-repeat: no-repeat; - background-color: var(--accent-colour); - flex-grow: 0; - flex-shrink: 0; - } - - &__text { - margin: 0 10px; - flex-grow: 1; - flex-shrink: 1; - } - - &__time { - font-weight: 700; - } - } } diff --git a/assets/less/main.less b/assets/less/main.less index df08a451..3ca47107 100644 --- a/assets/less/main.less +++ b/assets/less/main.less @@ -155,6 +155,7 @@ body { @import "classes/forum/posting"; @import "classes/forum/topic"; @import "classes/forum/topics"; +@import "classes/forum/status"; // User stuff @import "classes/usercard"; diff --git a/templates/forum/macros.twig b/templates/forum/macros.twig index a050c851..90a43448 100644 --- a/templates/forum/macros.twig +++ b/templates/forum/macros.twig @@ -21,7 +21,7 @@ {% macro forum_category_buttons(forum, perms) %}
{% if perms|perms_check(constant('MSZ_FORUM_PERM_CREATE_TOPIC')) %} - New Topic + New Topic {% endif %}
{% endmacro %} @@ -137,14 +137,14 @@ {% macro forum_topic_locked(locked, archived) %} {% if locked is not null or archived %} -
-
-
+
+
+
{% if archived %} - This topic has been archived. + This topic has been archived. {% else %} This topic was locked . {% endif %} @@ -172,29 +172,30 @@
{% endmacro %} -{% macro forum_topic_entry(topic, topic_type, topic_unread, topic_icon) %} +{% macro forum_topic_entry(topic, topic_type, topic_unread) %} {% set topic_type = topic_type|default(null) %} {% set topic_unread = topic_unread|default(topic.topic_unread|default(false)) ? 'unread' : 'read' %} - {% set topic_icon = topic_icon|default('https://static.flash.moe/images/topic-icons/topic-%s-%s.png') %} {% if topic_type is null %} {% if topic.topic_deleted is defined and topic.topic_deleted is not null %} - {% set topic_type = 'deleted' %} + {% set topic_type = 'fas fa-trash-alt' %} {% elseif topic.topic_type is defined and topic.topic_type != 0 %} {% if topic.topic_type == 2 %} - {% set topic_type = 'announcement' %} + {% set topic_type = 'fas fa-bullhorn' %} {% elseif topic.topic_type == 1 %} - {% set topic_type = 'pinned' %} + {% set topic_type = 'fas fa-thumbtack' %} {% endif %} {% elseif topic.topic_locked is defined and topic.topic_locked is not null %} - {% set topic_type = 'locked' %} + {% set topic_type = 'fas fa-lock' %} {% else %} - {% set topic_type = 'default' %} + {% set topic_type = 'fas fa-comment' %} {% endif %} {% endif %} -
- {{ topic_unread }} +
+
+ +