File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed
themes/magzine/components Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -147,10 +147,10 @@ export default function Header(props) {
147
147
{ ! showSearchInput && (
148
148
< >
149
149
{ /* 左侧图标Logo */ }
150
- < div className = 'flex gap-x-8 h-full' >
151
- < LogoBar { ... props } />
150
+ < div className = 'flex gap-x-2 lg:gap-x-4 h-full' >
151
+ < LogoBar className = { 'text-sm md:text-md lg:text-lg' } />
152
152
{ /* 桌面端顶部菜单 */ }
153
- < ul className = 'hidden md:flex items-center gap-x-4 py-1' >
153
+ < ul className = 'hidden md:flex items-center gap-x-4 py-1 text-sm md:text-md ' >
154
154
{ links &&
155
155
links ?. map ( ( link , index ) => (
156
156
< MenuItemDrop key = { index } link = { link } />
Original file line number Diff line number Diff line change 1
1
import { siteConfig } from '@/lib/config'
2
2
import Link from 'next/link'
3
3
4
- export default function LogoBar ( props ) {
4
+ export default function LogoBar ( { className } ) {
5
5
return (
6
- < div id = 'top-wrapper' className = 'w-full flex items-center ' >
6
+ < div
7
+ id = 'top-wrapper'
8
+ className = { `w-full flex items-center ${ className || '' } ` } >
7
9
< Link
8
10
href = '/'
9
- className = 'logo flex text-md font-semibold md:text-xl hover:bg-black hover:text-white p-2 rounded-xl duration-200 dark:text-gray-200' >
11
+ className = 'logo flex font-semibold hover:bg-black hover:text-white p-2 rounded-xl duration-200 dark:text-gray-200' >
10
12
{ /* <LazyImage
11
13
src={siteInfo?.icon}
12
14
width={24}
Original file line number Diff line number Diff line change @@ -22,13 +22,13 @@ export const MenuItemDrop = ({ link }) => {
22
22
{ hasSubMenu && (
23
23
< div
24
24
className = {
25
- 'px-2 h-full whitespace-nowrap duration-300 text-md justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
25
+ 'px-2 h-full whitespace-nowrap duration-300 justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
26
26
( selected
27
27
? 'bg-gray-600 text-white hover:text-white'
28
28
: 'hover:text-gray-600' )
29
29
} >
30
- < div className = 'items-center flex gap-x-1 ' >
31
- { link ?. icon && < i className = { link ?. icon } /> } { link ?. name }
30
+ < div className = 'items-center flex' >
31
+ { link ?. icon && < i className = { ` ${ link ?. icon } pr-2` } /> } { link ?. name }
32
32
< i
33
33
className = { `px-1 fas fa-chevron-down duration-500 transition-all ${ show ? ' rotate-180' : '' } ` } > </ i >
34
34
</ div >
@@ -52,15 +52,15 @@ export const MenuItemDrop = ({ link }) => {
52
52
{ /* 子菜单 */ }
53
53
{ hasSubMenu && (
54
54
< ul
55
- className = { `${ show ? 'visible opacity-100 top-14' : 'invisible opacity-0 top-20' } absolute border bg-white dark:bg-black dark:border-gray-800 transition-all duration-150 z-20 block rounded-lg drop-shadow-lg p-4 ` } >
55
+ className = { `${ show ? 'visible opacity-100 top-14' : 'invisible opacity-0 top-20' } p-1 absolute border bg-white dark:bg-black dark:border-gray-800 transition-all duration-150 z-20 block rounded-lg drop-shadow-lg` } >
56
56
{ link ?. subMenus ?. map ( sLink => {
57
57
return (
58
58
< li
59
59
key = { sLink . id }
60
- className = 'dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200 dark:border-gray-800 py-3 pr-6 pl-3 ' >
60
+ className = 'py-3 pr-6 hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-gray-200 tracking-widest transition-color duration-200 dark:border-gray-800 ' >
61
61
< Link href = { sLink . href } target = { link ?. target } >
62
- < span className = 'text-sm' >
63
- { link ?. icon && < i className = { sLink ?. icon } > </ i > }
62
+ < span className = 'text-sm ml-2 ' >
63
+ { link ?. icon && < i className = { ` ${ sLink ?. icon } pr-2` } > </ i > }
64
64
{ sLink . title }
65
65
</ span >
66
66
</ Link >
You can’t perform that action at this time.
0 commit comments