Skip to content

Commit

Permalink
chore: update index
Browse files Browse the repository at this point in the history
  • Loading branch information
YuzeTT committed Nov 22, 2023
1 parent 9a3b8f2 commit cb11539
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 28 deletions.
Binary file added public/images/icons/cotti.webp
Binary file not shown.
39 changes: 21 additions & 18 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { message } from 'antd'
// import { Button } from '@chakra-ui/react'
import { useNavigate } from 'react-router-dom';
// import { useNavigate } from 'react-router-dom';
import { CopyToClipboard } from 'react-copy-to-clipboard';
import list from '../utils/router'
// import FollowMe from '../components/FollowMe';
import isVip from '../utils/isVip';
import AccountButton from "../components/AccountButton";

export default function index() {
const navigate = useNavigate();
// const navigate = useNavigate();

const jumpBefore = (url: string) => {
jump(url)
}
// const jumpBefore = (url: string) => {
// jump(url)
// }

const jump = (url: string) => {
navigate(url)
}
// const jump = (url: string) => {
// navigate(url)
// }

// const h = 0
const h = new Date().getHours()
Expand Down Expand Up @@ -85,21 +85,24 @@ export default function index() {
<AccountButton />
</div>
</div>
<div className='mb-6 mt-6 text-[24px] font-bold relative'>所有工具</div>
<div className='grid grid-cols-2 md:grid-cols-3 gap-8'>
<div className='mb-6 mt-6 text-[24px] font-bold relative px-4 flex items-center gap-2'>
<div>所有工具</div>
<div className='text-[1rem] bg-gray-100 text-gray-600 px-1 py-0.5 rounded'>Beta</div>
</div>
<div className='grid grid-cols-1 md:grid-cols-2 gap-8 px-4'>
{list.done.map((item, key)=>(
<a href={item.url} className='flex items-center' key={key}>
<a href={item.url} className='flex' key={key}>
<div className={`flex items-center justify-center h-13.5 w-13.5 rounded-md p-3`} style={{background: `linear-gradient(to top right, ${item.color[0]}, ${item.color[1]})`}}>
<img src={item.logo} alt="logo" className='w-auto max-h-8 h-auto' />
</div>
<div className='ml-4'>
<div className='text-md font-bold'>{item.name[0]}</div>
<div className='text-xs op50 mt-1'>{item.name[1]}</div>
<div className='ml-4 flex-1'>
<div className='text-[16px] font-bold'>{item.name[0]}</div>
<div className='text-[14px] op50 mt-1'>{item.name[1]}</div>
</div>
</a>
))}
</div>
<div text='sm' op50 mb-2>已完成</div>
{/* <div text='sm' op50 mb-2>已完成</div>
<div className='grid grid-cols-2 md:grid-cols-3 gap-3'>
{list.done.map((item, key)=>(
<div p-4 cursor-pointer rounded-xl decoration-none relative overflow-hidden className='bg-white z-0 card hover:bg-zinc-50 transition' key={key} onClick={()=>{jumpBefore(item.url)}}>
Expand All @@ -120,8 +123,8 @@ export default function index() {
}
</div>
))}
</div>
<div text='sm' op50 mb-2 mt-4>待制作(或许赞助可以加速呢!)</div>
</div> */}
{/* <div text='sm' op50 mb-2 mt-4>待制作(或许赞助可以加速呢!)</div>
<div className='grid grid-cols-2 md:grid-cols-3 gap-3 op50'>
{list.todo.map((item, key)=>(
<div p-4 className='card hover:bg-zinc-50 transition' rounded-xl decoration-none key={key} >
Expand All @@ -132,7 +135,7 @@ export default function index() {
<div text='sm zinc-500'>{item.name[1]}</div>
</div>
))}
</div>
</div> */}
{isVip().is_vip?'':
<div className='card p-2 rounded-2xl mt-4'>
<div className='mb-3 mt-1 mx-2 text-zinc-600 text-sm'>广告</div>
Expand Down
20 changes: 10 additions & 10 deletions src/utils/router.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import LuckingCoffee from '/images/lucking_coffee.svg'
// import LuckingCoffee from '/images/lucking_coffee.svg'
import Train from '/images/train.svg'
// import Ticket_ from '/images/damai.png'
import Ticket from '/images/cinema_logo.png'
import Mcdonald from '/images/mcdonald.png'
import Heytea from '/images/heytea.png'
// import Heytea from '/images/heytea.png'
import Chagee from '/images/chagee.png'

const hot = ['#FEE2E2','#DC2626']
Expand All @@ -12,7 +12,7 @@ const hot = ['#FEE2E2','#DC2626']
const list = {
done: [
{
name: ['Apple Music', '播放器 透卡/小卡'],
name: ['Apple Music', '播放器 透卡/小卡 88.5mm*57m(含出血3mm)'],
logo: '/images/icons/music.webp',
url: '/tools/music',
color: ['#EB4666', '#EF4146'],
Expand Down Expand Up @@ -95,7 +95,7 @@ const list = {
name: ['瑞幸咖啡', '咖啡标签'],
logo: '/images/icons/lucking_coffee.webp',
url: '/lucking_coffee',
color: ['#EB4666', '#EF4146'],
color: ['#0022AB', '#1641eb'],
tag: '热门',
tag_color: hot
},
Expand All @@ -109,25 +109,25 @@ const list = {
},
{
name: ['库迪咖啡', '咖啡标签'],
logo: '/images/cotti.png',
logo: '/images/icons/cotti.webp',
url: '/tools/cotti',
color: ['#EB4666', '#EF4146'],
color: ['#CF323B', '#ff6069'],
tag: '',
tag_color: ['','']
},
{
name: ['照片打卡', '纪念卡'],
logo: '/images/photo.png',
url: '/photo',
color: ['#EB4666', '#EF4146'],
color: ['#1254E2', '#2F70FA'],
tag: '',
tag_color: ['','']
},
{
name: ['路牌', '你懂的'],
name: ['路牌', '写啥都很土的小牌子 可加杆子'],
logo: '/images/guideboard.png',
url: '/guideboard',
color: ['#EB4666', '#EF4146'],
color: ['#1F4DA0', '#2869dd'],
tag: '',
tag_color: ['','']
},
Expand All @@ -143,7 +143,7 @@ const list = {
name: ['霸王茶姬', '奶茶标签'],
logo: Chagee,
url: '/tools/chagee',
color: ['#EB4666', '#EF4146'],
color: ['#EA1C24', '#ff4a51'],
tag: '',
tag_color: ['','']
},
Expand Down

0 comments on commit cb11539

Please sign in to comment.