Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3 from karolinaszczur/ux-improvements

[ux] visual improvements
  • Loading branch information...
commit 9963149a3535acce84ddda4d450b488debe20ad5 2 parents 9a267ad + 84b5287
Paolo Fragomeni authored
Showing with 74 additions and 66 deletions.
  1. +72 −64 public/index.css
  2. +2 −2 public/index.html
View
136 public/index.css
@@ -1,10 +1,13 @@
body {
- font-family: "lucida grande", sans-serif;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
text-align: center;
+ background: rgba(0, 0, 0, .03);
}
h1 {
font-size: 40px;
+ color: rgba(0, 0, 0, .8);
+ text-shadow: 0 1px 1px #fff;
}
#chat,
@@ -15,13 +18,16 @@ h1 {
}
#chat {
position: relative;
- border: 1px solid #ccc;
margin: auto;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
- box-shadow: 0px 0px 10px #888;
+ border: 1px solid #ddd;
+ box-shadow: inset 0 1px 1px rgb(255, 255, 255);
+ -webkit-border-radius: 10px;
+ -moz-border-radius: 10px;
+ border-radius: 10px;
+ background: #f7f7f7;
+ box-shadow: 0 0 25px rgba(0, 0, 0, .07);
}
+
#nickname,
#connecting {
position: absolute;
@@ -29,21 +35,34 @@ h1 {
z-index: 100;
left: 0;
top: 0;
- background: #fff;
text-align: center;
width: 600px;
font: 15px;
- color: #666;
+ color: rgba(0, 0, 0, .5);
display: block;
}
#nickname .wrap,
#connecting .wrap {
- padding-top: 150px;
+ padding-top: 100px;
}
#nickname input {
border: 1px solid #ccc;
padding: 10px;
+ width: 300px;
+ font-size: 14px;
+ color: #777;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2);
+}
+
+label {
+ display: block;
+ margin: 20px 0;
+ font-size: 18px;
}
+
#nickname input:focus {
border-color: #999;
outline: 0;
@@ -59,10 +78,7 @@ h1 {
.nickname-set #nickname {
display: none;
}
-#messages {
- height: 380px;
- background: #eee;
-}
+
#messages em {
text-shadow: 0 1px 0 #fff;
color: #999;
@@ -70,37 +86,41 @@ h1 {
#messages p {
padding: 0;
margin: 0;
- font: 12px Helvetica, Arial;
+ color: rgba(0, 0, 0, .5);
+ font: 13px Helvetica, Arial;
padding: 5px 10px;
}
#messages p b {
display: inline-block;
padding-right: 10px;
+ color: rgba(0, 0, 0, .8);
}
#messages p:nth-child(even) {
background: #fafafa;
}
#messages #nicknames {
- background: #ccc;
padding: 10px;
- font: 11px Helvetica;
+ font-size: 13px;
}
#messages #nicknames span {
color: #000;
+ font-weight: bold;
}
#messages #nicknames b {
display: inline-block;
color: #fff;
- background: #999;
+ background: #00b5d6;
padding: 3px 6px;
margin-right: 5px;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
- text-shadow: 0 1px 0 #666;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ text-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}
#messages #lines {
- height: 340px;
+ height: 250px;
+ border-top: 1px solid #ddd;
+ background: #fff;
overflow: auto;
overflow-x: hidden;
overflow-y: auto;
@@ -132,25 +152,34 @@ h1 {
-webkit-border-radius: 3px;
}
#send-message {
- background: #fff;
position: relative;
}
#send-message input {
border: none;
- height: 30px;
+ height: 40px;
+ position: relative;
+ font-size: 14px;
+ color: #777;
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ box-shadow: inset 0 2px 10px rgba(0, 0, 0, .1);
padding: 0 10px;
line-height: 30px;
vertical-align: middle;
width: 580px;
+ z-index: 100;
}
#send-message input:focus {
outline: 0;
}
+
#send-message button {
- position: absolute;
- top: 5px;
- right: 5px;
+ margin: 20px 0 20px -55px;
+ left: 50%;
+ width: 110px;
+ position: relative;
}
+
button {
margin: 0;
-webkit-user-select: none;
@@ -158,46 +187,25 @@ button {
user-select: none;
display: inline-block;
text-decoration: none;
- background: #43a1f7;
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #43a1f7), color-stop(1, #377ad0));
- background: -webkit-linear-gradient(top, #43a1f7 0%, #377ad0 100%);
- background: -moz-linear-gradient(top, #43a1f7 0%, #377ad0 100%);
- background: linear-gradient(top, #43a1f7 0%, #377ad0 100%);
- border: 1px solid #2e70c4;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
+ background: #00b5d6;
+ border: 1px solid #00a5c3;
+ -webkit-border-radius: 7px;
+ -moz-border-radius: 7px;
+ border-radius: 7px;
color: #fff;
- font-family: "lucida grande", sans-serif;
- font-size: 11px;
- font-weight: normal;
- line-height: 1;
- padding: 3px 10px 5px 10px;
+ box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6),
+ inset 0 0 10px #008da7;
+ font: 600 1.3em/1.7em "helvetica neue", helvetica, arial, sans-serif;
text-align: center;
- text-shadow: 0 -1px 1px #2d6dc0;
-}
-button:hover,
-button.hover {
- background: darker;
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #43a1f7), color-stop(1, #2e70c4));
- background: -webkit-linear-gradient(top, #43a1f7 0%, #2e70c4 100%);
- background: -moz-linear-gradient(top, #43a1f7 0%, #2e70c4 100%);
- background: linear-gradient(top, #43a1f7 0%, #2e70c4 100%);
- border: 1px solid #2e70c4;
+ text-shadow: 0 1px 1px #006679;
cursor: pointer;
- text-shadow: 0 -1px 1px #2c6bbb;
}
+button:hover,
+button.hover,
button:active,
-button.active {
- background: #2e70c4;
- border: 1px solid #2e70c4;
- border-bottom: 1px solid #2861aa;
- text-shadow: 0 -1px 1px #2b67b5;
-}
-button:focus,
-button.focus {
- outline: none;
- -webkit-box-shadow: 0 1px 0 0 rgba(255,255,255,0.4), 0 0 4px 0 #377ad0;
- -moz-box-shadow: 0 1px 0 0 rgba(255,255,255,0.4), 0 0 4px 0 #377ad0;
- box-shadow: 0 1px 0 0 rgba(255,255,255,0.4), 0 0 4px 0 #377ad0;
+button:focus {
+ background: #009cb8;
+ box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7),
+ inset 0 0 10px #007287;
}
+
View
4 public/index.html
@@ -11,8 +11,8 @@
<div id="chat">
<div id="nickname">
<form class="wrap" id="set-nickname">
- <p>Please type in your nickname and press enter.</p>
- <input id="nick" type="text"/>
+ <label for="nick">Please type in your nickname and press enter.</label>
+ <input id="nick" name="nick" type="text" placeholder="nickname" />
<p id="nickname-err">Nickname already in use</p>
</form>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.