Fix external links

This commit is contained in:
samaradel
2021-09-05 12:50:33 +02:00
parent 43be073757
commit 1091f7d549
4 changed files with 378 additions and 82 deletions

View File

@@ -21,7 +21,8 @@
</h2> </h2>
<div class="mt-2 text-gray-700" v-html="card.content"></div> <div class="mt-2 text-gray-700" v-html="card.content"></div>
<div class="mx-auto mt-4 mb-6" v-if="card.btn"> <div class="mx-auto mt-4 mb-6" v-if="card.btn">
<g-link <a
v-if="card.link.includes('http')"
class=" class="
inline-block inline-block
bg-blue-900 bg-blue-900
@@ -33,13 +34,33 @@
py-2 py-2
mr-5 mr-5
mb-4 mb-4
rounded
shadow shadow
rounded-full rounded-full
" "
:to="card.link" :href="card.link"
target="_blank"
>{{ card.btn }} >{{ card.btn }}
</g-link> </a>
<a
v-else
class="
inline-block
bg-blue-900
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
:href="card.link"
>{{ card.btn }}
</a>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -135,7 +135,6 @@
py-2 py-2
mr-5 mr-5
mb-4 mb-4
rounded
shadow shadow
rounded-full rounded-full
" "
@@ -154,16 +153,15 @@
py-2 py-2
mr-5 mr-5
mb-4 mb-4
rounded
shadow shadow
rounded-full rounded-full
" "
target="_blank" target="_blank"
v-if="cta.button" v-if="cta.button && cta.link.includes('http')"
:href="cta.link" :href="cta.link"
>{{ cta.button }}</a >{{ cta.button }}</a
> >
<g-link <a
class=" class="
inline-block inline-block
bg-blue-900 bg-blue-900
@@ -175,15 +173,14 @@
py-2 py-2
mr-5 mr-5
mb-4 mb-4
rounded
shadow shadow
rounded-full rounded-full
" "
v-if="cta.button2" v-else
:to="cta.link2" :href="cta.link"
>{{ cta.button2 }}</g-link >{{ cta.button }}</a
> >
<g-link <a
class=" class="
inline-block inline-block
bg-blue-900 bg-blue-900
@@ -195,16 +192,15 @@
py-2 py-2
mr-5 mr-5
mb-4 mb-4
rounded
shadow shadow
rounded-full rounded-full
" "
v-if="cta.button3" target="_blank"
:to="cta.link3" v-if="cta.button2 && cta.link2.includes('http')"
>{{ cta.button3 }}</g-link :href="cta.link2"
>{{ cta.button2 }}</a
> >
<a
<g-link
class=" class="
inline-block inline-block
bg-blue-900 bg-blue-900
@@ -216,25 +212,124 @@
py-2 py-2
mr-5 mr-5
mb-4 mb-4
rounded
shadow shadow
rounded-full rounded-full
" "
v-if="cta.button4" v-else
:to="cta.link4" :href="cta.link2"
>{{ cta.button4 }}</g-link >{{ cta.button2 }}</a
>
<a
class="
inline-block
bg-blue-900
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
target="_blank"
v-if="cta.button3 && cta.link3.includes('http')"
:href="cta.link3"
>{{ cta.button3 }}</a
>
<a
class="
inline-block
bg-blue-900
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
v-else
:href="cta.link3"
>{{ cta.button3 }}</a
>
<a
class="
inline-block
bg-blue-900
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
target="_blank"
v-if="cta.button4 && cta.link4.includes('http')"
:href="cta.link4"
>{{ cta.button4 }}</a
>
<a
class="
inline-block
bg-blue-900
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
v-else
:href="cta.link4"
>{{ cta.button4 }}</a
> >
</div> </div>
<!-- tft --> <!-- tft -->
<div class="w-full lg:max-w-4xl mx-auto lg:mt-20 lg:px-16 lg:py-10 tft_section" v-else-if="id == 'tft'"> <div
class="w-full lg:max-w-4xl mx-auto lg:mt-20 lg:px-16 lg:py-10 tft_section"
v-else-if="id == 'tft'"
>
<h2 <h2
v-if="cta.title" v-if="cta.title"
class="lg:max-w-lg text-8xl mb-6 mt-20 leading-none font-heading mx-auto" class="
lg:max-w-lg
text-8xl
mb-6
mt-20
leading-none
font-heading
mx-auto
"
> >
{{ cta.title }} {{ cta.title }}
</h2> </h2>
<div v-html="cta.content" class="mt-6 mb-8 text-2xl leading-tight tracking-wide tft_subtitle text-gray-800"></div> <div
v-html="cta.content"
class="
mt-6
mb-8
text-2xl
leading-tight
tracking-wide
tft_subtitle
text-gray-800
"
></div>
<div class="mt-8 tracking-wide leading-loose" v-if="cta.video_button"> <div class="mt-8 tracking-wide leading-loose" v-if="cta.video_button">
<a <a
@click="toggleModal" @click="toggleModal"

