File tree Expand file tree Collapse file tree 2 files changed +16
-19
lines changed
src/pages/showcase/_components/ShowcaseCard Expand file tree Collapse file tree 2 files changed +16
-19
lines changed Original file line number Diff line number Diff line change 1-
21import React from 'react' ;
32import clsx from 'clsx' ;
43import Image from '@theme/IdealImage' ;
@@ -26,7 +25,6 @@ const TagComp = React.forwardRef<HTMLLIElement, Tag>(
2625 ) ,
2726) ;
2827
29-
3028function ShowcaseCardTag ( { tags} : { tags : TagType [ ] } ) {
3129 const tagObjects = tags . map ( ( tag ) => ( { tag, ...Tags [ tag ] } ) ) ;
3230
@@ -35,7 +33,6 @@ function ShowcaseCardTag({tags}: {tags: TagType[]}) {
3533 TagList . indexOf ( tagObject . tag ) ,
3634 ) ;
3735
38-
3936 return (
4037 < >
4138 { tagObjectsSorted . map ( ( tagObject , index ) => {
@@ -58,7 +55,10 @@ function ShowcaseCardTag({tags}: {tags: TagType[]}) {
5855
5956function ShowcaseCard ( { user} : { user : User } ) {
6057 return (
61- < li key = { user . title } className = "card shadow--md" >
58+ < li
59+ key = { user . title }
60+ className = { clsx ( 'card shadow--md' , styles . card ) }
61+ >
6262 < div className = { clsx ( 'card__image' , styles . showcaseCardImage ) } >
6363 < Image img = { user . preview } alt = { user . title } />
6464 </ div >
@@ -93,4 +93,4 @@ function ShowcaseCard({user}: {user: User}) {
9393 ) ;
9494}
9595
96- export default React . memo ( ShowcaseCard ) ;
96+ export default React . memo ( ShowcaseCard ) ;
Original file line number Diff line number Diff line change 1010 height : 150px ;
1111 border-bottom : 2px solid var (--ifm-color-emphasis-200 );
1212}
13- .showcaseCardImage : hover {
14- transform : scale (0.9 );
15- }
13+
1614.showcaseCardHeader {
1715 display : flex;
1816 align-items : center;
1917 margin-bottom : 12px ;
2018}
21- .showcaseCardHeader : hover {
22- color : red;
23- text-shadow : 0 0 10px var (--ifm-color-primary );
24- }
19+
2520.showcaseCardTitle {
2621 margin-bottom : 0 ;
2722 flex : 1 1 auto;
2823}
29- .showcaseCardTitle : hover {
30- color : var (--ifm-color-primary );
31- text-shadow : 0 0 10px whitesmoke;
32- }
24+
3325
3426.showcaseCardTitle a {
3527 text-decoration : none;
7870.showcaseCardBody {
7971 font-size : smaller;
8072 line-height : 1.66 ;
81- text-shadow : 0 0 15px var (--ifm-color-primary );
8273}
8374.cardFooter {
8475 display : flex;
10798 margin-left : 6px ;
10899 margin-right : 6px ;
109100}
101+ .card {
102+ transition : transform 0.2s ease, box-shadow 0.2s ease;
103+ }
110104
111- .tag : hover {
112- text-shadow : 0 0 10px var (--ifm-color-secondary-dark );
105+ .card : hover {
106+ /* transform: translateY(-5px); */
107+ transform : scale (1.1 );
108+ box-shadow : 0 8px 16px white;
113109}
110+
You can’t perform that action at this time.
0 commit comments