1
1
import styles from "./styles.module.css" ;
2
-
3
- import OpennessMD from "@site/src/components/about/Values/openness.md" ;
4
- import ScienceMD from "@site/src/components/about/Values/science.md" ;
5
- import IntegrityMD from "@site/src/components/about/Values/integrity.md" ;
6
- import OptimismMD from "@site/src/components/about/Values/optimism.md" ;
7
- /*import OpennessPicture from "@site/static/img/values/openness-light.svg";
8
- import SciencePicture from "@site/static/img/values/science-light.svg";
9
- import OptimismPicture from "@site/static/img/values/optimism-light.svg";
10
- import IntegrityPicture from "@site/static/img/values/integrity-light.svg";*/
11
2
import { ValueCardMobile } from "@site/src/components/about/ValueCard" ;
12
3
import { ValueCardDesktop } from "@site/src/components/about/ValueCard" ;
13
4
import { useEffect , useState } from "react" ;
14
- import useBaseUrl from "@docusaurus/useBaseUrl" ;
15
- import ThemedImage from "@theme/ThemedImage" ;
16
-
17
- const valuesDescriptions = [ OpennessMD , ScienceMD , IntegrityMD , OptimismMD ] ;
18
- const valuesPictures = [
19
- OpennessPicture ,
20
- SciencePicture ,
21
- OptimismPicture ,
22
- IntegrityPicture ,
23
- ] ;
5
+ import { valuesDetails } from "./Values/valuesDetails" ;
24
6
25
- export function SciencePicture ( ) {
26
- return (
27
- < ThemedImage
28
- alt = "Icon representing the science value, displaying an atom."
29
- sources = { {
30
- light : useBaseUrl ( "/img/values/science-light.svg" ) ,
31
- dark : useBaseUrl ( "/img/values/science-dark.svg" ) ,
32
- } }
33
- />
34
- ) ;
35
- }
36
-
37
- export function OpennessPicture ( ) {
38
- return (
39
- < ThemedImage
40
- alt = "Icon representing the openness value, four people connected together."
41
- sources = { {
42
- light : useBaseUrl ( "/img/values/openness-light.svg" ) ,
43
- dark : useBaseUrl ( "/img/values/openness-dark.svg" ) ,
44
- } }
45
- />
46
- ) ;
47
- }
48
-
49
- export function IntegrityPicture ( ) {
50
- return (
51
- < ThemedImage
52
- alt = "Icon representing the integrity value, with an heart inside a hand ."
53
- sources = { {
54
- light : useBaseUrl ( "/img/values/integrity-light.svg" ) ,
55
- dark : useBaseUrl ( "/img/values/integrity-dark.svg" ) ,
56
- } }
57
- />
58
- ) ;
59
- }
60
-
61
- export function OptimismPicture ( ) {
62
- return (
63
- < ThemedImage
64
- alt = "Icon representing the optimism value, with a smiling face ."
65
- sources = { {
66
- light : useBaseUrl ( "/img/values/optimism-light.svg" ) ,
67
- dark : useBaseUrl ( "/img/values/optimism-dark.svg" ) ,
68
- } }
69
- />
70
- ) ;
71
- }
72
- * /
73
7
74
- const valuesNames = [ "Openness" , "Science" , "Optimism" , "Integrity" ] ;
75
8
const cardColors = [ "white" , "yellow" , "white" , "yellow" ] ;
76
9
77
10
export function FourValuesMobile ( ) {
78
11
return (
79
12
< div className = { styles . four_values_container } >
80
13
< ul className = { "row" + " " + "flex-full-centered" + " " + "padding-none" } >
81
- { valuesNames . map ( ( value , index ) => (
14
+ { valuesDetails . map ( ( value , index ) => (
82
15
< li className = "cards-list" key = { index } >
83
16
< div className = "col" >
84
17
< ValueCardMobile
85
- value = { value }
86
- ValuePicture = { valuesPictures [ index ] }
87
- ValueComponent = { valuesDescriptions [ index ] }
18
+ value = { value . name }
19
+ ValuePicture = { value . pictureComponent }
20
+ ValueComponent = { value . DescriptionMD }
88
21
color = { cardColors [ index ] }
89
22
/>
90
23
</ div >
@@ -106,14 +39,14 @@ export function FourValuesDesktop() {
106
39
< ul
107
40
className = { "row" + " " + "padding-none" + " " + styles . row_with_margins + " " + "flex-full-centered" }
108
41
>
109
- { valuesNames . map ( ( value , index ) => (
42
+ { valuesDetails . map ( ( value , index ) => (
110
43
< li className = "cards-list" key = { index } >
111
44
< div className = "col" >
112
45
< div className = { styles . value_card_container } >
113
46
< ValueCardDesktop
114
- value = { value }
115
- ValuePicture = { valuesPictures [ index ] }
116
- ValueComponent = { valuesDescriptions [ index ] }
47
+ value = { value . name }
48
+ ValuePicture = { value . pictureComponent }
49
+ ValueComponent = { value . DescriptionMD }
117
50
/>
118
51
</ div >
119
52
</ div >
0 commit comments