Merge pull request #63 from m-tartari/feat/projects/modular-link

♻️ refactor(projects): add modular external link
This commit is contained in:
2024-03-25 10:50:38 +01:00
committed by GitHub
5 changed files with 21 additions and 19 deletions
@@ -12,7 +12,8 @@ const labels: { [key: string]: string } = {
LinkedInIconLink: 'LinkedIn-button', LinkedInIconLink: 'LinkedIn-button',
AcademyIconLink: 'Academy-button', AcademyIconLink: 'Academy-button',
VideoIconLink: 'Video-button', VideoIconLink: 'Video-button',
ExtrernalIconLink: 'External-link-button', ExternalIconLink: 'External-link-button',
ExternalAppIconLink: 'External-app-button',
} }
vi.stubGlobal('open', vi.fn()) vi.stubGlobal('open', vi.fn())
+3 -2
View File
@@ -1,4 +1,4 @@
import { Email, LinkedIn, GitHub, Description, OndemandVideo, School, OpenInNew } from '@mui/icons-material' import { Email, LinkedIn, GitHub, Description, OndemandVideo, School, OpenInNew, OpenInBrowser } from '@mui/icons-material'
import { Badge, IconButtonProps, SvgIcon } from '@mui/material' import { Badge, IconButtonProps, SvgIcon } from '@mui/material'
import IconButton from '../IconButton' import IconButton from '../IconButton'
@@ -41,4 +41,5 @@ export const GitHubIconLink = (props: IconLinkProps) => <IconWrapper aria-label=
export const LinkedInIconLink = (props: IconLinkProps) => <IconWrapper aria-label="LinkedIn-button" Icon={LinkedIn} {...props} /> export const LinkedInIconLink = (props: IconLinkProps) => <IconWrapper aria-label="LinkedIn-button" Icon={LinkedIn} {...props} />
export const AcademyIconLink = (props: IconLinkProps) => <IconWrapper aria-label="Academy-button" Icon={School} {...props} /> export const AcademyIconLink = (props: IconLinkProps) => <IconWrapper aria-label="Academy-button" Icon={School} {...props} />
export const VideoIconLink = (props: IconLinkProps) => <IconWrapper aria-label="Video-button" Icon={OndemandVideo} {...props} /> export const VideoIconLink = (props: IconLinkProps) => <IconWrapper aria-label="Video-button" Icon={OndemandVideo} {...props} />
export const ExtrernalIconLink = (props: IconLinkProps) => <IconWrapper aria-label="External-link-button" Icon={OpenInNew} {...props} /> export const ExternalIconLink = (props: IconLinkProps) => <IconWrapper aria-label="External-link-button" Icon={OpenInNew} {...props} />
export const ExternalAppIconLink = (props: IconLinkProps) => <IconWrapper aria-label="External-app-button" Icon={OpenInBrowser} {...props} />
@@ -1,6 +1,6 @@
import React from 'react' import React from 'react'
import { Box, SxProps, Theme, Typography, TypographyProps } from '@mui/material' import { Box, SxProps, Theme, Typography, TypographyProps } from '@mui/material'
import { ExtrernalIconLink } from '..' import { ExternalIconLink } from '..'
type AwardEntryProps = { type AwardEntryProps = {
year: string | number year: string | number
@@ -26,9 +26,7 @@ const Publication = ({ Component = Box, ...props }: AwardEntryProps) => {
<b>{props.title}</b> <b>{props.title}</b>
</Typography> </Typography>
, In: {props.location} , In: {props.location}
{typeof props.link !== 'undefined' && ( {typeof props.link !== 'undefined' && <ExternalIconLink size="small" fontSize="small" href={props.link} sx={{ color: 'text.secondary' }} />}
<ExtrernalIconLink size="small" fontSize="small" href={props.link} sx={{ color: 'text.secondary' }} />
)}
</Typography> </Typography>
</Box> </Box>
</Component> </Component>
+6 -5
View File
@@ -2,7 +2,7 @@ import React from 'react'
import { Box, Typography } from '@mui/material' import { Box, Typography } from '@mui/material'
import { ViewportProvider } from 'components/utils/viewport' import { ViewportProvider } from 'components/utils/viewport'
import { AcademyIconLink, DescriptionIconLink, GitHubIconLink, VideoIconLink } from 'components/atoms' import { AcademyIconLink, DescriptionIconLink, ExternalAppIconLink, GitHubIconLink, VideoIconLink } from 'components/atoms'
import { Footer, Hero, Toobar, ProjectSpotlight } from 'components/molecules' import { Footer, Hero, Toobar, ProjectSpotlight } from 'components/molecules'
const MainPage = () => { const MainPage = () => {
@@ -30,7 +30,7 @@ const MainPage = () => {
caption={ caption={
<> <>
<VideoIconLink size="small" fontSize="small" href="https://www.linkedin.com/feed/update/urn:li:activity:7034480841569284096/" /> <VideoIconLink size="small" fontSize="small" href="https://www.linkedin.com/feed/update/urn:li:activity:7034480841569284096/" />
<Typography component="span" variant="caption"> <Typography component="span" color="text.secondary" ml={1}>
Software Engineer @ IIT Software Engineer @ IIT
</Typography> </Typography>
</> </>
@@ -54,7 +54,8 @@ const MainPage = () => {
caption={ caption={
<> <>
<GitHubIconLink size="small" fontSize="small" href="https://github.com/ADVRHumanoids/motor_calibration" /> <GitHubIconLink size="small" fontSize="small" href="https://github.com/ADVRHumanoids/motor_calibration" />
<Typography component="span" variant="caption"> <ExternalAppIconLink size="small" fontSize="small" href="https://modular.alberobotics.it" />
<Typography component="span" color="text.secondary" ml={1}>
Software Engineer @ IIT Software Engineer @ IIT
</Typography> </Typography>
</> </>
@@ -76,7 +77,7 @@ const MainPage = () => {
caption={ caption={
<> <>
<GitHubIconLink size="small" fontSize="small" href="https://github.com/ADVRHumanoids/motor_calibration" /> <GitHubIconLink size="small" fontSize="small" href="https://github.com/ADVRHumanoids/motor_calibration" />
<Typography component="span" variant="caption"> <Typography component="span" color="text.secondary" ml={1}>
Embedded Engineer @ IIT Embedded Engineer @ IIT
</Typography> </Typography>
</> </>
@@ -103,7 +104,7 @@ const MainPage = () => {
fontSize="small" fontSize="small"
href="https://drive.google.com/file/d/1wBfvAzy9N8uChNxNj9Kd_hcvI0Qq3uQj/view?usp=sharing" href="https://drive.google.com/file/d/1wBfvAzy9N8uChNxNj9Kd_hcvI0Qq3uQj/view?usp=sharing"
/> />
<Typography component="span" variant="caption" color="text.secondary"> <Typography component="span" color="text.secondary" ml={1}>
Master Thesis @ WUT Master Thesis @ WUT
</Typography> </Typography>
</> </>
@@ -1,6 +1,6 @@
import { Box, Divider, Link, Typography } from '@mui/material' import { Box, Divider, Link, Typography } from '@mui/material'
import { GitHubIconLink, DescriptionIconLink, VideoIconLink, AcademyIconLink } from 'components/atoms' import { GitHubIconLink, DescriptionIconLink, VideoIconLink, AcademyIconLink, ExternalAppIconLink } from 'components/atoms'
import { Project } from 'components/molecules' import { Project } from 'components/molecules'
import { Page } from 'components/templates' import { Page } from 'components/templates'
@@ -28,7 +28,7 @@ const ProjectsPage = () => {
sx={{ color: 'text.secondary' }} sx={{ color: 'text.secondary' }}
/> />
{/* <Typography color="text.secondary" display="inline-block"> */} {/* <Typography color="text.secondary" display="inline-block"> */}
<Typography color="text.secondary" display={{ xs: 'none', sm: 'inline' }}> <Typography color="text.secondary" ml={1} display={{ xs: 'none', sm: 'inline' }}>
Software Engineer @ IIT Software Engineer @ IIT
</Typography> </Typography>
</> </>
@@ -50,7 +50,8 @@ const ProjectsPage = () => {
Software Engineer @ IIT Software Engineer @ IIT
</Typography> </Typography>
<GitHubIconLink size="small" fontSize="small" href="https://github.com/ADVRHumanoids/modular_hhcm/" sx={{ color: 'text.secondary' }} /> <GitHubIconLink size="small" fontSize="small" href="https://github.com/ADVRHumanoids/modular_hhcm/" sx={{ color: 'text.secondary' }} />
<Typography color="text.secondary" display={{ xs: 'none', sm: 'inline' }}> <ExternalAppIconLink size="small" fontSize="small" href="https://modular.alberobotics.it" sx={{ color: 'text.secondary' }} />
<Typography color="text.secondary" ml={1} display={{ xs: 'none', sm: 'inline' }}>
Software Engineer @ IIT Software Engineer @ IIT
</Typography> </Typography>
</> </>
@@ -76,7 +77,7 @@ const ProjectsPage = () => {
href="https://drive.google.com/file/d/1wBfvAzy9N8uChNxNj9Kd_hcvI0Qq3uQj/view?usp=sharing" href="https://drive.google.com/file/d/1wBfvAzy9N8uChNxNj9Kd_hcvI0Qq3uQj/view?usp=sharing"
sx={{ color: 'text.secondary' }} sx={{ color: 'text.secondary' }}
/> />
<Typography color="text.secondary" display={{ xs: 'none', sm: 'inline' }}> <Typography color="text.secondary" ml={1} display={{ xs: 'none', sm: 'inline' }}>
Master Thesis @ WUT Master Thesis @ WUT
</Typography> </Typography>
</> </>
@@ -245,7 +246,7 @@ const ProjectsPage = () => {
href="https://github.com/ADVRHumanoids/motor_calibration" href="https://github.com/ADVRHumanoids/motor_calibration"
sx={{ color: 'text.secondary' }} sx={{ color: 'text.secondary' }}
/> />
<Typography color="text.secondary" display={{ xs: 'none', sm: 'inline' }}> <Typography color="text.secondary" ml={1} display={{ xs: 'none', sm: 'inline' }}>
Embedded Engineer @ IIT Embedded Engineer @ IIT
</Typography> </Typography>
</> </>
@@ -272,7 +273,7 @@ const ProjectsPage = () => {
href="https://drive.google.com/file/d/0B1z42QMR-0UtYzBYSVhRV3ZPWk0/view?usp=sharing" href="https://drive.google.com/file/d/0B1z42QMR-0UtYzBYSVhRV3ZPWk0/view?usp=sharing"
sx={{ color: 'text.secondary' }} sx={{ color: 'text.secondary' }}
/> />
<Typography color="text.secondary" display={{ xs: 'none', sm: 'inline' }}> <Typography color="text.secondary" ml={1} display={{ xs: 'none', sm: 'inline' }}>
Bachelor Thesis @ TONGJI Bachelor Thesis @ TONGJI
</Typography> </Typography>
</> </>
@@ -294,7 +295,7 @@ const ProjectsPage = () => {
href="https://drive.google.com/file/d/0B1z42QMR-0UtSkxRVzJPTk1IX0k/view?usp=sharing" href="https://drive.google.com/file/d/0B1z42QMR-0UtSkxRVzJPTk1IX0k/view?usp=sharing"
sx={{ color: 'text.secondary' }} sx={{ color: 'text.secondary' }}
/> />
<Typography color="text.secondary" display={{ xs: 'none', sm: 'inline' }}> <Typography color="text.secondary" ml={1} display={{ xs: 'none', sm: 'inline' }}>
Bachelor Thesis @ UNIBO Bachelor Thesis @ UNIBO
</Typography> </Typography>
</> </>