tag调整

This commit is contained in:
tangly
2022-11-05 16:59:42 +08:00
parent 77821fb16e
commit aa33febef4
2 changed files with 13 additions and 3 deletions

View File

@@ -1,10 +1,20 @@
import BLOG from '@/blog.config'
import BlogPostListScroll from './components/BlogPostListScroll'
import BlogPostListPage from './components/BlogPostListPage'
import LayoutBase from './LayoutBase'
import TagItemMini from '../next/components/TagItemMini'
export const LayoutTag = (props) => {
const { tags, posts, tag } = props
console.log(props)
const currentTag = props.tags.find((t) => {
return t.name === props.tag
})
return <LayoutBase {...props}>
<BlogPostListScroll posts={posts} tags={tags} currentTag={tag}/>
<div className="cursor-pointer px-5 py-1 mb-2 font-light hover:underline hover:text-indigo-700 dark:hover:text-indigo-400 transform text-center dark:text-white">
<TagItemMini tag={currentTag}/>
</div>
{BLOG.POST_LIST_STYLE === 'page' ? <BlogPostListPage {...props} /> : <BlogPostListScroll {...props} />}
</LayoutBase>
}

View File

@@ -39,7 +39,7 @@ const StickyBar = ({ children }) => {
return (
<div id='sticky-bar' className='sticky flex-grow justify-center top-0 duration-500 z-10 pb-16'>
<div className='glassmorphism dark:border-gray-600 px-5 absolute shadow-md border w-full scroll-hidden'>
<div className='bg-white dark:bg-black px-5 absolute shadow-md w-full scroll-hidden'>
<div id='tag-container' className="md:pl-3 overflow-x-auto">
{children}
</div>