From ab21ebd9603a4aa079461ebc0ad1ed8a8f202af3 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 16 Jul 2019 16:45:50 -0400 Subject: [PATCH] feat: theme changes for nodebb/nodebb#7330 --- less/chats.less | 18 ++++++++++++++++++ templates/partials/chats/messages.tpl | 6 +++++- templates/partials/chats/system-message.tpl | 3 +++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 templates/partials/chats/system-message.tpl diff --git a/less/chats.less b/less/chats.less index 8053212..f06011a 100644 --- a/less/chats.less +++ b/less/chats.less @@ -515,6 +515,24 @@ } } } + + li.system-message { + list-style-type: none; + text-align: center; + color: @gray-light; + font-size: 1.25rem; + padding: 1rem 0; + + &::before, &::after { + display: inline-block; + width: 10%; + content: ''; + border-top: 1px solid @gray-lighter; + position: relative; + top: -0.3rem; + margin: 0 2rem; + } + } } .user-typing { diff --git a/templates/partials/chats/messages.tpl b/templates/partials/chats/messages.tpl index 74e9449..d59cce5 100644 --- a/templates/partials/chats/messages.tpl +++ b/templates/partials/chats/messages.tpl @@ -1,3 +1,7 @@ {{{each messages}}} - + {{{ if !./system }}} + + {{{ else }}} + + {{{ end }}} {{{end}}} \ No newline at end of file diff --git a/templates/partials/chats/system-message.tpl b/templates/partials/chats/system-message.tpl new file mode 100644 index 0000000..a28ddc6 --- /dev/null +++ b/templates/partials/chats/system-message.tpl @@ -0,0 +1,3 @@ +
  • + [[modules:chat.system.{messages.content}, {messages.fromUser.username}]] +
  • \ No newline at end of file