mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 04:17:13 +00:00
added conditional download resume feature
This commit is contained in:
@@ -10,6 +10,9 @@ 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',
|
||||||
|
|||||||
BIN
public/resume.pdf
Normal file
BIN
public/resume.pdf
Normal file
Binary file not shown.
@@ -160,6 +160,7 @@ const GitProfile = ({ config }) => {
|
|||||||
profile={profile}
|
profile={profile}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
avatarRing={!sanitizedConfig.themeConfig.hideAvatarRing}
|
avatarRing={!sanitizedConfig.themeConfig.hideAvatarRing}
|
||||||
|
resume={sanitizedConfig.resume}
|
||||||
/>
|
/>
|
||||||
<Details
|
<Details
|
||||||
profile={profile}
|
profile={profile}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
|||||||
import { fallbackImage, skeleton } from '../../helpers/utils';
|
import { fallbackImage, skeleton } from '../../helpers/utils';
|
||||||
import LazyImage from '../lazy-image';
|
import LazyImage from '../lazy-image';
|
||||||
|
|
||||||
const AvatarCard = ({ profile, loading, avatarRing }) => {
|
const AvatarCard = ({ profile, loading, avatarRing, resume }) => {
|
||||||
return (
|
return (
|
||||||
<div className="card shadow-lg compact bg-base-100">
|
<div className="card shadow-lg compact bg-base-100">
|
||||||
<div className="grid place-items-center py-8">
|
<div className="grid place-items-center py-8">
|
||||||
@@ -55,6 +55,9 @@ const AvatarCard = ({ profile, loading, avatarRing }) => {
|
|||||||
: profile.bio}
|
: profile.bio}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{ resume?.fileName &&
|
||||||
|
<a href= { resume.fileName } target="_blank" className='btn mt-4' download>Download my resume</a>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -64,6 +67,7 @@ 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
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AvatarCard;
|
export default AvatarCard;
|
||||||
|
|||||||
@@ -144,6 +144,9 @@ 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,
|
||||||
|
|||||||
Reference in New Issue
Block a user