diff --git a/website/public/js/chat.js b/website/public/js/chat.js index 014d723..e35f85c 100644 --- a/website/public/js/chat.js +++ b/website/public/js/chat.js @@ -54,16 +54,25 @@ function addMessages(messages) { type = "chat-message-other"; } if (i == 0) { + if (thisDate > previousDate) { + previousDate = thisDate; + messagesText += '\ +
\ +
\ + ' + days[thisDate.getDay()] + " " + thisDate.getDate() + " " + months[thisDate.getMonth()] + " " + thisDate.getFullYear() + '\ +
\ +
'; + } messagesText += '
'; } else if (type != previousType || thisTime != previousTime || thisDate > previousDate) { messagesText += '
\ ' + thisTime + '\
'; - previousDate = thisDate; previousTime = thisTime; previousType = type; if (thisDate > previousDate) { + previousDate = thisDate; messagesText += '\
\
\ diff --git a/website/public/styles/chat.css b/website/public/styles/chat.css index 47b0639..85eb219 100644 --- a/website/public/styles/chat.css +++ b/website/public/styles/chat.css @@ -144,4 +144,10 @@ body { .chat-message-other .chat-time { text-align: right; +} + +@media only screen and (max-width: 1200px) { + .chat-message-self, .chat-message-other { + max-width: 75%; + } } \ No newline at end of file