This commit is contained in:
tangly1024
2023-06-23 15:56:59 +08:00
parent 5f29858c37
commit a1708605da
7 changed files with 39 additions and 25 deletions

View File

@@ -21,7 +21,7 @@ const ThemeGlobalMedium = createContext()
* @constructor
*/
const LayoutBase = props => {
const { children, meta, showInfoCard = true, slotLeft, slotTop, siteInfo } = props
const { children, meta, showInfoCard = true, slotRight, slotTop, siteInfo } = props
const { locale } = useGlobal()
const router = useRouter()
const [tocVisible, changeTocVisible] = useState(false)
@@ -43,7 +43,7 @@ const LayoutBase = props => {
{/* 桌面端左侧菜单 */}
{/* <LeftMenuBar/> */}
<div id='container-inner' className='w-full relative z-10'>
<div id='container-wrapper' className='w-full relative z-10'>
{/* 顶部导航栏 */}
<TopNavBar {...props} />
@@ -71,7 +71,7 @@ const LayoutBase = props => {
<div className={`hidden xl:block border-l dark:border-transparent w-96 relative z-10 ${CONFIG_MEDIUM.RIGHT_PANEL_DARK ? 'bg-hexo-black-gray dark' : ''}`}>
<div className='py-14 px-6 sticky top-0'>
<Tabs>
{slotLeft}
{slotRight}
<div key={locale.NAV.ABOUT}>
{router.pathname !== '/search' && <SearchInput className='mt-6 mb-12' />}
{showInfoCard && <InfoCard {...props} />}

View File

@@ -17,7 +17,7 @@ export const MenuItemDrop = ({ link }) => {
return <li className='cursor-pointer list-none items-center flex mx-2' onMouseOver={() => changeShow(true)} onMouseOut={() => changeShow(false)} >
{hasSubMenu &&
<div className={'px-1 h-full whitespace-nowrap duration-300 text-sm justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
<div className={'px-3 h-full whitespace-nowrap duration-300 text-sm justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
(selected ? 'bg-green-600 text-white hover:text-white' : 'hover:text-green-600')}>
<div>
{link?.icon && <i className={link?.icon} />} {link?.name}
@@ -27,7 +27,7 @@ export const MenuItemDrop = ({ link }) => {
}
{!hasSubMenu &&
<div className={'px-1 h-full whitespace-nowrap duration-300 text-sm justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
<div className={'px-3 h-full whitespace-nowrap duration-300 text-sm justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
(selected ? 'bg-green-600 text-white hover:text-white' : 'hover:text-green-600')}>
<Link href={link?.to}>
{link?.icon && <i className={link?.icon} />} {link?.name}