Merge pull request #179 from joanjeremiah/downloadResume
Add conditional download resume feature
This commit is contained in:
commit
1dec29a718
@ -205,6 +205,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: '',
|
||||
twitter: '',
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -34,8 +34,8 @@
|
||||
"build:library": "vite build --config library.config.js",
|
||||
"lint": "eslint --ext .js,.jsx .",
|
||||
"lint:fix": "eslint --ext .js,.jsx --fix .",
|
||||
"prettier": "prettier --check './**/*.{js,jsx,ts,tsx,css,md,json}'",
|
||||
"prettier:fix": "prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}'"
|
||||
"prettier": "prettier --check \"./**/*.{js,jsx,ts,tsx,css,md,json}\"",
|
||||
"prettier:fix": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,md,json}\""
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.2.0",
|
||||
|
||||
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,17 @@ const AvatarCard = ({ profile, loading, avatarRing }) => {
|
||||
: profile.bio}
|
||||
</div>
|
||||
</div>
|
||||
{resume?.fileName && (
|
||||
<a
|
||||
href={resume.fileName}
|
||||
target="_blank"
|
||||
className="btn btn-outline btn-primary text-xs mt-6"
|
||||
download
|
||||
rel="noreferrer"
|
||||
>
|
||||
Download Resume
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@ -64,6 +75,7 @@ AvatarCard.propTypes = {
|
||||
profile: PropTypes.object,
|
||||
loading: PropTypes.bool.isRequired,
|
||||
avatarRing: PropTypes.bool.isRequired,
|
||||
resume: PropTypes.object,
|
||||
};
|
||||
|
||||
export default AvatarCard;
|
||||
|
||||
@ -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