Merge pull request #184 from arifszn/resume

Type definition for Resume feature
This commit is contained in:
Ariful Alam 2022-10-03 16:07:12 +06:00 committed by GitHub
commit b6bccf904e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 17 deletions

View File

@ -66,11 +66,11 @@
✓ [SEO](#seo) ✓ [SEO](#seo)
✓ [Avatar and Bio](#avatar-and-bio) ✓ [Avatar and Bio](#avatar-and-bio)
✓ [Social Links](#social-links) ✓ [Social Links](#social-links)
✓ [Skills](#skills) ✓ [Skill Section](#skills)
✓ [Experience](#experience) ✓ [Experience Section](#experience)
✓ [Education](#education) ✓ [Education Section](#education)
✓ [Projects](#projects) ✓ [Projects Section](#projects)
✓ [Blog Posts](#blog-posts) ✓ [Blog Posts Section](#blog-posts)
To view a live example, **[click here](https://arifszn.github.io/gitprofile)**. To view a live example, **[click here](https://arifszn.github.io/gitprofile)**.
@ -205,9 +205,6 @@ const config = {
projects: [], // These projects will not be displayed. example: ['my-project1', 'my-project2'] projects: [], // These projects will not be displayed. example: ['my-project1', 'my-project2']
}, },
}, },
resume: {
fileName: 'resume.pdf', // Place the resume file in public folder with the same name as the 'fileName' property.
},
social: { social: {
linkedin: '', linkedin: '',
twitter: '', twitter: '',
@ -221,6 +218,9 @@ const config = {
phone: '', phone: '',
email: '', email: '',
}, },
resume: {
fileUrl: '', // Empty fileUrl will hide the `Download Resume` button.
},
skills: ['JavaScript', 'React.js'], skills: ['JavaScript', 'React.js'],
experiences: [ experiences: [
{ {

View File

@ -10,9 +10,6 @@ const config = {
projects: [], // These projects will not be displayed. example: ['my-project1', 'my-project2'] projects: [], // These projects will not be displayed. example: ['my-project1', 'my-project2']
}, },
}, },
resume: {
fileName: 'resume.pdf', // Place the resume file in public folder with the same name as the 'fileName' property.
},
social: { social: {
linkedin: 'ariful-alam', linkedin: 'ariful-alam',
twitter: 'arif_szn', twitter: 'arif_szn',
@ -26,6 +23,9 @@ const config = {
phone: '', phone: '',
email: 'arifulalamszn@gmail.com', email: 'arifulalamszn@gmail.com',
}, },
resume: {
fileUrl: 'resume.pdf', // Empty fileUrl will hide the `Download Resume` button.
},
skills: [ skills: [
'PHP', 'PHP',
'Laravel', 'Laravel',

Binary file not shown.

View File

@ -55,9 +55,9 @@ const AvatarCard = ({ profile, loading, avatarRing, resume }) => {
: profile.bio} : profile.bio}
</div> </div>
</div> </div>
{resume?.fileName && ( {resume?.fileUrl && (
<a <a
href={resume.fileName} href={resume.fileUrl}
target="_blank" target="_blank"
className="btn btn-outline btn-primary text-xs mt-6" className="btn btn-outline btn-primary text-xs mt-6"
download download
@ -75,7 +75,9 @@ AvatarCard.propTypes = {
profile: PropTypes.object, profile: PropTypes.object,
loading: PropTypes.bool.isRequired, loading: PropTypes.bool.isRequired,
avatarRing: PropTypes.bool.isRequired, avatarRing: PropTypes.bool.isRequired,
resume: PropTypes.object, resume: PropTypes.shape({
fileUrl: PropTypes.string,
}),
}; };
export default AvatarCard; export default AvatarCard;

View File

@ -144,9 +144,6 @@ export const sanitizeConfig = (config) => {
projects: config?.github?.exclude?.projects || [], projects: config?.github?.exclude?.projects || [],
}, },
}, },
resume: {
fileName: config?.resume?.fileName || false,
},
social: { social: {
linkedin: config?.social?.linkedin, linkedin: config?.social?.linkedin,
twitter: config?.social?.twitter, twitter: config?.social?.twitter,
@ -160,6 +157,9 @@ export const sanitizeConfig = (config) => {
phone: config?.social?.phone, phone: config?.social?.phone,
email: config?.social?.email, email: config?.social?.email,
}, },
resume: {
fileUrl: config?.resume?.fileUrl || '',
},
skills: config?.skills || [], skills: config?.skills || [],
experiences: config?.experiences || [], experiences: config?.experiences || [],
education: config?.education || [], education: config?.education || [],

9
types/index.d.ts vendored
View File

@ -216,6 +216,10 @@ export interface Education {
to?: string; to?: string;
} }
export interface Resume {
fileUrl?: string;
}
export interface Config { export interface Config {
/** /**
* GitHub Config * GitHub Config
@ -227,6 +231,11 @@ export interface Config {
*/ */
social?: Social; social?: Social;
/**
* Resume
*/
resume?: Resume;
/** /**
* Skill list * Skill list
*/ */