diff --git a/README.md b/README.md index a994134..7c0a936 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ ✓ [Certification Section](#certifications) ✓ [Education Section](#education) ✓ [Projects Section](#projects) +✓ [Publication Section](#publications) ✓ [Blog Posts Section](#blog-posts) To view a live example, **[click here](https://arifszn.github.io/gitprofile)**. @@ -282,6 +283,17 @@ const CONFIG = { to: '2014', }, ], + publications: [ + { + title: 'Publication Title', + conferenceName: 'Conference Name', + journalName: 'Journal Name', + authors: 'John Doe, Jane Smith', + link: 'https://example.com', + description: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut.', + }, + ], // Display articles from your medium or dev account. (Optional) blog: { source: 'dev', // medium | dev @@ -660,6 +672,30 @@ const CONFIG = { }; ``` +### Publications + +Provide your academic publishing in `publications`. + +```ts +// gitprofile.config.ts +const CONFIG = { + // ... + publications: [ + { + title: 'Publication Title', + conferenceName: 'Conference Name', + journalName: 'Journal Name', + authors: 'John Doe, Jane Smith', + link: 'https://example.com', + description: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut.', + }, + ], +}; +``` + +Empty array will hide the publications section. + ### Blog Posts If you have [medium](https://medium.com) or [dev](https://dev.to) account, you can show your recent blog posts in here just by providing your medium/dev username. You can limit how many posts to display (Max is `10`). diff --git a/gitprofile.config.ts b/gitprofile.config.ts index bed1e2c..f83cc8b 100644 --- a/gitprofile.config.ts +++ b/gitprofile.config.ts @@ -132,6 +132,26 @@ const CONFIG = { to: '2014', }, ], + publications: [ + { + title: 'Publication Title', + conferenceName: '', + journalName: 'Journal Name', + authors: 'John Doe, Jane Smith', + link: 'https://example.com', + description: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', + }, + { + title: 'Publication Title', + conferenceName: 'Conference Name', + journalName: '', + authors: 'John Doe, Jane Smith', + link: 'https://example.com', + description: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', + }, + ], // Display articles from your medium or dev account. (Optional) blog: { source: 'dev', // medium | dev diff --git a/global.d.ts b/global.d.ts index 33179e1..8a3c48f 100644 --- a/global.d.ts +++ b/global.d.ts @@ -217,6 +217,15 @@ interface Education { to: string; } +interface Publication { + title: string; + conferenceName?: string; + journalName?: string; + authors?: string; + link?: string; + description?: string; +} + interface GoogleAnalytics { /** * GA3 tracking id/GA4 tag id UA-XXXXXXXXX-X | G-XXXXXXXXXX @@ -370,6 +379,11 @@ interface Config { */ educations?: Array; + /** + * Publication list + */ + publications?: Array; + /** * Resume */ diff --git a/src/components/blog-card/index.tsx b/src/components/blog-card/index.tsx index 2efc8e5..37d44e6 100644 --- a/src/components/blog-card/index.tsx +++ b/src/components/blog-card/index.tsx @@ -132,7 +132,7 @@ const BlogCard = ({
-

+

{article.title}

diff --git a/src/components/certification-card/index.tsx b/src/components/certification-card/index.tsx index 73d79fe..3394de1 100644 --- a/src/components/certification-card/index.tsx +++ b/src/components/certification-card/index.tsx @@ -19,7 +19,7 @@ const ListItem = ({ style={{ left: '-4.5px' }} >

{year}
-
+
{name} diff --git a/src/components/external-project-card/index.tsx b/src/components/external-project-card/index.tsx index 4139568..b5e1c17 100644 --- a/src/components/external-project-card/index.tsx +++ b/src/components/external-project-card/index.tsx @@ -93,7 +93,7 @@ const ExternalProjectCard = ({
-

+

{item.title}

{item.imageUrl && ( diff --git a/src/components/gitprofile.tsx b/src/components/gitprofile.tsx index 7d1ca0f..da3b103 100644 --- a/src/components/gitprofile.tsx +++ b/src/components/gitprofile.tsx @@ -29,6 +29,7 @@ import GithubProjectCard from './github-project-card'; import ExternalProjectCard from './external-project-card'; import BlogCard from './blog-card'; import Footer from './footer'; +import PublicationCard from './publication-card'; /** * Renders the GitProfile component. @@ -255,6 +256,12 @@ const GitProfile = ({ config }: { config: Config }) => { googleAnalyticsId={sanitizedConfig.googleAnalytics.id} /> )} + {sanitizedConfig.publications.length !== 0 && ( + + )} {sanitizedConfig.projects.external.projects.length !== 0 && ( ( -
  • -
    -
    {time}
    -

    {position}

    - -
  • -); - const PublicationCard = ({ - experiences, + publications, loading, }: { - experiences: SanitizedExperience[]; + publications: SanitizedPublication[]; loading: boolean; }) => { const renderSkeleton = () => { const array = []; - for (let index = 0; index < 2; index++) { + for (let index = 0; index < publications.length; index++) { array.push( - , +
    +
    +
    +
    +
    +
    +

    + {skeleton({ + widthCls: 'w-32', + heightCls: 'h-8', + className: 'mb-2 mx-auto', + })} +

    +

    + {skeleton({ + widthCls: 'w-20', + heightCls: 'h-4', + className: 'mb-2 mx-auto', + })} +

    +

    + {skeleton({ + widthCls: 'w-20', + heightCls: 'h-4', + className: 'mb-2 mx-auto', + })} +

    +

    + {skeleton({ + widthCls: 'w-full', + heightCls: 'h-4', + className: 'mb-2 mx-auto', + })} +

    +

    + {skeleton({ + widthCls: 'w-full', + heightCls: 'h-4', + className: 'mb-2 mx-auto', + })} +

    +
    +
    +
    +
    +
    +
    , ); } return array; }; - return ( -
    -
    -
    -
    -
    -
    -
    - - Publications - -
    + + const renderPublications = () => { + return publications.map((item, index) => ( + +
    +
    +
    +
    +
    +

    + {item.title} +

    + {item.conferenceName && ( +

    + {item.conferenceName} +

    + )} + {item.journalName && ( +

    + {item.journalName} +

    + )} + {item.authors && ( +

    + Author: {item.authors} +

    + )} + {item.description && ( +

    + {item.description} +

    + )} +
    -
    -
    - -
    -
    -
    -
    -
    -

    - Publication Title -

    -

    - Conference / Journal Name -

    -

    - Authors: John Doe, Jane Smith -

    -

    - Lorem ipsum dolor sit amet, consectetur - adipiscing elit, sed do eiusmod tempor - incididunt ut labore et dolore magna aliqua. Ut - enim ad minim veniam, quis nostrud exercitation - ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in - reprehenderit in voluptate velit esse cillum - dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa - qui officia deserunt mollit anim id est laborum. -

    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -

    - Publication Title -

    -

    - Conference / Journal Name -

    -

    - Authors: John Doe, Jane Smith -

    -

    - Lorem ipsum dolor sit amet, consectetur - adipiscing elit, sed do eiusmod tempor - incididunt ut labore et dolore magna aliqua. Ut - enim ad minim veniam, quis nostrud exercitation - ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in - reprehenderit in voluptate velit esse cillum - dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa - qui officia deserunt mollit anim id est laborum. -

    -
    -
    -
    -
    -
    -
    +
    +
    +
    + + )); + }; + + return ( + +
    +
    +
    +
    +
    +
    +
    + {loading ? ( + skeleton({ widthCls: 'w-40', heightCls: 'h-8' }) + ) : ( + + Publications + + )} +
    +
    +
    +
    + {loading ? renderSkeleton() : renderPublications()} +
    -
    + ); }; diff --git a/src/interfaces/sanitized-config.tsx b/src/interfaces/sanitized-config.tsx index d860b85..37e0c39 100644 --- a/src/interfaces/sanitized-config.tsx +++ b/src/interfaces/sanitized-config.tsx @@ -87,6 +87,15 @@ export interface SanitizedEducation { to: string; } +export interface SanitizedPublication { + title: string; + conferenceName?: string; + journalName?: string; + authors?: string; + link?: string; + description?: string; +} + export interface SanitizedGoogleAnalytics { id?: string; } @@ -132,6 +141,7 @@ export interface SanitizedConfig { experiences: Array; educations: Array; certifications: Array; + publications: Array; googleAnalytics: SanitizedGoogleAnalytics; hotjar: SanitizedHotjar; blog: SanitizedBlog; diff --git a/src/utils/index.tsx b/src/utils/index.tsx index 3905c96..f222147 100644 --- a/src/utils/index.tsx +++ b/src/utils/index.tsx @@ -99,6 +99,7 @@ export const getSanitizedConfig = ( config?.educations?.filter( (item) => item.institution || item.degree || item.from || item.to, ) || [], + publications: config?.publications?.filter((item) => item.title) || [], googleAnalytics: { id: config?.googleAnalytics?.id, },