1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Improve message design with CSS tables

This commit is contained in:
Tim Düsterhus 2013-01-30 16:34:02 +01:00
parent 8772981d92
commit 26ac9b8626
3 changed files with 43 additions and 27 deletions

View File

@ -23,11 +23,12 @@
overflow-x: hidden; overflow-x: hidden;
padding-left: 7px !important; padding-left: 7px !important;
ul {
display: table;
.timsChatMessage { .timsChatMessage {
padding-left: 16px;
min-height: 16px; min-height: 16px;
clear: both; display: table-row;
position: relative;
time:first-child { time:first-child {
&::before { &::before {
@ -42,6 +43,18 @@
font-weight: bold; font-weight: bold;
} }
> {
time, .usernameContainer, .text {
display: table-cell;
}
.usernameContainer {
text-align: right;
min-width: 100px;
padding: 0px 5px;
}
}
&.unloaded { &.unloaded {
opacity: 0.4; opacity: 0.4;
} }
@ -49,8 +62,7 @@
&::before { &::before {
.icon; .icon;
.icon16; .icon16;
position: absolute; }
left: 0px;
} }
} }
} }

View File

@ -60,6 +60,10 @@
</script> </script>
<style type="text/css"> <style type="text/css">
.timsChatMessage::before {
content: "";
}
{assign var='type' value='\chat\data\message\Message::TYPE_'} {assign var='type' value='\chat\data\message\Message::TYPE_'}
.timsChatMessage{$type|concat:'JOIN'|constant}::before { .timsChatMessage{$type|concat:'JOIN'|constant}::before {
content: "\f090"; content: "\f090";

View File

@ -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}