Skip to content

Commit

Permalink
Check empty data in mongodb + dynamic position of the vote button, no…
Browse files Browse the repository at this point in the history
…w centered too
  • Loading branch information
ponsfrilus committed Mar 19, 2015
1 parent c597b51 commit 8fc4287
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 35 deletions.
13 changes: 6 additions & 7 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
body {
margin-bottom: 60px;
}
a {
color: #00b7ff;
}
form {
height: 300px;
.centered {
text-align: center;
}
form ul {
height: 60px;
list-style: none;
}
form li {
Expand All @@ -23,12 +19,15 @@ form li {
background-position: 14px 14px;
filter: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' height='0'><filter id='greyscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0' /></filter></svg>#greyscale");
-webkit-filter: grayscale(1.0);
color: #000;
cursor: move;
display: block;
}
form label {
margin-right: 10px;
background-color: #fff;
cursor: inherit;
color: #05f;
}
form li:hover {
filter: none;
Expand All @@ -47,7 +46,7 @@ li#team {
background-image: url("/images/Farm-Fresh_gruppe5.png");
}
#content {
padding: 60px 15px 0;
padding: 40px 25px 0px 25px;
}
.navbar-fixed-bottom {
background-color: #f5f5f5;
Expand Down
13 changes: 6 additions & 7 deletions public/stylesheets/style.styl
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
grayscale()
filter: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' height='0'><filter id='greyscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0' /></filter></svg>#greyscale");
-webkit-filter unquote("grayscale(1.0)")
color #000

nograyscale()
filter none
-webkit-filter none

body
margin-bottom: 60px;

a
color: #00B7FF

form
height: 300px;
.centered
text-align:center;

form ul
height:60px;
list-style none

form li
Expand All @@ -31,11 +28,13 @@ form li
background-position: 14px 14px;
grayscale()
cursor: move;
display: block;

form label
margin-right 10px
background-color #ffffff
cursor inherit
color #0055FF

form li:hover
nograyscale()
Expand All @@ -53,7 +52,7 @@ li#team
background-image: url("/images/Farm-Fresh_gruppe5.png");

#content
padding: 60px 15px 0;
padding: 40px 25px 0px 25px;

.navbar-fixed-bottom
// In addition to bootstrap's own style, make it
Expand Down
26 changes: 11 additions & 15 deletions views/admin.jade
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
extends layout
block content
h1= title
p Welcome to #{title}, #{user}!

a(href="/logout") Log out


p Even if you are not logged in, you can see the database contents!

Expand All @@ -13,14 +9,14 @@ block content
tr
th User id
th Data

for poll in pollsAnswers
tr
td
span &lt;
= poll.user
span &gt;
td
span &lt;
= JSON.stringify(poll)
span &gt;
if pollsAnswers
for poll in pollsAnswers
tr
td
span &lt;
= poll.user
span &gt;
td
span &lt;
= JSON.stringify(poll)
span &gt;
8 changes: 6 additions & 2 deletions views/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ block content
li(id="sport")
label activité sportive

div(class="clearfix")
button(type="button", class="btn btn-primary btn-lg", id="btnSubmit") Vote !
div(class="centered")
button(type="button", class="btn btn-primary btn-lg", id="btnSubmit") Vote !

br
br
br
9 changes: 5 additions & 4 deletions views/result.jade
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ block content
tr
th Type
th Vote Number
for result in results
tr
td #{result._id}
td #{result.value}
if results
for result in results
tr
td #{result._id}
td #{result.value}

0 comments on commit 8fc4287

Please sign in to comment.