File tree 1 file changed +21
-13
lines changed
1 file changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -10,33 +10,41 @@ import IMG_3070 from "./IMG_3070.jpg";
10
10
import styles from "./index.module.css" ;
11
11
import Link from "@docusaurus/Link" ;
12
12
13
+ const commonImageStyles = {
14
+ height : '100px' ,
15
+ width : '190px' ,
16
+ borderRadius : '10px' ,
17
+ padding : '15px 40px' ,
18
+ margin : '35px' ,
19
+ } ;
20
+ const darkThemeBackgroundColor = 'var(--ifm-color-gray-500)' ;
13
21
14
22
export function Institutionsa ( { list } ) {
23
+ const isDarkTheme = document . documentElement . getAttribute ( 'data-theme' ) === 'dark' ;
24
+
15
25
return (
16
26
< section >
17
27
< div >
18
28
{ list . map ( ( category ) => (
19
- < div key = { category . title } className = "row margin-bottom--lg"
29
+ < div key = { category . title } className = "row margin-bottom--lg" style = { {
30
+ borderRadius :'8px' ,
31
+ padding :'17px' ,
32
+
33
+ } }
34
+
20
35
>
21
-
22
-
23
36
< h2 className = "col col--2 " > { category . title } </ h2 >
24
37
{ category . members . map ( ( props ) => (
25
38
< a href = { props . url } target = "_blank" rel = "noopener noreferrer" >
26
39
< img
40
+ className = "institutionsa-image"
41
+
27
42
src = { props . log }
28
43
alt = { props . name }
29
44
style = { {
30
- width :'195px' ,
31
- height :'110px' ,
32
- margin : '20px' ,
33
- borderRadius :'8px' ,
34
- padding :'17px' ,
35
-
36
-
37
-
38
-
39
- } }
45
+ ...commonImageStyles ,
46
+ backgroundColor : isDarkTheme ? darkThemeBackgroundColor :'white' ,
47
+ } }
40
48
/>
41
49
</ a >
42
50
You can’t perform that action at this time.
0 commit comments