about summary refs log tree commit diff
path: root/pages
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-01-04 15:08:52 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-01-04 15:08:52 +0100
commit2d8f09ae9dbedc127987e4629ae3db62191bb4dd (patch)
tree975c05539a35f11cc88b176b5c6d0c14352035cb /pages
parentc003a40f545e0879c3d1ec74dadae233455f41a7 (diff)
downloadpuszcza-2d8f09ae9dbedc127987e4629ae3db62191bb4dd.tar.gz
puszcza-2d8f09ae9dbedc127987e4629ae3db62191bb4dd.zip
Add day countdown
Diffstat (limited to 'pages')
-rw-r--r--pages/oboz/2020.vue23
1 files changed, 22 insertions, 1 deletions
diff --git a/pages/oboz/2020.vue b/pages/oboz/2020.vue
index 335a24b..8915bec 100644
--- a/pages/oboz/2020.vue
+++ b/pages/oboz/2020.vue
@@ -8,6 +8,9 @@
         <h3>7 PDH Watra</h3>
       </div>
     </div>
+    <div class="countdown">
+      Do obozu zostało: <span>{{ days }} dni</span>
+    </div>
     <div class="mapouter">
       <div class="gmap_canvas">
         <iframe
@@ -30,6 +33,13 @@ import PurePostList from '~/components/Posts/PostList/PurePostList'
 export default {
   components: {
     PurePostList
+  },
+  computed: {
+    days() {
+      let now = new Date(Date.now())
+      let oboz = new Date(2020, 7, 6)
+      return Math.round((oboz.getTime() - now.getTime()) / 86400000)
+    }
   }
 }
 </script>
@@ -40,7 +50,7 @@ export default {
   flex-direction: column;
   justify-content: center;
   align-items: center;
-  margin: 15vmax 0;
+  margin: 15vmax 0 5vmax 0;
 }
 
 h1 {
@@ -60,6 +70,17 @@ h1 {
   margin: 10px;
 }
 
+.countdown {
+  background: #ffffff;
+  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
+  padding: 20px;
+  margin: 50px 10px;
+}
+
+.countdown span {
+  font-weight: 600;
+}
+
 @media (max-width: 480px) {
   .troops {
     flex-direction: column;