Skip to content

Commit

Permalink
feat: optimize icon
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jun 30, 2023
1 parent 5402e7d commit 5c9f98d
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 37 deletions.
13 changes: 2 additions & 11 deletions src/components/icons/thumbs-up.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
import type { SVGProps } from 'react'

export function IonThumbsup(props: SVGProps<SVGSVGElement>) {
return (
<svg width="1em" height="1em" viewBox="0 0 512 512" {...props}>
<path
d="M424.2 259.3c13.8-4.5 23.8-17.5 23.8-32.8 0-19-15.4-34.5-34.5-34.5H310.9c2-25 10-53.6 1.1-87.3-7.5-28.4-39.4-49.7-52.4-36.8-5 4.9-3.5 15.2-3.5 33.8 0 42.8-17.8 86.1-39.8 108.7-9.4 9.7-25.2 13-40.2 13.6v-16H64v240h112v-32c20.6-.5 52.6 5.2 75.8 6.6 52 3.1 102-2.4 126.3-8.1 24.3-5.7 35-13 35-30.6 0-6.4-1.9-12.3-5.1-17.3 11.8-4.7 20.1-16.2 20.1-29.7 0-7.2-2.4-13.8-6.4-19.2 11.9-4.6 20.4-16.2 20.4-29.8-.1-12.5-7.4-23.4-17.9-28.6zM112 415.7c-8.8 0-16-7.1-16-16 0-8.8 7.2-16 16-16s16 7.1 16 16c0 8.8-7.2 16-16 16z"
fill="currentColor"
/>
</svg>
)
export function ThumbsupIcon() {
return <i className="icon-[mingcute--thumb-up-line]" />
}
13 changes: 0 additions & 13 deletions src/components/layout/header/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ import {
FaSolidHistory,
FaSolidSubway,
FaSolidUserFriends,
IcBaselineLiveTv,
IcTwotoneSignpost,
IonBook,
MdiFlask,
RiNeteaseCloudMusicLine,
} from '~/components/icons/menu-collection'

export interface IHeaderMenu {
Expand Down Expand Up @@ -95,17 +93,6 @@ export const headerMenuConfig: IHeaderMenu[] = [
path: '/says',
icon: h(FaSolidComments),
},
{
title: '听歌',
icon: h(RiNeteaseCloudMusicLine),
type: 'Music',
path: '/favorite/music',
},
{
title: '看番',
icon: h(IcBaselineLiveTv),
path: '/favorite/bangumi',
},
],
},
{
Expand Down
8 changes: 4 additions & 4 deletions src/components/widgets/note/NoteActionAside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ const LikeButton = () => {
>
<m.i
className={clsxm(
'icon-[mingcute--heart-fill] text-[24px] opacity-80 duration-200 hover:text-uk-red-light hover:opacity-100',

isLiked && 'text-uk-red-light',
'text-[24px] opacity-80 duration-200 hover:text-uk-red-light hover:opacity-100',
!isLiked && 'icon-[mingcute--heart-line]',
isLiked && 'icon-[mingcute--heart-fill] text-uk-red-light',
)}
animate={control}
variants={{
Expand Down Expand Up @@ -143,7 +143,7 @@ const ShareButton = () => {
}
}}
>
<i className="icon-[mingcute--share-forward-fill] text-[24px] opacity-80 duration-200 hover:text-uk-cyan-light hover:opacity-100" />
<i className="icon-[mingcute--share-forward-line] text-[24px] opacity-80 duration-200 hover:text-uk-cyan-light hover:opacity-100" />
</MotionButtonBase>
)
}
12 changes: 11 additions & 1 deletion src/components/widgets/note/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
export * from './NoteTimeline'
export * from './NoteActionAside'
export * from './NoteBanner'
export * from './NoteFooterNavigation'
export * from './NoteHideIfSecret'
export * from './NoteLeftSidebar'
export * from './NoteMainContainer'
export * from './NoteMetaBar'
export * from './NotePasswordForm'
export * from './NoteTimeline'
export * from './NoteTopic'
export * from './NoteTopicDetail'
export * from './NoteTopicInfo'
export * from './NoteTopicMarkdownRender'
12 changes: 5 additions & 7 deletions src/components/widgets/post/PostActionAside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { m, useAnimationControls, useForceUpdate } from 'framer-motion'

import { IonThumbsup } from '~/components/icons/thumbs-up'
import { ThumbsupIcon } from '~/components/icons/thumbs-up'
import { MotionButtonBase } from '~/components/ui/button'
import { useIsClient } from '~/hooks/common/use-is-client'
import { routeBuilder, Routes } from '~/lib/route-builder'
Expand Down Expand Up @@ -59,9 +59,7 @@ const LikeButton = () => {
className="flex flex-col space-y-2"
onClick={() => {
handleLike()
control.start('tap', {
repeat: 5,
})
control.start('tap')
toast('捕捉一只大佬!', undefined, {
iconElement: (
<m.i
Expand All @@ -73,7 +71,7 @@ const LikeButton = () => {
scale: 1.22,
}}
>
<IonThumbsup />
<ThumbsupIcon />
</m.i>
),
})
Expand All @@ -95,7 +93,7 @@ const LikeButton = () => {
easings: ['easeInOut'],
}}
>
<IonThumbsup />
<ThumbsupIcon />
</m.i>
</MotionButtonBase>
)
Expand Down Expand Up @@ -142,7 +140,7 @@ const ShareButton = () => {
}
}}
>
<i className="icon-[mingcute--share-forward-fill] text-[24px] opacity-80 duration-200 hover:text-uk-cyan-light hover:opacity-100" />
<i className="icon-[mingcute--share-forward-line] text-[24px] opacity-80 duration-200 hover:text-uk-cyan-light hover:opacity-100" />
</MotionButtonBase>
)
}
9 changes: 9 additions & 0 deletions src/components/widgets/post/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export * from './PostActionAside'
export * from './PostCopyright'
export * from './PostItem'
export * from './PostItemHoverOverlay'
export * from './PostMetaBar'
export * from './PostOutdate'
export * from './PostPagination'
export * from './PostPinIcon'
export * from './PostRelated'
2 changes: 1 addition & 1 deletion src/components/widgets/shared/DonateButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const DonateButtonInternal: Component<HTMLMotionProps<'button'>> = ({
}}
{...props}
>
<i className="icon-[material-symbols--coffee] text-[24px] opacity-80 duration-200 hover:text-uk-brown-dark hover:opacity-100" />
<i className="icon-[material-symbols--coffee-outline-sharp] text-[24px] opacity-80 duration-200 hover:text-uk-brown-dark hover:opacity-100" />
</MotionButtonBase>
)
}
3 changes: 3 additions & 0 deletions src/components/widgets/subscribe/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './SubscribeBell'
export * from './SubscribeModal'
export * from './hooks'

1 comment on commit 5c9f98d

@vercel
Copy link

@vercel vercel bot commented on 5c9f98d Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

springtide – ./

springtide-innei.vercel.app
springtide-git-main-innei.vercel.app
springtide.vercel.app
innei.in

Please sign in to comment.