]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
Update Vue School banner copy (#1262)
authorNico Devs <3766839+nicodevs@users.noreply.github.com>
Mon, 2 May 2022 07:50:21 +0000 (04:50 -0300)
committerGitHub <noreply@github.com>
Mon, 2 May 2022 07:50:21 +0000 (09:50 +0200)
packages/docs/.vitepress/components/Banner.vue

index 4e552b5f6852b0f175d5d25b3c1208ffd8e64157..e45cf0ef3ab16b0900c62a6bd93e8e5557f86c0f 100644 (file)
     <div class="vs-core">
       <div class="vs-slogan">
         <div class="vs-slogan-title">
-          Get up to <strong>40% off</strong> your Vue School Subscription
+          Extended for <strong>48 hours!</strong>
         </div>
         <div class="vs-slogan-subtitle">
-          Time Limited Offer
+          Get up to 40% off your Vue School Subscription
         </div>
       </div>
       <div class="vs-button">
@@ -39,7 +39,9 @@ export default {
     }
   },
   mounted () {
-    this.isVisible = !localStorage.getItem('VS_FW_22')
+    const now = new Date()
+    const end = new Date('2022-05-04T00:00:00+02:00')
+    this.isVisible = !localStorage.getItem('VS_FW_22') && (now < end)
     if (this.isVisible) document.body.classList.add('has-top-banner')
   },
   methods: {