diff --git a/nuxtjs.org/components/AButton.vue b/nuxtjs.org/components/AButton.vue index 9ca36d0b7..ac405017a 100644 --- a/nuxtjs.org/components/AButton.vue +++ b/nuxtjs.org/components/AButton.vue @@ -28,10 +28,6 @@ import { defineComponent, ref } from '@vue/composition-api' export default defineComponent({ props: { - href: { - type: String, - default: null - }, to: { type: [String, Object], default: null @@ -94,7 +90,7 @@ export default defineComponent({ props() { return { a: { - href: this.href, + href: this.to, target: this.target, rel: this.rel, ariaLabel: this.ariaLabel @@ -111,8 +107,14 @@ export default defineComponent({ } }[this.is] }, + isExternal() { + if (!this.to) return false + const isInternal = typeof this.to !== 'string' || (this.to.startsWith('/') && this.to.startsWith('//') === false) + + return !isInternal + }, is() { - if (this.href) { + if (this.isExternal) { return 'a' } else if (this.to) { return 'NuxtLink' diff --git a/nuxtjs.org/components/HeroDescription.vue b/nuxtjs.org/components/HeroDescription.vue deleted file mode 100644 index 75e9288b8..000000000 --- a/nuxtjs.org/components/HeroDescription.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/nuxtjs.org/components/HeroParallax.vue b/nuxtjs.org/components/HeroParallax.vue index e9cb81e10..bbe325ea4 100644 --- a/nuxtjs.org/components/HeroParallax.vue +++ b/nuxtjs.org/components/HeroParallax.vue @@ -52,7 +52,7 @@ diff --git a/nuxtjs.org/components/HomeHero.vue b/nuxtjs.org/components/HomeHero.vue index 10c437f03..7a4846239 100644 --- a/nuxtjs.org/components/HomeHero.vue +++ b/nuxtjs.org/components/HomeHero.vue @@ -1,41 +1,69 @@ + + diff --git a/nuxtjs.org/components/SectionButton.vue b/nuxtjs.org/components/SectionButton.vue index 04bc28bc7..2c07d2b14 100644 --- a/nuxtjs.org/components/SectionButton.vue +++ b/nuxtjs.org/components/SectionButton.vue @@ -2,7 +2,6 @@