mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 20:00:25 +00:00
Merge pull request #179 from joanjeremiah/downloadResume
Add conditional download resume feature
This commit is contained in:
@@ -205,6 +205,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: '',
|
linkedin: '',
|
||||||
twitter: '',
|
twitter: '',
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
@@ -34,8 +34,8 @@
|
|||||||
"build:library": "vite build --config library.config.js",
|
"build:library": "vite build --config library.config.js",
|
||||||
"lint": "eslint --ext .js,.jsx .",
|
"lint": "eslint --ext .js,.jsx .",
|
||||||
"lint:fix": "eslint --ext .js,.jsx --fix .",
|
"lint:fix": "eslint --ext .js,.jsx --fix .",
|
||||||
"prettier": "prettier --check './**/*.{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}'"
|
"prettier:fix": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,md,json}\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^18.2.0",
|
"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}
|
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,17 @@ const AvatarCard = ({ profile, loading, avatarRing }) => {
|
|||||||
: profile.bio}
|
: profile.bio}
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -64,6 +75,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