cammiechat/templates/chat.html

72 lines
2.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>
body {
font-family: monospace;
background: black;
color: #00ff00;
font-size: 300%;
margin: 0;
padding: 0;
overflow: hidden;
}
h1 {
margin: -2em 0 1em;
color: transparent;
text-align: left;
font-size: 75%;
white-space: pre;
text-indent: 100%;
overflow: hidden;
}
h1:after {
text-indent: 0;
display: block;
color: #00cc00;
content: " _ _ ____ ____ ____ __ ___ ____ ____\a( \\/ )( __)/ ___)/ ___) / _\\ / __)( __)/ ___)\a/ \\/ \\ ) _) \\___ \\\\___ \\/ \\( (_ \\ ) _) \\___ \\\a\\_)(_/(____)(____/(____/\\_/\\_/ \\___/(____)(____/";
}
.msg_wrapper { margin-bottom: 0.3em; }
.msg .meta { background-color: #00ff00; margin-right: 0.6em; }
.msg .meta:before { content: " "; }
.msg .meta .between { display: inline-block; width: 0px; height: 1px; overflow: hidden; }
.msg time { color: #000; margin-right: 0.7em; }
.msg .sender { color: #000; }
.msg .sender:before { content: "!{"; } .msg .sender:after { content: "}!"; margin-right: 0.5em; }
.msg .sender.name:before { content: "<"; } .msg .sender.name:after { content: ">"; }
.msg .sender.ip:before { content: "["; } .msg .sender.ip:after { content: "]"; }
.mpd-status { margin-bottom: 0.2em; }
.mpd-status:before { content: " ▶ "; }
</style>
<title>Messages from the world to kelder</title>
<meta http-equiv="refresh" content="5" />
</head>
<body>
{% if mpd_status["state"] == "play" %}
{% if mpd_song["artist"] and mpd_song["title"] %}
<div class="mpd-status"><span class="artist">{{ mpd_song["artist"] }}</span><span class="between artist-title"> </span><span class="title">{{ mpd_song["title"] }}</span></div>
{% elif mpd_song["title"] %}
<div class="mpd-status"><span class="title">{{ mpd_song["title"] }}</span></div>
{% elif mpd_song["artist"] %}
<div class="mpd-status"><span class="artist">{{ mpd_song["artist"] }}</span></div>
{% else %}
<div class="mpd-status">Unknown music, fix your metadata!</div>
{% endif %}
{% endif %}
<h1>Messages</h1>
{% for m in messages %}
<div class="msg_wrapper">
<div class="msg"><!--
--><span class="meta"><!--
--><time datetime="{{ m.time }}">{{ "{:0=2d}".format(m.time.hour) }}:{{ "{:0=2d}".format(m.time.minute) }}:{{ "{:0=2d}".format(m.time.second) }}</time><span class="between time-sender"> - </span><!--
--><span class="sender {{ m.sendertype }}">{{ m.sender }}</span><span class="between sender-msg">: </span><!--
--></span><!--
--><span class="msg">{{ m.msg }}</span><!--
--></div>
</div>
{% endfor %}
</body>
</html>