💅 微调样式

This commit is contained in:
tangly1024
2021-09-27 21:25:58 +08:00
parent 8e8fffdd51
commit 82c32e1b6f
4 changed files with 8 additions and 8 deletions

View File

@@ -4,7 +4,7 @@ import TagItem from '@/components/TagItem'
const BlogPost = ({ post }) => {
return (
<article key={post.id}
className='inline-block my-2 md:mx-2 w-full md:max-w-md duration-200 transform hover:scale-105 rounded-3xl bg-white dark:bg-gray-800 dark:hover:bg-gray-600 overflow-hidden'>
className='inline-block border dark:border-gray-600 my-2 md:mx-2 w-full md:max-w-md duration-200 transform hover:scale-105 rounded-3xl bg-white dark:bg-gray-700 dark:hover:bg-gray-600 overflow-hidden'>
{/* 封面图 */}
{post.page_cover && post.page_cover.length > 1 && (
<a href={`${BLOG.path}/article/${post.slug}`} className='md:flex-shrink-0 md:w-52 md:h-52 rounded-lg'>
@@ -14,10 +14,10 @@ const BlogPost = ({ post }) => {
<div className='px-8 py-6'>
<a href={`${BLOG.path}/article/${post.slug}`}
className='block my-3 text-2xl leading-tight font-semibold text-black dark:text-gray-200 hover:underline'>
className='block my-3 text-2xl leading-tight font-semibold text-black dark:text-gray-100 hover:underline'>
{post.title}
</a>
<p className='mt-2 text-gray-500 dark:text-gray-400 text-sm'>{post.summary}</p>
<p className='mt-2 text-gray-500 dark:text-gray-300 text-sm'>{post.summary}</p>
<div className='flex flex-nowrap leading-8 py-2'>
{post.tags.map(tag => (
<TagItem key={tag} tag={tag} />

View File

@@ -46,7 +46,7 @@ const SideBar = ({ tags, currentTag }) => {
<section className='mx-5 pt-5 pb-2'>
<Link href='/'>
<a
className='text-3xl hover:shadow-2xl bg-gray-500 text-white dark:bg-gray-900 dark:text-gray-300 font-semibold hover:bg-gray-800 hover:text-white p-2 duration-200'>{BLOG.title}</a>
className='text-3xl hover:shadow-2xl text-black dark:bg-gray-900 dark:text-gray-300 font-semibold hover:bg-gray-800 hover:text-white p-2 duration-200'>{BLOG.title}</a>
</Link>
</section>
@@ -56,7 +56,7 @@ const SideBar = ({ tags, currentTag }) => {
</section>
{/* 搜索框 */}
<div className='flex justify-center items-center py-5 pr-5 pl-2 bg-gray-200 dark:bg-black'>
<div className='flex justify-center items-center py-5 pr-5 pl-2 bg-gray-100 dark:bg-black'>
<input
type='text'
placeholder={

View File

@@ -3,8 +3,8 @@ import Link from 'next/link'
const TagItem = ({ tag }) => (
<Link href={`/tag/${encodeURIComponent(tag)}`}>
<a>
<p className="hover:shadow hover:scale-105 hover:bg-blue-500 bg-gray-200 hover:text-white duration-200 mr-1 px-2 py-1 leading-none text-sm
dark:bg-gray-500 dark:hover:bg-black">
<p className="hover:shadow hover:scale-105 hover:bg-blue-500 bg-gray-200 hover:text-white duration-200 mr-1 px-2 py-1 leading-none text-sm
dark:bg-gray-500 dark:text-gray-100 dark:hover:bg-black">
{tag}
</p>
</a>

View File

@@ -77,7 +77,7 @@ const DefaultLayout = ({ tags, posts, page, currentTag, ...customMeta }) => {
{/* <TopNav tags={tags} currentTag={currentTag} /> */}
{/* <Header navBarTitle={meta.title} fullWidth={true}/> */}
<div className={`${BLOG.font} flex bg-gray-200 dark:bg-black min-h-screen`}>
<div className={`${BLOG.font} flex bg-gray-100 dark:bg-black min-h-screen`}>
<SideBar tags={tags} currentTag={currentTag} />
<main className='md:pb-10 md:px-24 p-5 flex-grow'>