Skip to content

Commit 7105a01

Browse files
authored
add per grant prize badge for projects (#15)
* add per grant prize badge for projects * grants name updated * grants name fixed * handle clicking on the prize badge in mobile mode
1 parent b95af70 commit 7105a01

File tree

3 files changed

+36
-19
lines changed

3 files changed

+36
-19
lines changed

Diff for: src/Assets/Images/projects/prize.png

55.9 KB
Loading

Diff for: src/Views/Pages/Home/Sections/Section3/index.scss

+14-12
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666

6767
.swiper-slide {
68-
@apply w-full rounded-3xl;
68+
@apply mt-8 sm:mt-0 w-full rounded-3xl;
6969

7070
.slide-content {
7171
@apply w-full rounded-3xl flex items-center flex-col-reverse md:flex-row justify-between;
@@ -223,8 +223,19 @@
223223
@apply img-shadow;
224224
}
225225

226+
.grant-row {
227+
@apply flex-center absolute left-0 right-0 top-0 bottom-0 pointer-events-none;
228+
229+
img {
230+
@apply w-4 pointer-events-auto z-50;
231+
&:not(:last-of-type) {
232+
@apply mr-2 sm:mr-3;
233+
}
234+
}
235+
}
236+
226237
.row {
227-
@apply w-full h-1/2 flex-center text-lg;
238+
@apply w-full h-1/2 flex-center text-lg relative;
228239

229240
&.first-row {
230241
@apply border-b border-primary bg-primary bg-opacity-5 hover:bg-opacity-10 cursor-pointer overflow-hidden transition-all duration-500;
@@ -254,16 +265,7 @@
254265
}
255266
}
256267

257-
&.dmeta {
258-
width: 35%;
259-
@include down(md) {
260-
width: 20%;
261-
}
262-
@include down(sm) {
263-
width: 25%;
264-
}
265-
}
266-
268+
&.dmeta,
267269
&.opr {
268270
width: 35%;
269271
@include down(md) {

Diff for: src/Views/Pages/Home/Sections/Section3/index.tsx

+22-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import './index.scss';
22
import FaIcon from '@components/FaIcon';
3-
import { Col, Modal, Row } from 'rsuite';
3+
import { Col, Modal, Row, Tooltip, Whisper } from 'rsuite';
44
import Btn from '@src/Components/BTN/BTN';
55
import { useEffect, useState } from 'react';
66
import useWindow from '@src/Tools/Hooks/useWindow';
7+
import prize from '@assets/Images/projects/prize.png';
78
import useDashboard from '@src/Tools/Hooks/useDashboard';
89
import nava from '@assets/Images/projects/nava/nava.png';
910
import dmeta from '@assets/Images/projects/dmeta/dmeta.png';
@@ -114,15 +115,25 @@ const Section3 = () => {
114115
alt='logo'
115116
/>
116117
</div>
118+
<div className='grant-row'>
119+
{project?.grant?.map((grant: any, i: any) => (
120+
<Whisper
121+
trigger='hover'
122+
controlId='control-id-hover'
123+
key={i}
124+
placement='top'
125+
speaker={<Tooltip>{grant}</Tooltip>}>
126+
<img src={prize} alt='grant-prize' />
127+
</Whisper>
128+
))}
129+
</div>
117130

118131
<div className='second-row row'>
119132
{project?.coming_soon && (
120-
<div>
121-
<div className='second-cell cell'>
122-
<div className='link'>
123-
<FaIcon fa='l-hourglass-clock' className='text-primary w-7 mr-2' />
124-
<span>Coming Soon</span>
125-
</div>
133+
<div className='second-cell cell'>
134+
<div className='link'>
135+
<FaIcon fa='l-hourglass-clock' className='text-primary w-7 mr-2' />
136+
<span>Coming Soon</span>
126137
</div>
127138
</div>
128139
)}
@@ -270,6 +281,7 @@ const projects = [
270281
github: 'https://github.com/sepandhaghighi/pycm',
271282
forkPage: 'https://github.com/sepandhaghighi/pycm/forks',
272283
starsPage: 'https://github.com/sepandhaghighi/pycm/stargazers',
284+
grant: ['PSF Development Grant 2022', 'NLnet Grant 2022', 'Trelis AI Grant 2024'],
273285
description: `PyCM is a multi-class confusion matrix library written in Python that supports both input data vectors and direct matrix, and is a proper tool for post-classification model evaluation that supports most classes and overall statistics parameters. PyCM is the swiss-army knife of confusion matrices, targeted mainly at data scientists that need a broad array of metrics for predictive models and accurate evaluation of a large variety of classifiers.`,
274286
},
275287

@@ -279,6 +291,7 @@ const projects = [
279291
dark_logo: pymiloDark,
280292
light_logo: pymiloLight,
281293
account: 'openscilab',
294+
grant: ['PSF Development Grant 2024'],
282295
github: 'https://github.com/openscilab/pymilo',
283296
// webLink: 'https://github.com/openscilab/pymilo',
284297
forkPage: 'https://github.com/openscilab/pymilo/fork',
@@ -315,6 +328,7 @@ const projects = [
315328
dark_logo: samilaDark,
316329
light_logo: samilaLight,
317330
account: 'sepandhaghighi',
331+
grant: ['IPFS Grant 2022'],
318332
github: 'https://github.com/sepandhaghighi/samila',
319333
webLink: 'https://www.samila.site',
320334
forkPage: 'https://github.com/sepandhaghighi/samila/forks',
@@ -327,6 +341,7 @@ const projects = [
327341
dark_logo: artDark,
328342
light_logo: artLight,
329343
account: 'sepandhaghighi',
344+
grant: ['PSF Development Grant 2024'],
330345
github: 'https://github.com/sepandhaghighi/art',
331346
webLink: 'https://www.ascii-art.site',
332347
forkPage: 'https://github.com/sepandhaghighi/art/forks',

0 commit comments

Comments
 (0)