Browse Source

提交代码

master
科技小王子 3 weeks ago
parent
commit
6f557d08dc
  1. 2
      src/components/Header.tsx
  2. 12
      src/pages/index/index.tsx

2
src/components/Header.tsx

@ -22,7 +22,7 @@ function Header(props) {
</>
}
>
<span className={'text-white'}>{props?.title || '标题'}</span>
<span className={'text-white font-bold text-sm'}>{props?.title || '标题'}</span>
</NavBar>
</>
)

12
src/pages/index/index.tsx

@ -44,6 +44,7 @@ function Home() {
background: 'url(https://oss.wsdns.cn/20250413/defb52abb1414429930ae2727d2b8ff6.png)',
backgroundSize: 'cover',
color: '#fff',
height: screenWidth > 800 ? '80px' : '',
}}
fixed={true}
onBackClick={() => {
@ -53,9 +54,10 @@ function Home() {
<Avatar
size="28"
shape="square"
style={{ backgroundColor: '#fff'}}
src={website?.websiteLogo}
/>
{website.websiteName}
<span className={'font-bold'} style={{ fontSize: screenWidth > 800 ? '20px' : '20px' }}>{website.websiteName}</span>
</div>
}
>
@ -64,8 +66,8 @@ function Home() {
className={'mt-8 p-2 py-3 w-full'}
style={{
height: 'calc(100vh - 2rem)',
background: screenWidth > 390 ? 'url(https://oss.wsdns.cn/20250413/4650a6d214434159a5d6bf161c7a9367.png?x-oss-process=image/resize,m_fixed,w_2000/quality,Q_90) #fef2f2' : 'url(https://oss.wsdns.cn/20250413/4650a6d214434159a5d6bf161c7a9367.png?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90) #fef2f2',
backgroundSize: screenWidth > 390 ? 'cover' : '100%',
background: screenWidth > 800 ? 'url(https://oss.wsdns.cn/20250413/4650a6d214434159a5d6bf161c7a9367.png?x-oss-process=image/resize,m_fixed,w_2000/quality,Q_90) #fef2f2' : 'url(https://oss.wsdns.cn/20250413/4650a6d214434159a5d6bf161c7a9367.png?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90) #fef2f2',
backgroundSize: screenWidth > 800 ? 'cover' : '100%',
backgroundPosition: 'bottom',
backgroundRepeat: 'no-repeat'
}}>
@ -76,7 +78,7 @@ function Home() {
return (
<div style={{maxWidth: '1024px',marginBottom: '20px'}} className={'item bg-white p-2 m-auto rounded-lg hover:bg-red-200 cursor-pointer'} onClick={() => onNav(item)}>
<div key={index} className={'flex items-center'}>
<Avatar src={item.icon} size={'90'}/>
<Avatar src={item.icon} shape="square" className={'bg-white'} size={'80'}/>
<div className={'flex flex-col ml-3'}>
<div className={'title font-bold'} style={{ fontSize: '24px'}}>{item.title}</div>
<div className={'comments text-gray-400 my-1'} style={{ fontSize: '18px'}}>{item.comments}</div>
@ -95,7 +97,7 @@ function Home() {
return (
<div className={'w-full item bg-white mb-2 p-2 m-auto rounded-lg cursor-pointer'} onClick={() => onNav(item)}>
<div key={index} className={'flex items-center'}>
<Avatar src={item.icon} size={'45'}/>
<Avatar src={item.icon} shape="square" size={'45'}/>
<div className={'flex flex-col ml-3'}>
<div className={'title font-bold'} style={{ fontSize: '18px'}}>{item.title}</div>
<div className={'comments text-gray-400 my-1'} style={{ fontSize: '14px'}}>{item.comments}</div>

Loading…
Cancel
Save