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
-
2
1
import React from 'react' ;
3
2
import clsx from 'clsx' ;
4
3
import Image from '@theme/IdealImage' ;
@@ -26,7 +25,6 @@ const TagComp = React.forwardRef<HTMLLIElement, Tag>(
26
25
) ,
27
26
) ;
28
27
29
-
30
28
function ShowcaseCardTag ( { tags} : { tags : TagType [ ] } ) {
31
29
const tagObjects = tags . map ( ( tag ) => ( { tag, ...Tags [ tag ] } ) ) ;
32
30
@@ -35,7 +33,6 @@ function ShowcaseCardTag({tags}: {tags: TagType[]}) {
35
33
TagList . indexOf ( tagObject . tag ) ,
36
34
) ;
37
35
38
-
39
36
return (
40
37
< >
41
38
{ tagObjectsSorted . map ( ( tagObject , index ) => {
@@ -58,7 +55,10 @@ function ShowcaseCardTag({tags}: {tags: TagType[]}) {
58
55
59
56
function ShowcaseCard ( { user} : { user : User } ) {
60
57
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
+ >
62
62
< div className = { clsx ( 'card__image' , styles . showcaseCardImage ) } >
63
63
< Image img = { user . preview } alt = { user . title } />
64
64
</ div >
@@ -93,4 +93,4 @@ function ShowcaseCard({user}: {user: User}) {
93
93
) ;
94
94
}
95
95
96
- export default React . memo ( ShowcaseCard ) ;
96
+ export default React . memo ( ShowcaseCard ) ;
Original file line number Diff line number Diff line change 10
10
height : 150px ;
11
11
border-bottom : 2px solid var (--ifm-color-emphasis-200 );
12
12
}
13
- .showcaseCardImage : hover {
14
- transform : scale (0.9 );
15
- }
13
+
16
14
.showcaseCardHeader {
17
15
display : flex;
18
16
align-items : center;
19
17
margin-bottom : 12px ;
20
18
}
21
- .showcaseCardHeader : hover {
22
- color : red;
23
- text-shadow : 0 0 10px var (--ifm-color-primary );
24
- }
19
+
25
20
.showcaseCardTitle {
26
21
margin-bottom : 0 ;
27
22
flex : 1 1 auto;
28
23
}
29
- .showcaseCardTitle : hover {
30
- color : var (--ifm-color-primary );
31
- text-shadow : 0 0 10px whitesmoke;
32
- }
24
+
33
25
34
26
.showcaseCardTitle a {
35
27
text-decoration : none;
78
70
.showcaseCardBody {
79
71
font-size : smaller;
80
72
line-height : 1.66 ;
81
- text-shadow : 0 0 15px var (--ifm-color-primary );
82
73
}
83
74
.cardFooter {
84
75
display : flex;
107
98
margin-left : 6px ;
108
99
margin-right : 6px ;
109
100
}
101
+ .card {
102
+ transition : transform 0.2s ease, box-shadow 0.2s ease;
103
+ }
110
104
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;
113
109
}
110
+
You can’t perform that action at this time.
0 commit comments