-
Notifications
You must be signed in to change notification settings - Fork 8
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
7c227b1
commit 7868e36
Showing
9 changed files
with
186 additions
and
2 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
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ package-lock.json | |
|
||
output.json | ||
folder_list.json | ||
team.yaml | ||
|
||
# Generated files | ||
.docusaurus | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,9 @@ sidebar_label: Engineering | |
sidebar_class_name: green | ||
--- | ||
import DocCardList from '@theme/DocCardList'; | ||
import MaintainerTag from "@site/src/components/MaintainerTag"; | ||
|
||
<MaintainerTag maintainerEmails={["[email protected]","[email protected]","[email protected]"]} /> | ||
|
||
# Engineering | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,55 @@ | ||
import React, { useState, useEffect } from "react"; | ||
import styles from "./styles.module.css"; | ||
import Link from "@docusaurus/Link"; | ||
import team_data from "../../../team.json"; | ||
|
||
function ImageComponent(props) { | ||
const { imageUrl } = props; | ||
|
||
return <img className={styles.tag_image} src={imageUrl} alt="Image" />; | ||
} | ||
|
||
function NameLink(props) { | ||
const { name, externalLink } = props; | ||
|
||
return ( | ||
<Link to={externalLink} target="_blank"> | ||
{name} | ||
</Link> | ||
); | ||
} | ||
|
||
function GenerateTags({ maintainerEmail }) { | ||
const memberData = handleSearch(maintainerEmail); | ||
|
||
return ( | ||
<> | ||
<ImageComponent imageUrl={memberData.image_link} /> | ||
<NameLink | ||
name={memberData.name} | ||
externalLink={memberData.redirect_link} | ||
/> | ||
</> | ||
); | ||
} | ||
|
||
const handleSearch = (email) => { | ||
const foundResult = team_data.find((item) => item.mail_id === email); | ||
return foundResult; | ||
}; | ||
|
||
const MaintainerTag = ({ maintainerEmails }) => { | ||
return ( | ||
<div className={styles.tag_container}> | ||
<span className={styles.maintainer}>maintainers -</span> | ||
{maintainerEmails.map((email, index) => ( | ||
<React.Fragment key={email}> | ||
<GenerateTags maintainerEmail={email} /> | ||
{index < maintainerEmails.length - 1 && <span>, </span>} | ||
</React.Fragment> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
export default MaintainerTag; |
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,25 @@ | ||
|
||
.tag_container{ | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: flex-start; | ||
flex-wrap: wrap; | ||
margin-left: 0.5rem; | ||
margin-bottom: 1rem; | ||
padding: auto; | ||
max-width: 80%; | ||
} | ||
|
||
.tag_image{ | ||
width: 4vh; | ||
height: 4vh; | ||
border-radius: 50%; | ||
overflow: hidden; | ||
object-fit: cover; | ||
margin: 0.5rem; | ||
} | ||
|
||
.maintainer{ | ||
font-weight: 500; | ||
} |
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 @@ | ||
wget -N https://raw.githubusercontent.com/open-energy-transition/oet-data-bank/master/team.json |
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,98 @@ | ||
[ | ||
{ | ||
"name": "akshat mittal", | ||
"designation": "wvgevwvwv", | ||
"description": "afnewfew wefenvwv ewenewiv eiewnii4gv4 4fgi4jg4g4g wffwfgewgieg ewgw ew egwnge weigoegwe weofwe ewgwgwegweg weiwfjefef fwefwefwe ewfewfw", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=akshat+mittal", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/akshat_mittal" | ||
}, | ||
{ | ||
"name": "another_name", | ||
"designation": "another_designation", | ||
"description": "another_description", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=another_name", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/another_name" | ||
}, | ||
{ | ||
"name": "John Doe", | ||
"designation": "Senior Engineer", | ||
"description": "A highly skilled engineer with expertise in various programming languages.", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=John+Doe", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/john_doe" | ||
}, | ||
{ | ||
"name": "Jane Smith", | ||
"designation": "Marketing Manager", | ||
"description": "Experienced marketing professional with a proven track record of successful campaigns.", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=Jane+Smith", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/jane_smith" | ||
}, | ||
{ | ||
"name": "Michael Johnson", | ||
"designation": "Financial Analyst", | ||
"description": "Detail-oriented financial analyst with expertise in financial modeling and forecasting.", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=Michael+Johnson", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/michael_johnson" | ||
}, | ||
{ | ||
"name": "Emily Wang", | ||
"designation": "HR Manager", | ||
"description": "HR professional with extensive experience in recruitment and employee relations.", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=Emily+Wang", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/emily_wang" | ||
}, | ||
{ | ||
"name": "Alex Brown", | ||
"designation": "Product Manager", | ||
"description": "Product management expert with a passion for innovation and customer satisfaction.", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=Alex+Brown", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/alex_brown" | ||
}, | ||
{ | ||
"name": "Sophia Garcia", | ||
"designation": "Graphic Designer", | ||
"description": "Creative graphic designer with a keen eye for detail and a strong aesthetic sense.", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=Sophia+Garcia", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/sophia_garcia" | ||
}, | ||
{ | ||
"name": "William Lee", | ||
"designation": "Sales Executive", | ||
"description": "Results-driven sales executive with a proven ability to exceed targets and drive revenue growth.", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=William+Lee", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/william_lee" | ||
}, | ||
{ | ||
"name": "Olivia Martinez", | ||
"designation": "Project Coordinator", | ||
"description": "Organized project coordinator with excellent communication and coordination skills.", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=Olivia+Martinez", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/olivia_martinez" | ||
}, | ||
{ | ||
"name": "Daniel Kim", | ||
"designation": "Software Developer", | ||
"description": "Skilled software developer with expertise in full-stack web development.", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=Daniel+Kim", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/daniel_kim" | ||
}, | ||
{ | ||
"name": "Michelle Chen", | ||
"designation": "Content Writer", | ||
"description": "Creative content writer with a passion for storytelling and digital marketing.", | ||
"image_link": "https://placehold.co/600x400/orange/black?text=Michelle+Chen", | ||
"mail_id": "[email protected]", | ||
"redirect_link": "https://www.example.com/michelle_chen" | ||
} | ||
] |