diff options
Diffstat (limited to 'views/layouts/main.tt')
-rw-r--r-- | views/layouts/main.tt | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/views/layouts/main.tt b/views/layouts/main.tt new file mode 100644 index 0000000..061e143 --- /dev/null +++ b/views/layouts/main.tt @@ -0,0 +1,68 @@ +<html> +<head> +<title>Dancer/Web::Hippie WebSocket Chat demo</title> +<script src="/static/jquery-1.3.2.min.js"></script> +<script src="/static/jquery.ev.js"></script> +<script src="/static/jquery.md5.js"></script> +<script src="/static/jquery.cookie.js"></script> +<script src="/static/jquery.oembed.js"></script> +<script src="/static/pretty.js"></script> +<script> +var ws; +var cookieName = 'dancer_chat_ident'; + +function doPost(el1, el) { + var text = el.attr('value'); + location.href = 'http://' + location.host + '/chat/' + text; + return; +} + +$(function(){ + if ("WebSocket" in window) { + } + else { + $("#content").text("This browser doesn't support WebSocket."); + return; + } +}); +</script> +<link rel="stylesheet" href="/static/screen.css" /> +<style> +#messages { + margin-top: 1em; + margin-right: 3em; + width: 100%; +} +.avatar { + width: 25px; + vertical-align: top; +} +.avatar img { + width: 25px; height: 25px; + vertical-align: top; + margin-right: 0.5em; +} +.chat-message { + width: 70%; +} +.chat-message .name { + font-weight: bold; +} +.meta { + vertical-align: top; + color: #888; + font-size: 0.8em; +} +body { + margin: 1em 2em +} + +</style> +</head> +<body> + +<div id="content"> +[% content %] +</div> +</body> +</html> \ No newline at end of file |