Skip to content

Instantly share code, notes, and snippets.

@kxc0re
Last active May 15, 2019 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kxc0re/425f724696500817a5a56adad5621a2a to your computer and use it in GitHub Desktop.
Save kxc0re/425f724696500817a5a56adad5621a2a to your computer and use it in GitHub Desktop.
just copy in custom html & css
@import url(https://fonts.googleapis.com/css?family=Roboto:700);
* {
box-sizing: border-box;
}
html, body {
height: 100%;
overflow: hidden;
}
body {
text-shadow: 0 0 1px #000, 0 0 2px #000;
background: {background_color};
font-family: 'Roboto';
font-weight: 700;
font-size: {font_size};
line-height: 1.5em;
color: {text_color};
}
#log>div {
animation: fadeInUp .3s ease forwards, fadeOutUp 0.3s ease {message_hide_delay} forwards;
-webkit-animation: fadeInUp .3s ease forwards, fadeOutUp 0.3s ease {message_hide_delay} forwards;
}
.colon {
display: none;
}
#log {
display: block;
position: absolute;
bottom: 0;
left: 0;
padding: 0 10px 10px;
width: 100%;
}
#log>div {
display: block;
}
#log>div.deleted {
visibility: hidden;
}
#log .emote {
background-repeat: no-repeat;
background-position: center;
background-size: contain;
padding: 0.4em 0.2em;
position: relative;
}
#log .emote img {
display: inline-block;
height: 1em;
opacity: 0;
}
#log .message,#log .meta {
vertical-align: top;
display: block;
padding-bottom: 0.1em;
}
#log .meta {
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow:clip;
}
#log .message {
word-wrap: break-word;
width: 100%;
padding-left: 1em;
}
.badge {
display: inline-block;
margin-left: 0.2em;
position: relative;
height: 1em;
vertical-align: middle;
top: -0.1em;
}
.name {
margin-right: 0.2em;
}
<!-- item will be appened to this layout -->
<div id="log" class="sl__chat__layout">
</div>
<!-- chat item -->
<script type="text/template" id="chatlist_item">
<div data-from="{from}" data-id="{messageId}">
<div class="meta" style="color: {color}">
<span class="name">{from}</span>
<span class="badges"></span>
</div>
<div class="message">
{message}
</div>
</div>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment