Add new btn
This commit is contained in:
@@ -4,8 +4,7 @@ title: THE TFT FUELS THE P2P INTERNET
|
||||
description: It is the official medium of exchange for capacity on the ThreeFold Grid.
|
||||
button: Expand ThreeFold
|
||||
link: https://threefold.io/farming
|
||||
button2: Use ThreeFold
|
||||
link2: https://info.threefold.io/#/threefold__use_tfgrid
|
||||
---
|
||||
|
||||
<!--
|
||||
button2: Use ThreeFold
|
||||
link2: https://info.threefold.io/#/threefold__use_tfgrid -->
|
||||
@@ -38,19 +38,37 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<a
|
||||
v-if="main.link.includes('http')"
|
||||
target="_blank"
|
||||
:href="main.link"
|
||||
class="bg-blue-900 text-sm learn-button hover:bg-blue-800 text-gray-100 px-12 py-2 mr-5 shadow rounded-full"
|
||||
>{{ main.button }}</a
|
||||
>
|
||||
<a
|
||||
v-else
|
||||
:href="main.link"
|
||||
class="bg-blue-900 text-sm learn-button hover:bg-blue-800 text-gray-100 px-12 py-2 mr-5 shadow rounded-full"
|
||||
>{{ main.button }}</a
|
||||
>
|
||||
<div class="inline-flex" v-if="main.button">
|
||||
<a
|
||||
v-if="urlChecker(main.link)"
|
||||
target="_blank"
|
||||
:href="main.link"
|
||||
class="bg-blue-900 text-sm learn-button hover:bg-blue-800 text-gray-100 px-12 py-2 mr-5 shadow rounded-full"
|
||||
>{{ main.button }}</a
|
||||
>
|
||||
<a
|
||||
v-else
|
||||
:href="main.link"
|
||||
class="bg-blue-900 text-sm learn-button hover:bg-blue-800 text-gray-100 px-12 py-2 mr-5 shadow rounded-full"
|
||||
>{{ main.button }}</a
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="inline-flex" v-if="main.button2">
|
||||
<a
|
||||
v-if="urlChecker(main.link2)"
|
||||
target="_blank"
|
||||
:href="main.link2"
|
||||
class="bg-blue-900 text-sm learn-button hover:bg-blue-800 text-gray-100 px-12 py-2 mr-5 shadow rounded-full"
|
||||
>{{ main.button2 }}</a
|
||||
>
|
||||
<a
|
||||
v-else
|
||||
:href="main.link2"
|
||||
class="bg-blue-900 text-sm learn-button hover:bg-blue-800 text-gray-100 px-12 py-2 mr-5 shadow rounded-full"
|
||||
>{{ main.button2 }}</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -66,6 +84,15 @@ export default {
|
||||
if (image.src) return image.src;
|
||||
return image;
|
||||
},
|
||||
urlChecker(link) {
|
||||
var urlCheck = new RegExp(
|
||||
"([a-zA-Zd]+://)?(w+:w+@)?([a-zA-Zd.-]+.[A-Za-z]{2,4})(:d+)?(/.*)?",
|
||||
"i"
|
||||
);
|
||||
if (urlCheck.test(link)) {
|
||||
return link;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -155,6 +155,8 @@
|
||||
description
|
||||
button
|
||||
link
|
||||
button2
|
||||
link2
|
||||
}
|
||||
comparisonSecs{
|
||||
id
|
||||
@@ -317,9 +319,6 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.getImg);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@@ -85,11 +85,17 @@ export default {
|
||||
return res;
|
||||
},
|
||||
getImg() {
|
||||
let img = "";
|
||||
let image = "";
|
||||
if (process.isClient) {
|
||||
img = `${window.location.origin}${this.$page.markdownPage.metaImg.src}`;
|
||||
image = `${window.location.origin}${this.img}`;
|
||||
}
|
||||
return img;
|
||||
return image;
|
||||
},
|
||||
img() {
|
||||
if (!this.$page.markdownPage.metaImg) return "";
|
||||
if (this.$page.markdownPage.metaImg.src)
|
||||
return this.$page.markdownPage.metaImg.src;
|
||||
return this.$page.markdownPage.metaImg;
|
||||
},
|
||||
},
|
||||
metaInfo() {
|
||||
|
||||
Reference in New Issue
Block a user