Merge branch 'main' into add-skype-and-telegram-to-social-links

This commit is contained in:
Christian Sarnataro 2023-02-11 00:13:10 +01:00 committed by GitHub
commit e1ee10a39c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 122 additions and 99 deletions

View File

@ -358,6 +358,9 @@ const config = {
'--rounded-btn': '3rem',
},
},
// Optional Footer. Supports plain text or HTML.
footer: `Copyright © 2023 John Doe`,
};
```
@ -369,7 +372,7 @@ The default theme can be specified.
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
themeConfig: {
defaultTheme: 'light',
@ -386,7 +389,7 @@ You can create your own custom theme by modifying these values. Theme `procyon`
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
themeConfig: {
customTheme: {
@ -409,7 +412,7 @@ module.exports = {
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
googleAnalytics: {
id: '',
@ -425,7 +428,7 @@ Besides tracking visitors, it will track `click events` on projects and blog pos
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
hotjar: {
id: '',
@ -448,7 +451,7 @@ You can link your social media services you're using, including LinkedIn, Twitte
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
social: {
linkedin: 'ariful-alam',
@ -475,7 +478,7 @@ To showcase your skills provide them here.
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
skills: ['JavaScript', 'React.js'],
};
@ -489,7 +492,7 @@ Provide your job history in `experiences`.
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
experiences: [
{
@ -518,7 +521,7 @@ Provide your education history in `education`.
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
education: [
{
@ -545,7 +548,7 @@ Provide your industry certifications in `certifications`.
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
certifications: [
{
@ -568,7 +571,7 @@ Your public repo from GitHub will be displayed in the `Github Projects` section
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
github: {
username: 'arifszn',
@ -588,7 +591,7 @@ In this section you can showcase your external/personal projects.
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
externalProjects: [
{
@ -607,7 +610,7 @@ If you have [medium](https://medium.com) or [dev](https://dev.to) account, you c
```js
// gitprofile.config.js
module.exports = {
const config = {
// ...
blog: {
source: 'dev',

View File

@ -102,7 +102,6 @@ const config = {
link: 'https://example.com',
},
],
// Display blog posts from your medium or dev account. (Optional)
blog: {
source: 'dev', // medium | dev
@ -118,7 +117,7 @@ const config = {
snippetVersion: 6,
},
themeConfig: {
defaultTheme: 'business',
defaultTheme: 'winter',
// Hides the switch in the navbar
// Useful if you want to support a single color mode
@ -176,6 +175,13 @@ const config = {
'--rounded-btn': '3rem',
},
},
// Optional Footer. Supports plain text or HTML.
footer: `Made with <a
class="text-primary" href="https://github.com/arifszn/gitprofile"
target="_blank"
rel="noreferrer"
>GitProfile</a> and `,
};
export default config;

108
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@arifszn/gitprofile",
"version": "2.2.1",
"version": "2.3.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@arifszn/gitprofile",
"version": "2.2.1",
"version": "2.3.0",
"license": "MIT",
"dependencies": {
"react": "^18.2.0",
@ -926,12 +926,12 @@
}
},
"node_modules/@vitejs/plugin-react": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-3.0.0.tgz",
"integrity": "sha512-1mvyPc0xYW5G8CHQvJIJXLoMjl5Ct3q2g5Y2s6Ccfgwm45y48LBvsla7az+GkkAtYikWQ4Lxqcsq5RHLcZgtNQ==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-3.0.1.tgz",
"integrity": "sha512-mx+QvYwIbbpOIJw+hypjnW1lAbKDHtWK5ibkF/V1/oMBu8HU/chb+SnqJDAsLq1+7rGqjktCEomMTM5KShzUKQ==",
"dev": true,
"dependencies": {
"@babel/core": "^7.20.5",
"@babel/core": "^7.20.7",
"@babel/plugin-transform-react-jsx-self": "^7.18.6",
"@babel/plugin-transform-react-jsx-source": "^7.19.6",
"magic-string": "^0.27.0",
@ -1149,9 +1149,9 @@
}
},
"node_modules/axios": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.2.2.tgz",
"integrity": "sha512-bz/J4gS2S3I7mpN/YZfGFTqhXTYzRho8Ay38w2otuuDR322KzFIWm/4W2K6gIwvWaws5n+mnb7D1lN9uD+QH6Q==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.2.6.tgz",
"integrity": "sha512-rC/7F08XxZwjMV4iuWv+JpD3E0Ksqg9nac4IIg6RwNuF0JTeWoCo/mBNG54+tNhhI11G3/VDRbdDQTs9hGp4pQ==",
"dev": true,
"dependencies": {
"follow-redirects": "^1.15.0",
@ -1441,9 +1441,9 @@
}
},
"node_modules/daisyui": {
"version": "2.46.1",
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-2.46.1.tgz",
"integrity": "sha512-i59+nLuzzPAVOhNhot3KLtt6stfYeCIPXs9uiLcpXjykpqxHfBA3W6hQWOUWPMwfqhyQd0WKub3sydtPGjzLtA==",
"version": "2.49.0",
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-2.49.0.tgz",
"integrity": "sha512-+hEFMupi/7rqkAH4d3iBWj1TXRq73V3PrkJ3HiDqFuQgMoE1/UQOgMoeqaHa3r4IRo4fjMNauwHBA17qT0YSIA==",
"dev": true,
"dependencies": {
"color": "^4.2",
@ -1698,9 +1698,9 @@
}
},
"node_modules/eslint": {
"version": "8.31.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.31.0.tgz",
"integrity": "sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA==",
"version": "8.33.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.33.0.tgz",
"integrity": "sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==",
"dev": true,
"dependencies": {
"@eslint/eslintrc": "^1.4.1",
@ -1787,9 +1787,9 @@
}
},
"node_modules/eslint-plugin-react": {
"version": "7.31.11",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.31.11.tgz",
"integrity": "sha512-TTvq5JsT5v56wPa9OYHzsrOlHzKZKjV+aLgS+55NJP/cuzdiQPC7PfYoUjMoxlffKtvijpk7vA/jmuqRb9nohw==",
"version": "7.32.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz",
"integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==",
"dev": true,
"dependencies": {
"array-includes": "^3.1.6",
@ -1804,7 +1804,7 @@
"object.hasown": "^1.1.2",
"object.values": "^1.1.6",
"prop-types": "^15.8.1",
"resolve": "^2.0.0-next.3",
"resolve": "^2.0.0-next.4",
"semver": "^6.3.0",
"string.prototype.matchall": "^4.0.8"
},
@ -3232,9 +3232,9 @@
}
},
"node_modules/postcss": {
"version": "8.4.20",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz",
"integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==",
"version": "8.4.21",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz",
"integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",
"dev": true,
"funding": [
{
@ -3385,9 +3385,9 @@
}
},
"node_modules/prettier": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz",
"integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==",
"version": "2.8.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz",
"integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
@ -3516,9 +3516,9 @@
}
},
"node_modules/react-hotjar": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/react-hotjar/-/react-hotjar-5.3.0.tgz",
"integrity": "sha512-QkqVxrKR0cjloce6QozOwEjQlRI9iuGluBz3c2aqxDK97n1Za37PIsQ0bhLYea3SvRTuzrZ+Gu3Yg2n7YF/l1w==",
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/react-hotjar/-/react-hotjar-5.4.1.tgz",
"integrity": "sha512-2205ONuPZzAFAQaIG2BQf/l8nePf5ir16vF7S/RT937JYvw3c7WSH65XRnL3sT4GMpU4eDzesB964xNE5wjGPQ==",
"dev": true
},
"node_modules/react-icons": {
@ -4770,12 +4770,12 @@
}
},
"@vitejs/plugin-react": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-3.0.0.tgz",
"integrity": "sha512-1mvyPc0xYW5G8CHQvJIJXLoMjl5Ct3q2g5Y2s6Ccfgwm45y48LBvsla7az+GkkAtYikWQ4Lxqcsq5RHLcZgtNQ==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-3.0.1.tgz",
"integrity": "sha512-mx+QvYwIbbpOIJw+hypjnW1lAbKDHtWK5ibkF/V1/oMBu8HU/chb+SnqJDAsLq1+7rGqjktCEomMTM5KShzUKQ==",
"dev": true,
"requires": {
"@babel/core": "^7.20.5",
"@babel/core": "^7.20.7",
"@babel/plugin-transform-react-jsx-self": "^7.18.6",
"@babel/plugin-transform-react-jsx-source": "^7.19.6",
"magic-string": "^0.27.0",
@ -4928,9 +4928,9 @@
}
},
"axios": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.2.2.tgz",
"integrity": "sha512-bz/J4gS2S3I7mpN/YZfGFTqhXTYzRho8Ay38w2otuuDR322KzFIWm/4W2K6gIwvWaws5n+mnb7D1lN9uD+QH6Q==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.2.6.tgz",
"integrity": "sha512-rC/7F08XxZwjMV4iuWv+JpD3E0Ksqg9nac4IIg6RwNuF0JTeWoCo/mBNG54+tNhhI11G3/VDRbdDQTs9hGp4pQ==",
"dev": true,
"requires": {
"follow-redirects": "^1.15.0",
@ -5148,9 +5148,9 @@
"dev": true
},
"daisyui": {
"version": "2.46.1",
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-2.46.1.tgz",
"integrity": "sha512-i59+nLuzzPAVOhNhot3KLtt6stfYeCIPXs9uiLcpXjykpqxHfBA3W6hQWOUWPMwfqhyQd0WKub3sydtPGjzLtA==",
"version": "2.49.0",
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-2.49.0.tgz",
"integrity": "sha512-+hEFMupi/7rqkAH4d3iBWj1TXRq73V3PrkJ3HiDqFuQgMoE1/UQOgMoeqaHa3r4IRo4fjMNauwHBA17qT0YSIA==",
"dev": true,
"requires": {
"color": "^4.2",
@ -5336,9 +5336,9 @@
"dev": true
},
"eslint": {
"version": "8.31.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.31.0.tgz",
"integrity": "sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA==",
"version": "8.33.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.33.0.tgz",
"integrity": "sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==",
"dev": true,
"requires": {
"@eslint/eslintrc": "^1.4.1",
@ -5465,9 +5465,9 @@
}
},
"eslint-plugin-react": {
"version": "7.31.11",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.31.11.tgz",
"integrity": "sha512-TTvq5JsT5v56wPa9OYHzsrOlHzKZKjV+aLgS+55NJP/cuzdiQPC7PfYoUjMoxlffKtvijpk7vA/jmuqRb9nohw==",
"version": "7.32.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz",
"integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==",
"dev": true,
"requires": {
"array-includes": "^3.1.6",
@ -5482,7 +5482,7 @@
"object.hasown": "^1.1.2",
"object.values": "^1.1.6",
"prop-types": "^15.8.1",
"resolve": "^2.0.0-next.3",
"resolve": "^2.0.0-next.4",
"semver": "^6.3.0",
"string.prototype.matchall": "^4.0.8"
},
@ -6430,9 +6430,9 @@
"dev": true
},
"postcss": {
"version": "8.4.20",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz",
"integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==",
"version": "8.4.21",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz",
"integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",
"dev": true,
"requires": {
"nanoid": "^3.3.4",
@ -6515,9 +6515,9 @@
"dev": true
},
"prettier": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz",
"integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==",
"version": "2.8.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz",
"integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==",
"dev": true
},
"prettier-linter-helpers": {
@ -6601,9 +6601,9 @@
}
},
"react-hotjar": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/react-hotjar/-/react-hotjar-5.3.0.tgz",
"integrity": "sha512-QkqVxrKR0cjloce6QozOwEjQlRI9iuGluBz3c2aqxDK97n1Za37PIsQ0bhLYea3SvRTuzrZ+Gu3Yg2n7YF/l1w==",
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/react-hotjar/-/react-hotjar-5.4.1.tgz",
"integrity": "sha512-2205ONuPZzAFAQaIG2BQf/l8nePf5ir16vF7S/RT937JYvw3c7WSH65XRnL3sT4GMpU4eDzesB964xNE5wjGPQ==",
"dev": true
},
"react-icons": {

View File

@ -11,6 +11,7 @@ import Certification from './certification';
import Education from './education';
import Project from './project';
import Blog from './blog';
import Footer from './footer';
import {
genericError,
getInitialTheme,
@ -19,7 +20,6 @@ import {
setupHotjar,
tooManyRequestError,
sanitizeConfig,
skeleton,
} from '../helpers/utils';
import { HelmetProvider } from 'react-helmet-async';
import PropTypes from 'prop-types';
@ -221,24 +221,7 @@ const GitProfile = ({ config }) => {
className={`p-4 footer ${bgColor} text-base-content footer-center`}
>
<div className="card compact bg-base-100 shadow">
<a
className="card-body"
href="https://github.com/arifszn/gitprofile"
target="_blank"
rel="noreferrer"
>
<div>
{loading ? (
skeleton({ width: 'w-52', height: 'h-6' })
) : (
<p className="font-mono text-sm">
Made with{' '}
<span className="text-primary">GitProfile</span> and
</p>
)}
</div>
</a>
<Footer content={sanitizedConfig.footer} loading={loading} />
</div>
</footer>
</Fragment>
@ -274,6 +257,9 @@ GitProfile.propTypes = {
phone: PropTypes.string,
email: PropTypes.string,
}),
resume: PropTypes.shape({
fileUrl: PropTypes.string,
}),
skills: PropTypes.array,
externalProjects: PropTypes.arrayOf(
PropTypes.shape({
@ -335,6 +321,7 @@ GitProfile.propTypes = {
'--rounded-btn': PropTypes.string,
}),
}),
footer: PropTypes.string,
}).isRequired,
};

