|
1 |
| -import clsx from 'clsx'; |
2 | 1 | import styles from './styles.module.css';
|
3 | 2 | import Crypto3 from '../../../static/img/productImages/Crypto3.png';
|
4 | 3 | import zkLLVM from '../../../static/img/productImages/zkLLVM.png';
|
5 | 4 | import ProofMarket from '../../../static/img/productImages/PM.png';
|
6 | 5 | import zkSharding from '../../../static/img/productImages/zkSharding.png';
|
7 |
| -import { Card, StyledBody } from '@nilfoundation/ui-kit/dist/ui-kit.js' |
8 | 6 |
|
9 | 7 |
|
10 | 8 | const ProductsList =
|
@@ -53,120 +51,64 @@ const ProductsList =
|
53 | 51 |
|
54 | 52 | ]
|
55 | 53 |
|
| 54 | + |
| 55 | + |
| 56 | +const NilProductDescription = ({ text, image, onDocsClick }) => { |
| 57 | + return ( |
| 58 | + <div onClick={onDocsClick}> |
| 59 | + <img src={image} /> |
| 60 | + <div className={styles.productDescription}> |
| 61 | + <p>{text}</p> |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + ); |
| 65 | +}; |
| 66 | + |
| 67 | +function NilProduct({ image, description, onDocsClick }) { |
| 68 | + return ( |
| 69 | + <div> |
| 70 | + <NilProductDescription text={description} image={image} onDocsClick={onDocsClick} /> |
| 71 | + </div> |
| 72 | + ); |
| 73 | +} |
| 74 | + |
| 75 | + |
| 76 | + |
56 | 77 | export default function HomepageNilProducts() {
|
57 | 78 | const GoToDocs = (Url) => () => {
|
58 | 79 | window.open(Url, '_self');
|
59 | 80 | };
|
60 |
| - |
61 | 81 | return (
|
62 | 82 | <div className='container' id='productContainer'>
|
63 | 83 | <div className={'row' + ' ' + styles.rowFlex}>
|
64 | 84 | <div className='col col-6'>
|
65 |
| - <div id='zkllvm-docs' className={styles.cardContainer}> |
66 |
| - <Card className={styles.productCard} title='zkLLVM' headerImage={zkLLVM} border={true} onClick={GoToDocs("/zkllvm/overview/what-is-zkllvm")}> |
67 |
| - <StyledBody> |
68 |
| - {ProductsList[0].description} |
69 |
| - </StyledBody> |
70 |
| - </Card> |
| 85 | + <div id='zkllvm-docs'> |
| 86 | + <NilProduct image={ProductsList[0].image} description={ProductsList[0].description} onDocsClick={GoToDocs("/zkllvm/overview/what-is-zkllvm")}></NilProduct> |
71 | 87 | </div>
|
72 | 88 | </div>
|
73 | 89 | <div className='col col-6'>
|
74 | 90 | <div id='proof-market-docs'>
|
75 |
| - <Card title='Proof Market' headerImage={ProofMarket} border={true} onClick={GoToDocs("/proof-market/intro")}> |
76 |
| - <StyledBody> |
77 |
| - {ProductsList[1].description} |
78 |
| - </StyledBody> |
79 |
| - </Card> |
| 91 | + <NilProduct image={ProductsList[1].image} description={ProductsList[1].description} onDocsClick={GoToDocs("/proof-market/intro")} ></NilProduct> |
80 | 92 | </div>
|
81 | 93 | </div>
|
82 | 94 | </div>
|
83 | 95 | <div className={'row' + ' ' + styles.rowFlex}>
|
84 | 96 | <div className='col col-6'>
|
85 | 97 | <div id='zk-sharding-docs'>
|
86 |
| - <Card title='zkSharding' headerImage={zkSharding} border={true} onClick={GoToDocs("https://nil.foundation/blog/post/nil_zkSharding")}> |
87 |
| - <StyledBody> |
88 |
| - {ProductsList[2].description} |
89 |
| - </StyledBody> |
90 |
| - </Card> |
| 98 | + <NilProduct image={ProductsList[2].image} description={ProductsList[2].description} onDocsClick={GoToDocs("https://nil.foundation/blog/post/nil_zkSharding")}></NilProduct> |
91 | 99 | </div>
|
92 | 100 | </div>
|
93 | 101 | <div className='col col-6'>
|
94 | 102 | <div id='crypto3-docs'>
|
95 |
| - <Card title='Crypto3' headerImage={Crypto3} border={true} onClick={GoToDocs("/crypto3/intro")}> |
96 |
| - <StyledBody> |
97 |
| - {ProductsList[3].description} |
98 |
| - </StyledBody> |
99 |
| - </Card> |
| 103 | + <NilProduct image={ProductsList[3].image} description={ProductsList[3].description} onDocsClick={GoToDocs("/crypto3/intro")}></NilProduct> |
100 | 104 | </div>
|
101 | 105 | </div>
|
102 | 106 | </div>
|
103 | 107 | </div >
|
104 | 108 | );
|
105 |
| - |
106 |
| - |
107 |
| - |
108 |
| - |
109 |
| - |
110 |
| - |
111 | 109 | }
|
112 | 110 |
|
113 | 111 |
|
114 |
| -// const NilProductDescription = ({ text, image, onDocsClick }) => { |
115 |
| -// return ( |
116 |
| -// <div onClick={onDocsClick}> |
117 |
| -// <img src={image} /> |
118 |
| -// <div className={styles.productDescription}> |
119 |
| -// <p>{text}</p> |
120 |
| -// </div> |
121 |
| -// </div> |
122 |
| -// ); |
123 |
| -// }; |
124 |
| - |
125 |
| -// function NilProduct({ image, description, onDocsClick }) { |
126 |
| -// return ( |
127 |
| -// <div> |
128 |
| -// <NilProductDescription text={description} image={image} onDocsClick={onDocsClick} /> |
129 |
| -// </div> |
130 |
| -// ); |
131 |
| -// } |
132 |
| - |
133 |
| - |
134 |
| - |
135 |
| -// export default function HomepageNilProducts() { |
136 |
| -// const GoToDocs = (Url) => () => { |
137 |
| -// window.open(Url, '_self'); |
138 |
| -// }; |
139 |
| -// return ( |
140 |
| -// <div className='container' id='productContainer'> |
141 |
| -// <div className={'row' + ' ' + styles.rowFlex}> |
142 |
| -// <div className='col col-6'> |
143 |
| -// <div id='zkllvm-docs'> |
144 |
| -// <NilProduct image={ProductsList[0].image} description={ProductsList[0].description} onDocsClick={GoToDocs("/zkllvm/overview/what-is-zkllvm")}></NilProduct> |
145 |
| -// </div> |
146 |
| -// </div> |
147 |
| -// <div className='col col-6'> |
148 |
| -// <div id='proof-market-docs'> |
149 |
| -// <NilProduct image={ProductsList[1].image} description={ProductsList[1].description} onDocsClick={GoToDocs("/proof-market/intro")} ></NilProduct> |
150 |
| -// </div> |
151 |
| -// </div> |
152 |
| -// </div> |
153 |
| -// <div className={'row' + ' ' + styles.rowFlex}> |
154 |
| -// <div className='col col-6'> |
155 |
| -// <div id='zk-sharding-docs'> |
156 |
| -// <NilProduct image={ProductsList[2].image} description={ProductsList[2].description} onDocsClick={GoToDocs("https://nil.foundation/blog/post/nil_zkSharding")}></NilProduct> |
157 |
| -// </div> |
158 |
| -// </div> |
159 |
| -// <div className='col col-6'> |
160 |
| -// <div id='crypto3-docs'> |
161 |
| -// <NilProduct image={ProductsList[3].image} description={ProductsList[3].description} onDocsClick={GoToDocs("/crypto3/intro")}></NilProduct> |
162 |
| -// </div> |
163 |
| -// </div> |
164 |
| -// </div> |
165 |
| -// </div > |
166 |
| -// ); |
167 |
| -// } |
168 |
| - |
169 |
| - |
170 | 112 |
|
171 | 113 |
|
172 | 114 |
|
|
0 commit comments