Skip to content

Commit

Permalink
#55 ブログタブを変更
Browse files Browse the repository at this point in the history
  • Loading branch information
miyaji255 committed Jan 3, 2024
1 parent 4b65487 commit 79e6d95
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 59 deletions.
51 changes: 28 additions & 23 deletions src/components/blog/ListViewTab.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,32 @@ const items: Item[] = [
const { current } = Astro.props
---

<div class="bg-dot bg-dot-white flex justify-center">
<div class="w-full max-w-padded-container">
<ul class="flex gap-2 px-8 pt-3">
{
items.map((item) => (
<li class:list={[]}>
<a
class:list={[
'whitespace-nowrap rounded-t-xl border-x-2 border-t-2 border-secondary px-2 py-1',
{
'bg-white': item.path !== current,
'bg-secondary': item.path === current,
},
]}
href={item.path}
>
{item.text}
</a>
</li>
))
}
</ul>
</div>
<div class="flex justify-center bg-white">
<ul class="flex gap-4 px-8 pt-3">
{
items.map((item) => (
<li
class:list={[
{
'after:block after:h-1 after:rounded-t after:bg-primary':
item.path === current,
},
]}
>
<a
class:list={[
'whitespace-nowrap px-2 text-2xl',
{
'text-black': item.path === current,
'pb-1 text-gray-600 hover:text-black': item.path !== current,
},
]}
href={item.path}
>
<h1 class="inline-block">{item.text}</h1>
</a>
</li>
))
}
</ul>
</div>
34 changes: 0 additions & 34 deletions src/components/layout/nav/BlogNav.astro

This file was deleted.

2 changes: 0 additions & 2 deletions src/layouts/BlogLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import BaseLayout from './BaseLayout.astro'
import Header from '@/components/layout/nav/Header.astro'
import Footer from '@/components/layout/Footer.astro'
import BlogNav from '@/components/layout/nav/BlogNav.astro'
export interface Props {
title: string
Expand Down Expand Up @@ -36,7 +35,6 @@ const ogImageUrl = new URL(image, Astro.site).toString()
headerTitle="BLOG"
rootPath="/blog"
/>
<BlogNav />
<div class="bg-dot bg-dot-secondary flex-grow">
<slot />
</div>
Expand Down

0 comments on commit 79e6d95

Please sign in to comment.