Push command textbox at the bottom of the screen

This commit is contained in:
David Cormier 2013-10-05 12:40:01 -04:00
parent cae156d60c
commit fa2fb0957d
2 changed files with 99 additions and 60 deletions

View file

@ -1,3 +1,39 @@
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
/* Negative indent footer by it's height */
margin: 0 auto -25px;
}
/* Set the fixed height of the footer here */
#push,
#footer {
height: 25px;
}
input#sendMessage {
border: 0;
width: 100%;
}
/* Lastly, apply responsive CSS fixes as necessary */
@media (max-width: 767px) {
#footer {
margin-left: -20px;
margin-right: -20px;
padding-left: 20px;
padding-right: 20px;
}
}
body { body {
font-family: monospace; font-family: monospace;
background-color: black; background-color: black;

View file

@ -10,70 +10,73 @@
<script type="text/javascript" src="js/protocol.js"></script> <script type="text/javascript" src="js/protocol.js"></script>
<script type="text/javascript" src="js/websockets.js"></script> <script type="text/javascript" src="js/websockets.js"></script>
</head> </head>
<body ng-app="weechat"> <body ng-app="weechat" ng-controller="WeechatCtrl">
<div ng-controller="WeechatCtrl"> <div id="wrap">
<div ng-hide="connected"> <div>
<form class="form-horizontal"> <div ng-hide="connected">
<legend>Connection</legend> <form class="form-horizontal">
<div class="alert alert-danger" ng-show="errorMessage"> <legend>Connection</legend>
<strong>Oh no!</strong> We cannot connect! <div class="alert alert-danger" ng-show="errorMessage">
</div> <strong>Oh no!</strong> We cannot connect!
<div class="control-group">
<label class="control-label" for="hostport">Hostport</label>
<div class="controls">
<input type="text" id="hostport" ng-model="hostport" placeholder="Hostport">
</div> </div>
</div> <div class="control-group">
<div class="control-group"> <label class="control-label" for="hostport">Hostport</label>
<label class="control-label" for="proto">Proto</label> <div class="controls">
<div class="controls"> <input type="text" id="hostport" ng-model="hostport" placeholder="Hostport">
<input type="text" id="proto" ng-model="proto" placeholder="proto"> </div>
</div> </div>
</div> <div class="control-group">
<div class="control-group"> <label class="control-label" for="proto">Proto</label>
<label class="control-label" for="password">Password</label> <div class="controls">
<div class="controls"> <input type="text" id="proto" ng-model="proto" placeholder="proto">
<input type="password" id="password" ng-model="password" placeholder="Password"> </div>
</div> </div>
</div> <div class="control-group">
<div class="control-group"> <label class="control-label" for="password">Password</label>
<div class="controls"> <div class="controls">
<button class="btn btn-primary" ng-click="connect()">Connect!</button> <input type="password" id="password" ng-model="password" placeholder="Password">
</div>
</div> </div>
</div> <div class="control-group">
</form> <div class="controls">
</div> <button class="btn btn-primary" ng-click="connect()">Connect!</button>
<div ng-show="connected"> </div>
<span class="label" ng-class="{'label-success': content.notification }" ng-repeat="(key, content) in buffers">
<a ng-click="setActiveBuffer(key)">{{ content.full_name }}</a>
</span>
<div ng-repeat="bufferline in activeBuffer.lines">
<span class="timestamp color-dark-gray">{{ bufferline.timestamp | date: 'h:mm:ss'}}</span>
<span ng-repeat="part in bufferline.content" class="text {{ part.fg }}">
{{ part.text }}
</span>
<div ng-repeat="metadata in bufferline.metadata">
<div ng-show="metadata.visible">
<a ng-click="metadata.visible = false">Hide additional content</a>
<div ng-bind-html-unsafe="metadata.content"></div>
</div> </div>
<div ng-hide="metadata.visible"> </form>
<a ng-click="metadata.visible = true">Show additional content</a>
</div>
</div>
</div> </div>
<form ng-submit="sendMessage()">
<input type="text" ng-model="command"></input> <div ng-show="connected">
<input type="submit" class="btn btn-primary"></index> <span class="label" ng-class="{'label-success': content.notification }" ng-repeat="(key, content) in buffers">
</form> <a ng-click="setActiveBuffer(key)">{{ content.full_name }}</a>
</div> </span>
</div> <div ng-repeat="bufferline in activeBuffer.lines">
</body> <span class="timestamp color-dark-gray">{{ bufferline.timestamp | date: 'h:mm:ss'}}</span>
<span ng-repeat="part in bufferline.content" class="text {{ part.fg }}">
{{ part.text }}
</span>
<div ng-repeat="metadata in bufferline.metadata">
<div ng-show="metadata.visible">
<a ng-click="metadata.visible = false">Hide additional content</a>
<div ng-bind-html-unsafe="metadata.content"></div>
</div>
<div ng-hide="metadata.visible">
<a ng-click="metadata.visible = true">Show additional content</a>
</div>
</div>
</div>
</div>
</div>
<div id="push"></div>
</div>
<div id="footer" ng-show="connected">
<form ng-submit="sendMessage()">
<input id="sendMessage" type="text" ng-model="command"></input>
</form>
</div>
</body>
</html> </html>