View File

@@ -30,21 +30,128 @@
</div> </div>
</div> </div>
<div class="mx-auto mt-20" v-if="main.btn"> <div class="mx-auto mt-20" v-if="main.btn">
<g-link <a
class="inline-block bg-blue-900 text-sm learn-button hover:bg-blue-800 text-gray-100 px-12 py-2 mr-5 mb-4 rounded shadow rounded-full" v-if="main.link.includes('http')"
:to="main.link" class="
inline-block
bg-blue-900
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
:href="main.link"
target="_blank"
>{{ main.btn }} >{{ main.btn }}
</g-link> </a>
<g-link
class="inline-block bg-blue-900 text-sm learn-button hover:bg-blue-800 text-gray-100 px-12 py-2 mr-5 mb-4 rounded shadow rounded-full" <a
:to="main.link2" v-else
>{{ main.btn2 }}</g-link class="
> inline-block
<g-link bg-blue-900
class="inline-block bg-blue-900 text-sm learn-button hover:bg-blue-800 text-gray-100 px-12 py-2 mr-5 mb-4 rounded shadow rounded-full" text-sm
:to="main.link3" learn-button
>{{ main.btn3 }}</g-link hover:bg-blue-800
> text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
:href="main.link"
>{{ main.btn }}
</a>
<a
v-if="main.link2.includes('http')"
class="
inline-block
bg-blue-900
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
:href="main.link2"
target="_blank"
>{{ main.btn2 }}
</a>
<a
v-else
class="
inline-block
bg-blue-900
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
:href="main.link2"
>{{ main.btn2 }}
</a>
<a
v-if="main.link3.includes('http')"
class="
inline-block
bg-blue-900
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
:href="main.link3"
target="_blank"
>{{ main.btn3 }}
</a>
<a
v-else
class="
inline-block
bg-blue-900
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
:href="main.link3"
>{{ main.btn3 }}
</a>
<!-- <div v-html="main.content" class="text-sm text-gray-400 mt-5"></div> --> <!-- <div v-html="main.content" class="text-sm text-gray-400 mt-5"></div> -->
</div> </div>
</section> </section>
@@ -82,7 +189,18 @@
</div> </div>
<div class="text-center" v-if="main.btn"> <div class="text-center" v-if="main.btn">
<g-link <g-link
class="bg-gray-900 learn-button hover:bg-gray-700 text-gray-100 px-5 py-3 mr-3 font-semibold rounded shadow" class="
bg-gray-900
learn-button
hover:bg-gray-700
text-gray-100
px-5
py-3
mr-3
font-semibold
rounded
shadow
"
:to="main.link" :to="main.link"
>{{ main.btn }}</g-link >{{ main.btn }}</g-link
> >

View File

@@ -67,7 +67,8 @@
:alt="section.title" :alt="section.title"
/> />
<div class="mx-auto mt-6"> <div class="mx-auto mt-6">
<g-link <a
v-if="section.link1.includes('http')"
class=" class="
inline-block inline-block
green green
@@ -79,14 +80,15 @@
py-2 py-2
mr-5 mr-5
mb-4 mb-4
rounded
shadow shadow
rounded-full rounded-full
" "
:to="section.link1" :href="section.link1"
target="_blank"
>{{ section.btn1 }} >{{ section.btn1 }}
</g-link> </a>
<g-link <a
v-else
class=" class="
inline-block inline-block
green green
@@ -98,14 +100,15 @@
py-2 py-2
mr-5 mr-5
mb-4 mb-4
rounded
shadow shadow
rounded-full rounded-full
" "
:to="section.link2" :href="section.link1"
>{{ section.btn2 }}</g-link >{{ section.btn1 }}</a
> >
<g-link
<a
v-if="section.link2.includes('http')"
class=" class="
inline-block inline-block
green green
@@ -117,12 +120,71 @@
py-2 py-2
mr-5 mr-5
mb-4 mb-4
rounded
shadow shadow
rounded-full rounded-full
" "
:to="section.link3" :href="section.link2"
>{{ section.btn3 }}</g-link target="_blank"
>{{ section.btn2 }}
</a>
<a
v-else
class="
inline-block
green
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
:href="section.link2"
>{{ section.btn2 }}</a
>
<a
v-if="section.link3.includes('http')"
class="
inline-block
green
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
:href="section.link3"
target="_blank"
>{{ section.btn3 }}
</a>
<a
v-else
class="
inline-block
green
text-sm
learn-button
hover:bg-blue-800
text-gray-100
px-12
py-2
mr-5
mb-4
shadow
rounded-full
"
:href="section.link3"
>{{ section.btn3 }}</a
> >
<!-- <div v-html="main.content" class="text-sm text-gray-400 mt-5"></div> --> <!-- <div v-html="main.content" class="text-sm text-gray-400 mt-5"></div> -->
</div> </div>