From: Nico Devs <3766839+nicodevs@users.noreply.github.com> Date: Mon, 25 Jul 2022 16:14:31 +0000 (-0300) Subject: Update Vue School summer sale banner (#1487) X-Git-Tag: v4.1.3~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=247cf9dc5f9eb46941fe4c82dc4072ee383a3d7d;p=thirdparty%2Fvuejs%2Frouter.git Update Vue School summer sale banner (#1487) --- diff --git a/packages/docs/.vitepress/components/VueSchool/BannerCountdown.vue b/packages/docs/.vitepress/components/VueSchool/BannerCountdown.vue new file mode 100644 index 00000000..5b57be1e --- /dev/null +++ b/packages/docs/.vitepress/components/VueSchool/BannerCountdown.vue @@ -0,0 +1,55 @@ + + + + + {{ data[part] }}{{ part[0].toLowerCase() }} + + : + + + + + + + + + diff --git a/packages/docs/.vitepress/components/VueSchool/BannerTop.vue b/packages/docs/.vitepress/components/VueSchool/BannerTop.vue index 1a70e6ac..a187640d 100644 --- a/packages/docs/.vitepress/components/VueSchool/BannerTop.vue +++ b/packages/docs/.vitepress/components/VueSchool/BannerTop.vue @@ -1,5 +1,10 @@ - + @@ -10,22 +15,74 @@ - - Summer Sale: Get the 3 months plan for only $75 $50 + + + Learn Vue this summer and save 40% + + + + Extended! + + + Limited time offer + + + - Get 33% OFF + Get Offer + @click.stop.prevent="close"> + + diff --git a/packages/docs/.vitepress/theme/Layout.vue b/packages/docs/.vitepress/theme/Layout.vue index f9a52ffa..eeebfc42 100644 --- a/packages/docs/.vitepress/theme/Layout.vue +++ b/packages/docs/.vitepress/theme/Layout.vue @@ -1,12 +1,6 @@ - - + + @@ -68,19 +62,7 @@ export default { }, data() { return { - sponsors, - showTopBanner: false - } - }, - mounted () { - const now = new Date() - const end = new Date('2022-07-23T00:00:00+02:00') - this.showTopBanner = !localStorage.getItem('VS_SUMMER_22') && (now < end) - }, - methods: { - closeBannerTop () { - this.showTopBanner = false - localStorage.setItem('VS_SUMMER_22', 1) + sponsors } } } diff --git a/packages/docs/package.json b/packages/docs/package.json index ab0223b0..ad2b4ae3 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -8,6 +8,7 @@ "docs:build": "vitepress build ." }, "dependencies": { + "@chenfengyuan/vue-countdown": "2", "vitepress": "^0.20.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2d0f31f2..4086faf7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: 5.4 +lockfileVersion: 5.3 importers: @@ -32,8 +32,10 @@ importers: packages/docs: specifiers: + '@chenfengyuan/vue-countdown': '2' vitepress: ^0.20.0 dependencies: + '@chenfengyuan/vue-countdown': 2.0.0 vitepress: 0.20.10 packages/playground: @@ -552,6 +554,12 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true + /@chenfengyuan/vue-countdown/2.0.0: + resolution: {integrity: sha512-uZQBuajO9Jp5y5Hh5/C61qZw5oQXv3Cgd0FWO4j22SmwY7pzEHC7A/liobHjHeLiQH9WKVEhyOzmIZ2a4WSXhQ==} + peerDependencies: + vue: ^3.0.0 + dev: false + /@docsearch/css/3.1.0: resolution: {integrity: sha512-bh5IskwkkodbvC0FzSg1AxMykfDl95hebEKwxNoq4e5QaGzOXSBgW8+jnMFZ7JU4sTBiB04vZWoUSzNrPboLZA==} dev: false