fix nav-tag-link , fix format

This commit is contained in:
tangly1024
2023-01-07 17:03:47 +08:00
parent 24ab8a3971
commit b3bb7f6541
18 changed files with 30 additions and 30 deletions

View File

@@ -6,9 +6,6 @@ import { useEffect, useState } from 'react'
import CONFIG_MATERY from '../config_matery'
export default function ArticleCopyright () {
if (!CONFIG_MATERY.ARTICLE_COPYRIGHT) {
return <></>
}
const router = useRouter()
const [path, setPath] = useState(BLOG.LINK + router.asPath)
useEffect(() => {
@@ -16,6 +13,11 @@ export default function ArticleCopyright () {
})
const { locale } = useGlobal()
if (!CONFIG_MATERY.ARTICLE_COPYRIGHT) {
return <></>
}
return (
<section className="dark:text-gray-300 mt-6 mx-1 ">
<ul className="overflow-x-auto whitespace-nowrap text-sm dark:bg-gray-900 bg-gray-100 p-5 leading-8 border-l-2 border-indigo-500">
@@ -37,5 +39,5 @@ export default function ArticleCopyright () {
</li>
</ul>
</section>
);
)
}

View File

@@ -43,5 +43,5 @@ export const ArticleInfo = (props) => {
</div>
</section>
);
)
}

View File

@@ -57,9 +57,9 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) {
</div>
</Link>)
);
)
})}
</div>
</div>
);
)
}

View File

@@ -42,7 +42,7 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
))}
</ul>
</div>
);
)
}
}

View File

@@ -22,10 +22,10 @@ const CategoryGroup = ({ currentCategory, categories }) => {
<div> <i className={`mr-2 fas ${selected ? 'fa-folder-open' : 'fa-folder'}`} />{category.name}({category.count})</div>
</Link>
);
)
})}
</div>
</>;
</>
}
export default CategoryGroup

View File

@@ -39,7 +39,7 @@ const HexoRecentComments = (props) => {
</div>)}
</Card>
);
)
}
export default HexoRecentComments

View File

@@ -57,8 +57,8 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => {
</div>
</Link>)
);
)
})}
</>;
</>
}
export default LatestPostsGroup

View File

@@ -10,6 +10,6 @@ const Logo = props => {
<div className=' text-lg p-1.5 rounded dark:border-white hover:scale-110 transform duration-200'> {siteInfo?.title || BLOG.TITLE}</div>
</div>
</Link>
);
)
}
export default Logo

View File

@@ -36,12 +36,12 @@ const MenuButtonGroupTop = (props) => {
</div>
</Link>
);
)
} else {
return null
}
})}
</nav>
);
)
}
export default MenuButtonGroupTop

View File

@@ -34,12 +34,12 @@ const MenuGroupCard = (props) => {
</div>
</Link>
);
)
} else {
return null
}
})}
</nav>
);
)
}
export default MenuGroupCard

View File

@@ -41,12 +41,12 @@ const MenuList = (props) => {
{link.slot}
</Link>
);
)
} else {
return null
}
})}
</nav>
);
)
}
export default MenuList

View File

@@ -25,9 +25,9 @@ const NavButtonGroup = (props) => {
className='text-center w-full md:mx-6 md:w-40 md:h-14 lg:h-20 h-14 justify-center items-center flex border-2 cursor-pointer rounded-lg glassmorphism hover:bg-white hover:text-black duration-200 font-bold hover:scale-110 transform'>
{category.name}
</Link>
);
)
})}
</nav>
);
)
}
export default NavButtonGroup

View File

@@ -47,7 +47,7 @@ const PaginationNumber = ({ page, totalPage }) => {
</Link>
</div>
);
)
}
function getPageElement(page, currentPage, pagePrefix) {
@@ -66,7 +66,7 @@ function getPageElement(page, currentPage, pagePrefix) {
{page}
</Link>)
);
)
}
function generatePages(pagePrefix, page, currentPage, totalPage) {

View File

@@ -51,7 +51,7 @@ const PaginationSimple = ({ page, totalPage }) => {
</button>
</Link>
</div>
);
)
}
export default PaginationSimple

View File

@@ -18,11 +18,9 @@ const SideBar = (props) => {
const defaultLinks = [
{ icon: 'fas fa-home', name: locale.NAV.INDEX, to: '/' || '/', show: true },
{ icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: true },
{ icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', show: CONFIG_MATERY.MENU_ARCHIVE },
{ icon: 'fas fa-folder', name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG_MATERY.MENU_CATEGORY },
{ icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: CONFIG_MATERY.MENU_TAG }
]
let links = [].concat(defaultLinks)
if (customNav) {

View File

@@ -14,7 +14,7 @@ const TagItemMiddle = ({ tag, selected = false }) => {
{tag.name + (tag.count ? `(${tag.count})` : '')} </div>
</Link>
);
)
}
export default TagItemMiddle

View File

@@ -12,7 +12,7 @@ const TagItemMini = ({ tag, selected = false }) => {
<div className='font-light'>{selected && <i className='mr-1 fa-tag'/>} {tag.name + (tag.count ? `(${tag.count})` : '')} </div>
</Link>
);
)
}
export default TagItemMini

View File

@@ -10,10 +10,10 @@ import CONFIG_MATERY from '../config_matery'
* @constructor
*/
const TocDrawerButton = (props) => {
const { locale } = useGlobal()
if (!CONFIG_MATERY.WIDGET_TOC) {
return <></>
}
const { locale } = useGlobal()
return (<div onClick={props.onClick} className='py-2 px-3 cursor-pointer transform duration-200 flex justify-center items-center w-7 h-7 text-center' title={locale.POST.TOP} >
<i className='fas fa-list-ol text-xs'/>
</div>)