-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from TienNHM/UI
UI
- Loading branch information
Showing
6 changed files
with
77 additions
and
45 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Link from "@docusaurus/Link"; | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
import clsx from "clsx"; | ||
import React from "react"; | ||
import styles from "./styles.module.css"; | ||
|
||
export default function ContactItem({icon, contact, title} : {icon: any, contact: any, title: string}) { | ||
const Svg = contact.icon; | ||
return ( | ||
<div className={styles.buttons}> | ||
<Link className={clsx('button button--lg', styles.cardInfoButton)} | ||
title={title} to={contact.link}> | ||
{contact.icon && <Svg role="img" />} | ||
{!contact.icon && <FontAwesomeIcon icon={icon} size='xl'/>} | ||
</Link> | ||
</div> | ||
); | ||
} |
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,14 @@ | ||
.cardInfoButton { | ||
padding: 0.4rem; | ||
border-radius: 50%; | ||
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5); | ||
background-color: rgba(34, 34, 34, 0.1); | ||
width: 3rem; | ||
height: 3rem; | ||
border: none; | ||
} | ||
|
||
.cardInfoButton:hover { | ||
background-color: rgba(34, 34, 34, 0.5); | ||
color: white; | ||
} |
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 |
---|---|---|
@@ -1,43 +1,66 @@ | ||
import { translate } from "@docusaurus/Translate"; | ||
import { IconDefinition } from "@fortawesome/fontawesome-svg-core"; | ||
import { faFacebook, faGithub, faLinkedin, faYoutube, faSkype } from '@fortawesome/free-brands-svg-icons' | ||
import { faEnvelope, faPhone } from '@fortawesome/free-solid-svg-icons' | ||
|
||
type Contact = { | ||
export type Contact = { | ||
title: string; | ||
link: string; | ||
icon: React.ComponentType<React.ComponentProps<'svg'>>; | ||
faIcon: IconDefinition; | ||
}; | ||
|
||
export const CONTACTS = { | ||
export type ContactDict = { | ||
[key: string]: Contact; | ||
}; | ||
|
||
export const CONTACTS: ContactDict = { | ||
Facebook: { | ||
title: translate({ message: 'Facebook' }), | ||
link: 'https://www.facebook.com/tiennhm.it/', | ||
icon: require('@site/static/img/logo/facebook.svg').default, | ||
faIcon: faFacebook, | ||
} as Contact, | ||
Github: { | ||
title: translate({ message: 'Github' }), | ||
link: 'https://github.com/TienNHM', | ||
icon: require('@site/static/img/logo/github.svg').default, | ||
faIcon: faGithub, | ||
} as Contact, | ||
Linkedin: { | ||
title: translate({ message: 'Linkedin' }), | ||
link: 'https://www.linkedin.com/in/tien-nhm/', | ||
icon: require('@site/static/img/logo/linkedin.svg').default, | ||
faIcon: faLinkedin, | ||
} as Contact, | ||
Email: { | ||
title: translate({ message: 'Email' }), | ||
link: 'mailto:tiennhm.it@gmail.com', | ||
icon: require('@site/static/img/logo/email.svg').default, | ||
faIcon: faEnvelope, | ||
} as Contact, | ||
Phone: { | ||
title: translate({ message: 'Phone' }), | ||
link: 'tel:+84388963345', | ||
icon: require('@site/static/img/logo/phone.svg').default, | ||
faIcon: faPhone, | ||
} as Contact, | ||
Skype: { | ||
title: translate({ message: 'Skype' }), | ||
link: 'https://join.skype.com/invite/ybhXQOv30y5F', | ||
icon: require('@site/static/img/logo/skype.svg').default, | ||
faIcon: faSkype, | ||
} as Contact, | ||
Youtube: { | ||
title: translate({ message: 'Youtube' }), | ||
link: 'https://www.youtube.com/TienNguyen09', | ||
icon: require('@site/static/img/logo/youtube.svg').default, | ||
faIcon: faYoutube, | ||
} as Contact, | ||
} | ||
|
||
export const SHOWCASE = { | ||
TITLE: translate({message: 'TienNHM Site Showcase'}), | ||
DESCRIPTION: translate({message: 'List of sites and projects built by TienNHM'}), | ||
TITLE: translate({ message: 'TienNHM Site Showcase' }), | ||
DESCRIPTION: translate({ message: 'List of sites and projects built by TienNHM' }), | ||
SUBMIT_URL: 'https://github.com/TienNHM?tab=repositories', | ||
} |
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