View File

@ -183,7 +183,7 @@ const Blog = ({ loading, blog, googleAnalytics }) => {
<div
className={`card compact bg-base-100 ${
loading || (articles && articles.length)
? 'card compact shadow bg-opacity-40'
? 'shadow bg-opacity-40'
: 'shadow-lg'
}`}
>

View File

@ -36,14 +36,11 @@ const ListItem = ({ icon, title, value, link, skeleton = false }) => {
className={`${
skeleton ? 'flex-grow' : ''
} text-sm font-normal text-right mr-2 ml-3 ${link ? 'truncate' : ''}`}
style={{
wordBreak: 'break-word',
}}
>
<div
style={{
wordBreak: 'break-word',
}}
>
{value}
</div>
{value}
</div>
</a>
);

View File

@ -134,7 +134,7 @@ const ExternalProject = ({ externalProjects, loading, googleAnalytics }) => {
<div className="col-span-1 lg:col-span-2">
<div className="grid grid-cols-2 gap-6">
<div className="col-span-2">
<div className="card compact bg-gradient-to-br to-base-200 from-base-100 shadow">
<div className="card compact bg-base-100 shadow bg-opacity-40">
<div className="card-body">
<div className="mx-3 flex items-center justify-between mb-2">
<h5 className="card-title">

View File

@ -0,0 +1,24 @@
import PropTypes from 'prop-types';
import { skeleton } from '../../helpers/utils';
const Footer = ({ content, loading }) => {
if (!content) return null;
return (
<div className="card-body">
{loading ? (
skeleton({ width: 'w-52', height: 'h-6' })
) : (
<div dangerouslySetInnerHTML={{ __html: content }} />
)}
</div>
);
};
Footer.propTypes = {
content: PropTypes.string,
loading: PropTypes.bool.isRequired,
};
export default Footer;

View File

@ -96,7 +96,7 @@ const Project = ({ repo, loading, github, googleAnalytics }) => {
{item.description}
</p>
</div>
<div className="flex justify-between text-sm text-base-content text-opacity-60">
<div className="flex justify-between text-sm text-base-content text-opacity-60 truncate">
<div className="flex flex-grow">
<span className="mr-3 flex items-center">
<AiOutlineStar className="mr-0.5" />
@ -146,7 +146,7 @@ const Project = ({ repo, loading, github, googleAnalytics }) => {
href={`https://github.com/${github.username}?tab=repositories`}
target="_blank"
rel="noreferrer"
className="text-base-content opacity-50"
className="text-base-content opacity-50 hover:underline"
>
See All
</a>

View File

@ -189,6 +189,7 @@ export const sanitizeConfig = (config) => {
themes: themes,
customTheme: customTheme,
},
footer: config?.footer,
};
};
@ -210,7 +211,7 @@ export const tooManyRequestError = (reset) => {
target="_blank"
rel="noopener noreferrer"
>
rate limit.
rate limit
</a>
! Try again later{` ${reset}`}.
</p>

5
types/index.d.ts vendored
View File

@ -299,6 +299,11 @@ export interface Config {
* Theme config
*/
themeConfig?: ThemeConfig;
/**
* Custom footer
*/
footer?: string;
}
export interface GitProfileProps {