mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Improve message design with CSS tables
This commit is contained in:
parent
8772981d92
commit
26ac9b8626
@ -23,34 +23,46 @@
|
||||
overflow-x: hidden;
|
||||
padding-left: 7px !important;
|
||||
|
||||
.timsChatMessage {
|
||||
padding-left: 16px;
|
||||
min-height: 16px;
|
||||
clear: both;
|
||||
position: relative;
|
||||
|
||||
time:first-child {
|
||||
ul {
|
||||
display: table;
|
||||
|
||||
.timsChatMessage {
|
||||
min-height: 16px;
|
||||
display: table-row;
|
||||
|
||||
time:first-child {
|
||||
&::before {
|
||||
content: "[";
|
||||
}
|
||||
&::after {
|
||||
content: "]";
|
||||
}
|
||||
}
|
||||
|
||||
.username {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
> {
|
||||
time, .usernameContainer, .text {
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.usernameContainer {
|
||||
text-align: right;
|
||||
min-width: 100px;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
&.unloaded {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: "[";
|
||||
.icon;
|
||||
.icon16;
|
||||
}
|
||||
&::after {
|
||||
content: "]";
|
||||
}
|
||||
}
|
||||
|
||||
.username {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.unloaded {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
&::before {
|
||||
.icon;
|
||||
.icon16;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,10 @@
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
.timsChatMessage::before {
|
||||
content: "";
|
||||
}
|
||||
|
||||
{assign var='type' value='\chat\data\message\Message::TYPE_'}
|
||||
.timsChatMessage{$type|concat:'JOIN'|constant}::before {
|
||||
content: "\f090";
|
||||
|
@ -1 +1 @@
|
||||
{literal}<time>{@$formattedTime}</time> <span class="username">{@$formattedUsername}</span><span class="separator">{$separator}</span> <span class="text">{@$formattedMessage}</span>{/literal}
|
||||
{literal}<time>{@$formattedTime}</time> <span class="usernameContainer"><span class="username">{@$formattedUsername}</span><span class="separator">{$separator}</span></span> <span class="text">{@$formattedMessage}</span>{/literal}
|
Loading…
Reference in New Issue
Block a user