-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves team page for Docusaurus. Closes #4587
- Loading branch information
1 parent
1eb3e6c
commit 8288cf4
Showing
6 changed files
with
212 additions
and
110 deletions.
There are no files selected for viewing
This file was deleted.
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,54 @@ | ||
import React from 'react'; | ||
import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
import styles from '../scss/TeamCard.module.scss'; | ||
|
||
interface IIndividual { | ||
name: string; | ||
company?: string; | ||
github?: string; | ||
twitter?: string; | ||
} | ||
|
||
interface ITeamCardOverview { | ||
individuals: IIndividual[]; | ||
} | ||
|
||
const TeamCardOverview = ({individuals}: ITeamCardOverview): JSX.Element => ( | ||
<div className={styles.grid}> | ||
{ | ||
individuals.map(individual => | ||
<div className={styles.gridItemContainer}> | ||
<div className={styles.gridItem}> | ||
<div className={styles.gridItemAlignCenter}> | ||
<img src={individual.github ? `https://github.com/${individual.github}.png` : `https://ui-avatars.com/api/?name=${individual.name}`} className={styles.gridItemImg} /> | ||
</div> | ||
<div className={styles.gridItemAlignCenter}> | ||
<div className={styles.gridItemText}> | ||
<div className={styles.gridItemName}>{individual.name}</div> | ||
<div className={styles.gridItemCompany}>{individual.company}</div> | ||
</div> | ||
</div> | ||
<div className={styles.gridItemAlignCenter}> | ||
{ | ||
individual.github | ||
&& | ||
<a href={`https://github.com/${individual.github}`} title='GitHub' className={styles.gridItemLink}> | ||
<img alt='GitHub' src={useBaseUrl('/img/github-icon.svg')} className={styles.gridItemLinkImg} /> | ||
</a> | ||
} | ||
{ | ||
individual.twitter | ||
&& | ||
<a href={`https://twitter.com/${individual.twitter}`} title='Twitter' className={styles.gridItemLink}> | ||
<img alt='Twitter' src={useBaseUrl('/img/twitter-icon.svg')} className={styles.gridItemLinkImg} /> | ||
</a> | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
</div> | ||
); | ||
|
||
export default TeamCardOverview; |
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,136 @@ | ||
.grid { | ||
display: grid; | ||
grid-auto-columns: 1fr; | ||
justify-content: space-around; | ||
align-content: start; | ||
grid-column-gap: 36px; | ||
grid-row-gap: 36px; | ||
grid-template-columns: 1fr 1fr 1fr 1fr 1fr; | ||
grid-template-rows: auto; | ||
} | ||
|
||
.gridItemContainer { | ||
max-width: 100%; | ||
display: inline-block; | ||
} | ||
|
||
.gridItem { | ||
position: relative; | ||
display: flex; | ||
-webkit-box-orient: vertical; | ||
-webkit-box-direction: normal; | ||
flex-direction: column; | ||
border: 1px solid #ecebea; | ||
border-radius: 6px; | ||
background-color: #fff; | ||
padding: 10px; | ||
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.02); | ||
height: 100%; | ||
} | ||
|
||
.gridItemAlignCenter { | ||
display: flex; | ||
width: 100%; | ||
-webkit-box-align: center; | ||
align-items: center; | ||
justify-content: center; | ||
flex-wrap: wrap; | ||
|
||
&:last-of-type { | ||
margin-top: auto; | ||
} | ||
} | ||
|
||
.gridItemImg { | ||
width: 42px; | ||
-webkit-box-flex: 0; | ||
flex: 0 0 auto; | ||
margin-left: auto; | ||
margin-right: auto; | ||
border-radius: 50%; | ||
display: inline-block; | ||
} | ||
|
||
.gridItemText { | ||
width: 100%; | ||
text-align: center; | ||
} | ||
|
||
.gridItemName { | ||
margin-top: 0px; | ||
margin-bottom: 4px; | ||
font-size: 12px; | ||
line-height: 20px; | ||
font-weight: 600; | ||
letter-spacing: 0.5px; | ||
text-decoration: none; | ||
text-transform: uppercase; | ||
} | ||
|
||
.gridItemCompany { | ||
color: #636e72; | ||
font-size: 14px; | ||
line-height: 20px; | ||
} | ||
|
||
.gridItemLink, .gridItemLinkImg { | ||
opacity: 0.5; | ||
-webkit-transition: opacity 200ms ease-in-out; | ||
transition: opacity 200ms ease-in-out; | ||
} | ||
|
||
.gridItemLink { | ||
color: #636e72; | ||
margin-bottom: 0px; | ||
padding-top: 10px; | ||
padding-bottom: 8px; | ||
padding-left: 4px; | ||
padding-right: 4px; | ||
font-size: 13px; | ||
font-weight: 300; | ||
text-decoration: none; | ||
cursor: pointer; | ||
max-width: 100%; | ||
display: inline-block; | ||
|
||
&:hover { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
.gridItemLinkImg { | ||
min-height: 24px; | ||
fill: #636e72; | ||
display: block; | ||
} | ||
|
||
@media screen and (max-width: 964px) { | ||
.grid { | ||
grid-template-columns: 1fr 1fr; | ||
} | ||
} | ||
|
||
/* Apply different styles when dark mode is selected */ | ||
[data-theme='dark'] { | ||
.gridItemLink { | ||
color: #c5c5c5; | ||
} | ||
|
||
.gridItemLinkImg { | ||
filter: invert(1); | ||
} | ||
|
||
.gridItemCompany { | ||
color: #c5c5c5; | ||
} | ||
|
||
.gridItemName { | ||
color: #fff; | ||
} | ||
|
||
.gridItem { | ||
border: 1px solid #505050; | ||
background-color: transparent; | ||
box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.02); | ||
} | ||
} |
File renamed without changes
File renamed without changes