diff --git a/gitprofile.config.js b/gitprofile.config.js
index 4e1afc7..772bf6a 100644
--- a/gitprofile.config.js
+++ b/gitprofile.config.js
@@ -82,6 +82,22 @@ const config = {
to: '2014',
},
],
+ showcases: [
+ {
+ name: 'Website name 1',
+ description:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut aliquam aliquam, nunc nisl aliquet nisl, eget aliquam nisl nunc vel mauris.',
+ // image_url: 'https://via.placeholder.com/250x250',
+ html_url: 'https://example.com',
+ },
+ {
+ name: 'Website name 2',
+ description:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut aliquam aliquam, nunc nisl aliquet nisl, eget aliquam nisl nunc vel mauris.',
+ image_url: 'https://via.placeholder.com/250x250',
+ html_url: 'https://example.com',
+ },
+ ],
// Display blog posts from your medium or dev account. (Optional)
blog: {
source: 'dev', // medium | dev
diff --git a/src/components/GitProfile.jsx b/src/components/GitProfile.jsx
index 95d9843..7da7a25 100644
--- a/src/components/GitProfile.jsx
+++ b/src/components/GitProfile.jsx
@@ -9,6 +9,7 @@ import Skill from './skill';
import Experience from './experience';
import Certification from './certification';
import Education from './education';
+import Showcase from './showcase';
import Project from './project';
import Blog from './blog';
import {
@@ -196,6 +197,12 @@ const GitProfile = ({ config }) => {
+
{
+ const renderSkeleton = () => {
+ let array = [];
+ for (let index = 0; index < github.limit; index++) {
+ array.push(
+
+
+
+
+
+
+ {skeleton({ width: 'w-32', height: 'h-8' })}
+
+
+
+
+ {skeleton({
+ width: 'w-full',
+ height: 'h-4',
+ className: 'mb-2',
+ })}
+ {skeleton({ width: 'w-full', height: 'h-4' })}
+
+
+
+
+
+ {skeleton({ width: 'w-12', height: 'h-4' })}
+
+
+ {skeleton({ width: 'w-12', height: 'h-4' })}
+
+
+
+
+ {skeleton({ width: 'w-12', height: 'h-4' })}
+
+
+
+
+
+ );
+ }
+
+ return array;
+ };
+
+ const renderShowcases = () => {
+ return cases.map((item, index) => (
+ {
+ e.preventDefault();
+
+ try {
+ if (googleAnalytics?.id) {
+ ga.event({
+ action: 'Click showcase',
+ params: {
+ project: item.name,
+ },
+ });
+ }
+ } catch (error) {
+ console.error(error);
+ }
+
+ window?.open(item.html_url, '_blank');
+ }}
+ >
+
+
+
+
+
+
+ {item.name}
+
+
+
+
+ {item?.image_url && (
+
+

+
+ )}
+
+
+ {item.description}
+
+
+
+
+
+
+ ));
+ };
+
+ return (
+
+
+
+
+
+
+
+
+ {loading ? (
+ skeleton({ width: 'w-28', height: 'h-8' })
+ ) : (
+
+ My Showcases
+
+ )}
+
+
+
+
+ {loading || !cases ? renderSkeleton() : renderShowcases()}
+
+
+
+
+
+
+
+
+ );
+};
+
+Showcase.propTypes = {
+ cases: PropTypes.array,
+ loading: PropTypes.bool.isRequired,
+ github: PropTypes.object.isRequired,
+ googleAnalytics: PropTypes.object,
+};
+
+export default Showcase;
diff --git a/src/helpers/utils.jsx b/src/helpers/utils.jsx
index e4fa356..838a1ef 100644
--- a/src/helpers/utils.jsx
+++ b/src/helpers/utils.jsx
@@ -162,6 +162,7 @@ export const sanitizeConfig = (config) => {
fileUrl: config?.resume?.fileUrl || '',
},
skills: config?.skills || [],
+ showcases: config?.showcases || [],
experiences: config?.experiences || [],
certifications: config?.certifications || [],
education: config?.education || [],