-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1925fdc
commit b61031f
Showing
5 changed files
with
159 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
const MediaGrid = ({ section, data }) => { | ||
return ( | ||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> | ||
{data.map((item, index) => ( | ||
<div key={index} className="max-w-sm rounded overflow-hidden shadow-lg"> | ||
<img className="w-full" src={item.image} alt={item.title} /> | ||
<div className="px-6 py-4"> | ||
<div className="font-bold text-xl mb-2">{item.title}</div> | ||
<p className="text-gray-700 text-base"> | ||
{item.description} | ||
</p> | ||
</div> | ||
<div className="px-6 pt-4 pb-2"> | ||
{item.tags.map((tag, index) => ( | ||
<span key={index} className="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#{tag}</span> | ||
))} | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
MediaGrid.propTypes = { | ||
section: PropTypes.string.isRequired, | ||
data: PropTypes.arrayOf(PropTypes.shape({ | ||
image: PropTypes.string.isRequired, | ||
title: PropTypes.string.isRequired, | ||
description: PropTypes.string, | ||
tags: PropTypes.arrayOf(PropTypes.string), | ||
})).isRequired, | ||
}; | ||
|
||
export default MediaGrid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"media": [ | ||
{ | ||
"section": "What we have built", | ||
"items": [ | ||
{ | ||
"title": "Project 1", | ||
"description": "Description of Project 1", | ||
"link": "https://example.com/project1" | ||
}, | ||
{ | ||
"title": "Project 2", | ||
"description": "Description of Project 2", | ||
"link": "https://example.com/project2" | ||
} | ||
] | ||
}, | ||
{ | ||
"section": "Publications", | ||
"items": [ | ||
{ | ||
"title": "Publication 1", | ||
"description": "Description of Publication 1", | ||
"link": "https://example.com/publication1" | ||
}, | ||
{ | ||
"title": "Publication 2", | ||
"description": "Description of Publication 2", | ||
"link": "https://example.com/publication2" | ||
} | ||
] | ||
}, | ||
{ | ||
"section": "Podcasts", | ||
"items": [ | ||
{ | ||
"title": "Podcast 1", | ||
"description": "Description of Podcast 1", | ||
"link": "https://example.com/podcast1" | ||
}, | ||
{ | ||
"title": "Podcast 2", | ||
"description": "Description of Podcast 2", | ||
"link": "https://example.com/podcast2" | ||
} | ||
] | ||
}, | ||
{ | ||
"section": "Courses", | ||
"items": [ | ||
{ | ||
"title": "Course 1", | ||
"description": "Description of Course 1", | ||
"link": "https://example.com/course1" | ||
}, | ||
{ | ||
"title": "Course 2", | ||
"description": "Description of Course 2", | ||
"link": "https://example.com/course2" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
import { Container, Row, Col } from 'react-bootstrap'; | ||
import MediaGrid from '../components/media-grid'; | ||
|
||
const MediaPage = () => { | ||
return ( | ||
<Container> | ||
<Row> | ||
<Col> | ||
<h1>Media</h1> | ||
</Col> | ||
</Row> | ||
<Row> | ||
<Col> | ||
<MediaGrid section="What we have built" /> | ||
</Col> | ||
<Col> | ||
<MediaGrid section="Publications" /> | ||
</Col> | ||
<Col> | ||
<MediaGrid section="Podcasts" /> | ||
</Col> | ||
<Col> | ||
<MediaGrid section="Courses" /> | ||
</Col> | ||
</Row> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default MediaPage; |