background-color: #bcdaf8;
}
-.client h2 {
+.client > h2 {
font-size: 1.2rem;
font-weight: bold;
}
+.interfacecontainer {
+ white-space: nowrap;
+}
+
+.interfacecontainer > h3 {
+ display: inline-block;
+ vertical-align: top;
+ margin-top: 5px;
+ font-weight: bold;
+}
+
.templatecontainer {
+ display: inline-block;
+ vertical-align: top;
+ white-space: normal;
}
.lastcontainer {
text-align: left;
}
-.templatecontainer h3 {
- display: inline-block;
- margin-top: 5px;
- font-weight: bold;
-}
-
.message {
display: inline-block;
vertical-align: top;
background-color: #ee96a8;
}
-.templatecontainer .message {
+.templatecontainer > .message {
font-size: 0.8rem;
margin-top: 5px;
margin-left: 5px;
}
-.lastcontainer .message {
+.lastcontainer > .message {
margin-top: 5px;
}
-.message span {
+.message > span {
margin: 5px;
font-size: 1rem;
}
-.message h4 {
+.message > h4 {
margin: 2px;
font-size: 0.8rem;
}
section.setAttribute('class', 'client')
section.innerHTML = `
<h2>${client}</h2>
- <div id="${client} Receives" class="templatecontainer">
+ <div class="interfacecontainer">
<h3>=></h3>
+ <div id="${client} Receives" class="templatecontainer">
+ </div>
</div>
- <div id="${client} Sends" class="templatecontainer">
+ <div class="interfacecontainer">
<h3><=</h3>
+ <div id="${client} Sends" class="templatecontainer">
+ </div>
</div>
<div id="${client} Last" class="lastcontainer">
</div>
}
// Crate message elements for receives interface:
const receiveContainer = document.getElementById(message['client'] + ' Receives')
- receiveContainer.innerHTML = '<h3>=></h3>'
+ receiveContainer.innerHTML = ''
for (const template of message.receives) {
if (template['command'] != null) {
receiveContainer.appendChild(createForCommand(template))
}
// Create message elements for sends interface:
const sendContainer = document.getElementById(message['client'] + ' Sends')
- sendContainer.innerHTML = '<h3><=</h3>'
+ sendContainer.innerHTML = ''
for (const template of message.sends) {
sendContainer.appendChild(createForMessage(template))
}