Browse Source

style changes, and trimming list entries

master
mort 8 years ago
parent
commit
a2135e7ed0
2 changed files with 19 additions and 4 deletions
  1. 1
    1
      server.js
  2. 18
    3
      web/style.css

+ 1
- 1
server.js View File

@@ -56,7 +56,7 @@ app.post("/add/:name", (req, res) => {
if (!req.params.name)
return;

var name = req.params.name.toLowerCase();
var name = req.params.name.toLowerCase().trim();

db.list.push(name);
events.emit("add", { name: name, index: db.list.length - 1 });

+ 18
- 3
web/style.css View File

@@ -21,17 +21,29 @@ html, body {
#add {
margin-top: 12px;
}
#add .name,
#add .submit {
-webkit-appearance: none;
font-size: 16px;
border: 1px solid #aaa;
border-radius: 5px;
background-color: #fff;
}
#add .name {
width: 80%;
height: 30px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
#add .submit {
width: 10%;
height: 30px;
background-color: #eee;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
#add .name,
#add .submit {
font-size: 16px;
#add .submit:hover {
background-color: #ddd;
}
#add .suggestions {
transition: opacity 0.2s;
@@ -108,3 +120,6 @@ html, body {
border-radius: 100px;
background-color: #eee;
}
#list .elem .ok:hover {
background-color: #ddd;
}

Loading…
Cancel
Save