Skip to content
Browse files

Fix login form

Tweak layout after Twitter Bootstrap 2.0 threw it off.
Modified for Bootstrap 2.0 form-horizontal, and added input types, label 'for' etc.
  • Loading branch information...
1 parent 45fab12 commit 17591b8ff91cc4dc511fa144ab0d449c1d074027 @akavlie akavlie committed
Showing with 20 additions and 16 deletions.
  1. +8 −5 assets/css/subway.css
  2. +2 −1 assets/js/views/overview.js
  3. +10 −10 views/templates.jade
View
13 assets/css/subway.css
@@ -54,12 +54,15 @@ html { overflow: hidden; }
#overview {
width: 400px;
margin: 10% auto;
- text-align: center;
padding: 10px;
background: #E7E9ED;
border: 2px solid #DDD;
}
+#overview label { width: 70px; }
+#overview .controls { margin-left: 90px; }
+#overview button { margin-left: 90px; }
+
#overview ul li {
display: inline-block;
padding: 10px;
@@ -68,23 +71,23 @@ html { overflow: hidden; }
width: 130px;
}
-#overview ul li:hover{
+#overview ul li:hover {
background: #A7DBD8;
cursor: pointer;
border-radius: 5px;
}
-#overview ul li img{
+#overview ul li img {
height: 75px;
}
-#overview li span{
+#overview li span {
display: block;
font-weight: bold;
}
#overview #home_parent {
- height: 20px;
+ height: 40px;
width: 100%;
}
View
3 assets/js/views/overview.js
@@ -31,7 +31,8 @@ var OverviewView = Backbone.View.extend({
this.connect();
},
- connect: function() {
+ connect: function(e) {
+ e.preventDefault();
$('.error').removeClass('error');
var server = $('#connect-server').val();
var nick = $('#connect-nick').val();
View
20 views/templates.jade
@@ -14,16 +14,16 @@ script(id="load_image", type="text/html")
script(id="overview_connection", type="text/html")
#home_parent
a.overview_button#home Home
- form
- .clearfix
- label Server
- .input
- input#connect-server
- .clearfix
- label Nick
- .input
- input#connect-nick
- a(id="connect-button", class="btn btn-primary") Connect
+ form.form-horizontal
+ .control-group
+ label(for="connect-server") Server
+ .controls
+ input#connect-server(type="text")
+ .control-group
+ label(for="connect-nick") Nick
+ .controls
+ input#connect-nick(type="text")
+ button(id="connect-button", class="btn btn-primary") Connect
script(id="overview_home", type="text/html")
ul

0 comments on commit 17591b8

Please sign in to comment.
Something went wrong with that request. Please try again.