Skip to content

Commit

Permalink
fix: move recent posts from sidebar to bottom, on blog detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
ktx-kirtan committed Dec 26, 2024
1 parent eb64237 commit 43827e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
9 changes: 2 additions & 7 deletions blog/components/blog/blog-toc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
</ul>
</div>
</div> -->
<div class="mt-10 px-8">
<!-- <div class="mt-10 px-8">
<h4 class="mb-4 text-xl font-medium text-gray-700">Recent Posts</h4>
<div class="max-w-sm mx-auto">
<div
Expand Down Expand Up @@ -167,7 +167,7 @@
</div>
</div>
</div>
</div>
</div> -->
</div>
</div>
</template>
Expand Down Expand Up @@ -201,11 +201,6 @@ let { data: categories } = await useAsyncData(`${type}-categories`, () =>
getCategories(type)
);
// get recentArticles
let { data: recentArticles } = await useAsyncData(
`${type}-recent-articles`,
() => getRecentArticles(type)
);
const formatDate = (date) => {
const options = { year: "numeric", month: "long", day: "numeric" };
Expand Down
2 changes: 2 additions & 0 deletions blog/pages/[type]/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@
:lastActiveTocId="lastActiveSection"
></blog-toc>
</div>
<LatestBlogPosts />

</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion components/BlogItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
>
<img :src="item.img || '/img/homepage/herosection1.jpg'" class="object-cover rounded-xl" :alt="item.title" />
<div class="flex-1">
<p class="mt-4 text-xl font-bold max-h-16 overflow-hidden">{{ item.title }}</p>
<p class="mt-4 text-xl font-bold overflow-hidden">{{ item.title }}</p>
</div>
<div
class="flex items-center justify-end cursor-pointer mt-4 transition-all duration-300 group-hover:text-theme-primary-400"
Expand Down

0 comments on commit 43827e9

Please sign in to comment.