Browse Source

Always show total vote count

Aanand Prasad 9 năm trước cách đây
mục cha
commit
aa05c12ab7
2 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 4 2
      result-app/views/index.html
  2. 1 0
      result-app/views/stylesheets/style.css

+ 4 - 2
result-app/views/index.html

@@ -31,8 +31,10 @@
         </div>
       </div>
     </div>
-    <div id="result" ng-if="total > 100">
-      {{total}} votes
+    <div id="result">
+      <span ng-if="total == 0">No votes yet</span>
+      <span ng-if="total == 1">{{total}} vote</span>
+      <span ng-if="total >= 2">{{total}} votes</span>
     </div>
     <script src="socket.io.js"></script>
     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>

+ 1 - 0
result-app/views/stylesheets/style.css

@@ -47,6 +47,7 @@ body{
   vertical-align:middle;
 }
 #result{
+  z-index: 3;
   position: absolute;
   bottom: 40px;
   right: 20px;