added conditional download resume feature
This commit is contained in:
parent
e20a1d7321
commit
29a75d06cd
@ -10,6 +10,9 @@ const config = {
|
||||
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: {
|
||||
linkedin: 'ariful-alam',
|
||||
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}
|
||||
loading={loading}
|
||||
avatarRing={!sanitizedConfig.themeConfig.hideAvatarRing}
|
||||
resume={sanitizedConfig.resume}
|
||||
/>
|
||||
<Details
|
||||
profile={profile}
|
||||
|
||||
@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
||||
import { fallbackImage, skeleton } from '../../helpers/utils';
|
||||
import LazyImage from '../lazy-image';
|
||||
|
||||
const AvatarCard = ({ profile, loading, avatarRing }) => {
|
||||
const AvatarCard = ({ profile, loading, avatarRing, resume }) => {
|
||||
return (
|
||||
<div className="card shadow-lg compact bg-base-100">
|
||||
<div className="grid place-items-center py-8">
|
||||
@ -55,6 +55,9 @@ const AvatarCard = ({ profile, loading, avatarRing }) => {
|
||||
: profile.bio}
|
||||
</div>
|
||||
</div>
|
||||
{ resume?.fileName &&
|
||||
<a href= { resume.fileName } target="_blank" className='btn mt-4' download>Download my resume</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@ -64,6 +67,7 @@ AvatarCard.propTypes = {
|
||||
profile: PropTypes.object,
|
||||
loading: PropTypes.bool.isRequired,
|
||||
avatarRing: PropTypes.bool.isRequired,
|
||||
resume: PropTypes.object
|
||||
};
|
||||
|
||||
export default AvatarCard;
|
||||
|
||||
@ -133,7 +133,7 @@ export const sanitizeConfig = (config) => {
|
||||
'winter',
|
||||
'procyon',
|
||||
];
|
||||
|
||||
|
||||
return {
|
||||
github: {
|
||||
username: config?.github?.username || '',
|
||||
@ -144,6 +144,9 @@ export const sanitizeConfig = (config) => {
|
||||
projects: config?.github?.exclude?.projects || [],
|
||||
},
|
||||
},
|
||||
resume:{
|
||||
fileName: config?.resume?.fileName || false
|
||||
},
|
||||
social: {
|
||||
linkedin: config?.social?.linkedin,
|
||||
twitter: config?.social?.twitter,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user