Shuo/client/index.html

105 lines
2.4 KiB
HTML

<!doctype html>
<html>
<head>
<title>Chat</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="/css/bootstrap.css">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<aside id="sidebar">
<header class="header">
<ul class="nav nav-tabs">
<li class="active"><a href="#list" data-toggle="tab">Channels</a></li>
<li><a href="#settings" data-toggle="tab">Settings</a></li>
</ul>
</header>
<div class="tab-content">
<div id="list" class="tab-pane active"></div>
<div id="settings" class="tab-pane">
<div class="panel panel-default">
<div class="panel-heading">
Show/hide events
</div>
<div class="panel-body">
<input type="checkbox" value="join"/>
<input type="checkbox" value="part"/>
<input type="checkbox" value="nick"/>
<input type="checkbox" value="quit"/>
</div>
</div>
</div>
</div>
</aside>
<div id="chat"></div>
<script type="text/html" id="networks">
{{#networks}}
<div class="network list-group" data-id="{{id}}">
{{#channels}}
<a href="{{name}}" class="channel list-group-item" data-id="{{id}}" data-name="{{name}}">
<span class="badge pull-right"></span>
{{name}}
</a>
{{/channels}}
</div>
{{/networks}}
</script>
<script type="text/html" id="channels">
{{#channels}}
<div class="window {{type}}" data-id="{{id}}">
<div class="title">
<h1>{{name}}</h1>
<button class="close btn btn-danger btn-sm ">Leave</button>
</div>
<div class="users">
{{> users}}
</div>
<div class="messages">
{{> messages}}
</div>
<form onSubmit="return false;">
<input type="text" class="input" data-target="{{id}}"/>
<input type="submit" style="display: none;"/>
</form>
</div>
{{/channels}}
</script>
<script type="text/html" id="users">
{{#users}}
<a href="{{name}}" class="user">
{{mode}}{{name}}
</a>
{{/users}}
</script>
<script type="text/html" id="messages">
{{#messages}}
<div class="message {{type}}">
<span class="time">{{time}}</span>
<a href="{{user}}" class="user">{{mode}}{{user}}</a>
<span class="text">{{text}}</span>
</div>
{{/messages}}
</script>
<script src="/socket.io/socket.io.js"></script>
<script src="/js/lib/mustache.min.js"></script>
<script src="/js/lib/jquery-2.1.0.min.js"></script>
<script src="/js/lib/bootstrap.js"></script>
<script src="/js/chat.js"></script>
</body>
</html>