Rotuer link fixes

This commit is contained in:
2020-08-11 05:26:29 +05:00
parent 162a5b7c82
commit 1e9728f6fb
2 changed files with 75 additions and 65 deletions

View File

@@ -14,14 +14,17 @@
> >
<!-- sub-main posts --> <!-- sub-main posts -->
<div class="md:w-4/7"> <div class="md:w-4/7">
<div <div v-for="subarticle in subarticles" :key="subarticle.id">
v-for="subarticle in subarticles" <router-link
:key="subarticle.id" :to="{
name: 'article.show',
params: { id: subarticle.id }
}"
class="rounded w-full flex flex-col md:flex-row mb-10" class="rounded w-full flex flex-col md:flex-row mb-10"
> >
<div class="bg-white rounded px-4"> <div class="bg-white rounded px-4">
<div <div
class="md:mt-0 text-gray-800 font-semibold text-xl mb-2 text-right leading-8 MvAamu" class="md:mt-0 text-gray-800 font-semibold text-xl mb-2 text-right leading-8 MvAamu hover:underline"
v-text="subarticle.title" v-text="subarticle.title"
style="direction:rtl;" style="direction:rtl;"
></div> ></div>
@@ -61,7 +64,9 @@
v-text="subarticle.readtime" v-text="subarticle.readtime"
></span> ></span>
<p class="text-gray-600 text-sm text-right mb-2"> <p
class="text-gray-600 text-sm text-right mb-2"
>
&#8210; &#8210;
{{ {{
subarticle.published_date subarticle.published_date
@@ -80,6 +85,7 @@
:src="subarticle.featured_image" :src="subarticle.featured_image"
class="block md:hidden lg:block rounded-md h-64 md:h-32 m-4 md:m-0" class="block md:hidden lg:block rounded-md h-64 md:h-32 m-4 md:m-0"
/> />
</router-link>
</div> </div>
</div> </div>
@@ -88,20 +94,24 @@
class="mb-4 lg:mb-0 p-4 lg:p-0 w-full md:w-4/7 relative rounded block" class="mb-4 lg:mb-0 p-4 lg:p-0 w-full md:w-4/7 relative rounded block"
v-if="article" v-if="article"
> >
<a href="#"> <router-link
:to="{ name: 'article.show', params: { id: article.id } }"
>
<img <img
:src="article.featured_image" :src="article.featured_image"
class="rounded-md object-cover w-full h-3/4" class="rounded-md object-cover w-full h-3/4"
/> />
</a> </router-link>
<a href="#"> <router-link
:to="{ name: 'article.show', params: { id: article.id } }"
>
<h1 <h1
class="text-gray-800 text-3xl font-bold mt-2 mb-2 leading-tigh hover:underline text-right MvAamu" class="text-gray-800 text-3xl font-bold mt-2 mb-2 leading-tigh hover:underline text-right MvAamu"
style="direction:rtl;" style="direction:rtl;"
v-text="article.title" v-text="article.title"
></h1> ></h1>
</a> </router-link>
<div class="flex justify-end items-center"> <div class="flex justify-end items-center">
<div> <div>

View File

@@ -4,7 +4,7 @@
<div class="absolute left-0 bottom-0 w-full h-full z-10 image-dark" <div class="absolute left-0 bottom-0 w-full h-full z-10 image-dark"
:style="{'background-image':'url(' + article.featured_image + ')'}" :style="{'background-image':'url(' + article.featured_image + ')'}"
></div> ></div>
<div class="p-4 absolute bottom-0 left-0 z-20"> <div class="p-4 absolute bottom-0 right-0 z-20">
<h2 class="text-3xl font-semibold text-gray-100 leading-relaxed text-right MvAamu" style="direction:rtl;" v-text="article.title"></h2> <h2 class="text-3xl font-semibold text-gray-100 leading-relaxed text-right MvAamu" style="direction:rtl;" v-text="article.title"></h2>
<div class="flex justify-end mt-3"> <div class="flex justify-end mt-3">
<img v-if="article.source" :src="article.source.logo" <img v-if="article.source" :src="article.source.logo"