Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ module.exports = {
plugins: [`gatsby-remark-prismjs`],
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
background_color: `#663399`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/images/mdg.png`, // This path is relative to the root of the site.
},
},
// `gatsby-transformer-sharp`, // Commented out due to sharp module issue
// `gatsby-plugin-sharp`, // Commented out due to sharp module issue
// {
// resolve: `gatsby-plugin-manifest`,
// options: {
// name: `gatsby-starter-default`,
// short_name: `starter`,
// start_url: `/`,
// background_color: `#663399`,
// theme_color: `#663399`,
// display: `minimal-ui`,
// icon: `src/images/mdg.png`, // This path is relative to the root of the site.
// },
// }, // Commented out due to sharp module dependency issue
{
resolve: `gatsby-plugin-google-analytics`,
options: {
Expand Down
88,268 changes: 28,307 additions & 59,961 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@
"gatsby-transformer-remark": "^2.8.27",
"gatsby-transformer-sharp": "^2.5.7",
"gsap": "^3.4.0",
"i18next": "^21.10.0",
"i18next-browser-languagedetector": "^6.1.8",
"prismjs": "^1.25.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-helmet": "^6.1.0"
"react-helmet": "^6.1.0",
"react-i18next": "^11.18.6"
},
"devDependencies": {
"babel-jest": "26.3.0",
Expand Down
36 changes: 19 additions & 17 deletions src/components/addons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { withPrefix } from 'gatsby';
import { ToolsIcon, XCircleIcon } from '@primer/octicons-react';
import { useTranslation } from 'react-i18next';
import latestBlogs from '../utils/workflows';
import links from '../constants/page-links';
import { isMediumUsernameValid, isGitHubUsernameValid } from '../utils/validation';
Expand Down Expand Up @@ -238,6 +239,7 @@ CustomizeStreakStats.propTypes = {

const Addons = (props) => {
const { data, social, handleDataChange, handleCheckChange } = props;
const { t } = useTranslation();
const [debounce, setDebounce] = useState(undefined);
const [badgeOptions, setBadgeOptions] = useState({
badgeStyle: data.badgeStyle,
Expand Down Expand Up @@ -344,109 +346,109 @@ const Addons = (props) => {

return (
<div className="flex justify-center items-start flex-col w-full px-2 sm:px-6 mb-10">
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">Add-ons</div>
<div className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2">{t('sections.addons')}</div>
<AddonsItem
inputId="visitors-count"
inputChecked={data.visitorsBadge}
onInputChange={() => handleCheckChange('visitorsBadge')}
Options={
<CustomizeOptions
title="Customize Badge"
title={t('addons.customizeBadge')}
CustomizationOptions={
<CustomizeBadge githubName={social.github} badgeOptions={badgeOptions} onBadgeUpdate={onBadgeUpdate} />
}
/>
}
>
display visitors count badge
{t('addons.visitorsCount')}
</AddonsItem>
<AddonsItem
inputId="github-profile-trophy"
inputChecked={data.githubProfileTrophy}
onInputChange={() => handleCheckChange('githubProfileTrophy')}
>
display github trophy
{t('addons.trophies')}
</AddonsItem>
<AddonsItem
inputId="github-stats"
inputChecked={data.githubStats}
onInputChange={() => handleCheckChange('githubStats')}
Options={
<CustomizeOptions
title="Customize Github Stats Card"
title={t('addons.customizeGithubStatsCard')}
CustomizationOptions={
<CustomizeGithubStatsBase prefix="stats" options={githubStatsOptions} onUpdate={onStatsUpdate} />
}
/>
}
>
display github profile stats card
{t('addons.displayGithubProfileStatsCard')}
</AddonsItem>
<AddonsItem
inputId="top-languages"
inputChecked={data.topLanguages}
onInputChange={() => handleCheckChange('topLanguages')}
Options={
<CustomizeOptions
title="Customize Top Skills Card"
title={t('addons.customizeTopSkillsCard')}
CustomizationOptions={
<CustomizeGithubStatsBase prefix="top-lang" options={topLanguagesOptions} onUpdate={onTopLangUpdate} />
}
/>
}
>
display top skills
{t('addons.displayTopSkills')}
</AddonsItem>
<AddonsItem
inputId="streak-stats"
inputChecked={data.streakStats}
onInputChange={() => handleCheckChange('streakStats')}
Options={
<CustomizeOptions
title="Customize Streak Stats Card"
title={t('addons.customizeStreakStatsCard')}
CustomizationOptions={
<CustomizeStreakStats prefix="streak-stats" options={streakStatsOptions} onUpdate={onStreakStatsUpdate} />
}
/>
}
>
display github streak stats
{t('addons.displayGithubStreakStats')}
</AddonsItem>
<AddonsItem
inputId="twitter-badge"
inputChecked={data.twitterBadge}
onInputChange={() => handleCheckChange('twitterBadge')}
>
display twitter badge
{t('addons.displayTwitterBadge')}
</AddonsItem>
<AddonsItem
inputId="dev-dynamic-blogs"
inputChecked={data.devDynamicBlogs}
onInputChange={() => handleCheckChange('devDynamicBlogs')}
>
display latest dev.to blogs dynamically (GitHub Action)
{t('addons.displayLatestDevToBlogs')}
</AddonsItem>
<AddonsItem
inputId="medium-dynamic-blogs"
inputChecked={data.mediumDynamicBlogs}
onInputChange={() => handleCheckChange('mediumDynamicBlogs')}
>
display latest medium blogs dynamically (GitHub Action)
{t('addons.displayLatestMediumBlogs')}
</AddonsItem>
<AddonsItem
inputId="rss-dynamic-blogs"
inputChecked={data.rssDynamicBlogs}
onInputChange={() => handleCheckChange('rssDynamicBlogs')}
>
display latest blogs from your personal blog dynamically (GitHub Action)
{t('addons.displayLatestPersonalBlogs')}
</AddonsItem>

{(data.devDynamicBlogs && social.dev) ||
(data.rssDynamicBlogs && social.rssurl) ||
(data.mediumDynamicBlogs && social.medium && isMediumUsernameValid(social.medium)) ? (
<div className="workflow">
<div>
download
{t('addons.download')}
<span
id="blog-post-worklow-span"
onClick={blogPostPorkflow}
Expand All @@ -458,10 +460,10 @@ const Addons = (props) => {
{' '}
blog-post-workflow.yml
</span>{' '}
file(learn
{t('addons.file')}({t('addons.learn')}
<a href={withPrefix(links.addons)} target="blank" style={{ color: '#002ead' }}>
{' '}
how to setup
{t('addons.howToSetup')}
</a>
)
</div>
Expand Down
31 changes: 18 additions & 13 deletions src/components/footer.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import React from 'react';
import { Link } from 'gatsby';
import { useTranslation } from 'react-i18next';
import links from '../constants/page-links';
import logo from '../images/mdg.png';
import discord from '../images/Discord-Logo.png';

const Footer = () => (
<div className="bg-gray-100 p-4 flex flex-col justify-center items-center shadow-inner mt-2">
const Footer = () => {
const { t } = useTranslation();

return (
<div className="bg-gray-100 p-4 flex flex-col justify-center items-center shadow-inner mt-2">"
<div className="w-full flex flex-col sm:flex-row justify-evenly py-2">
<div className="sm:ml-0 sm:mr-6 order-last sm:order-none flex">
<h1 className="text-base font-bold font-title text-xl sm:text-2xl mt-3 sm:mt-0">
Expand All @@ -21,35 +25,35 @@ const Footer = () => (
</div>
<div className="text-xl sm:text-base font-light sm:font-normal">
<div className="font-title font-bold mb-4 sm:mb-2">
<strong>Pages</strong>
<strong>{t('footer.pages')}</strong>
</div>
<div className="ml-2 sm:ml-0">
<Link to={links.addons} activeStyle={{ color: '#002ead' }}>
Addons
{t('footer.addons')}
</Link>
</div>
<div className="ml-2 sm:ml-0">
<Link to={links.support} activeStyle={{ color: '#002ead' }}>
Support
{t('footer.support')}
</Link>
</div>
<div className="ml-2 sm:ml-0">
<Link to={links.about} activeStyle={{ color: '#002ead' }}>
About
{t('footer.about')}
</Link>
</div>
</div>
<div className="text-xl sm:text-base font-light sm:font-normal">
<div className="font-title font-bold my-4 sm:my-0 sm:mb-2">
<strong>More</strong>
<strong>{t('footer.more')}</strong>
</div>
<div className="ml-2 sm:ml-0">
<a
href="https://github.com/rahuldkjain/github-profile-readme-generator"
aria-label="Github rahuldkjain/github-profile-readme-generator"
target="blank"
>
Github
{t('footer.github')}
</a>
</div>
<div className="ml-2 sm:ml-0">
Expand All @@ -58,7 +62,7 @@ const Footer = () => (
aria-label="Releases on Github rahuldkjain/github-profile-readme-generator"
target="blank"
>
Releases
{t('footer.releases')}
</a>
</div>
<div className="ml-2 sm:ml-0">
Expand All @@ -67,7 +71,7 @@ const Footer = () => (
aria-label="Issues in rahuldkjain/github-profile-readme-generator"
target="blank"
>
Issues
{t('footer.issues')}
</a>
</div>
<div className="ml-2 sm:ml-0">
Expand All @@ -76,13 +80,13 @@ const Footer = () => (
aria-label="Pull Requests in rahuldkjain/github-profile-readme-generator"
target="blank"
>
Pull Requests
{t('footer.pullRequests')}
</a>
</div>
</div>
<div>
<div className="font-title font-bold text-xl sm:text-base my-4 sm:my-0 sm:mb-2">
<strong>Join Community</strong>
<strong>{t('footer.joinCommunity')}</strong>
</div>
<div className="ml-2 sm:ml-0">
<a href="https://discord.gg/HHMs7Eg" aria-label="Discord of the community" target="blank">
Expand All @@ -92,12 +96,13 @@ const Footer = () => (
</div>
</div>
<div className="py-2 mt-2">
Developed in India{' '}
{t('footer.developedInIndia')}{' '}
<span role="img" aria-label="india">
{' '}
๐Ÿ‡ฎ๐Ÿ‡ณ
</span>
</div>
</div>
);
};
export default Footer;
6 changes: 4 additions & 2 deletions src/components/header.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { StarIcon, RepoForkedIcon } from '@primer/octicons-react';
import { useTranslation } from 'react-i18next';
import gsap from 'gsap';
import axios from 'axios';
import { Link } from 'gatsby';
Expand All @@ -10,6 +11,7 @@ import logo from '../images/mdg.png';

const Header = (props) => {
const { heading } = props;
const { t } = useTranslation();
const [stats, setstats] = useState({
starsCount: 0,
forksCount: 0,
Expand Down Expand Up @@ -69,7 +71,7 @@ const Header = (props) => {
>
<div className="text-xxs sm:text-sm border-2 border-solid border-gray-900 bg-gray-100 flex items-center justify-center py-1 px-2">
<StarIcon size={16} id="star-icon" className="px-1 w-6 star" />
Star this repo
{t('header.starRepo')}
<span className="github-count px-1 sm:px-2">{stats.starsCount}</span>
</div>
</a>
Expand All @@ -80,7 +82,7 @@ const Header = (props) => {
>
<div className="text-xxs sm:text-sm border-2 border-solid border-gray-900 bg-gray-100 flex items-center justify-center py-1 px-2">
<RepoForkedIcon size={16} id="fork-icon" className="px-1 w-6 fork" />
Fork on GitHub
{t('header.forkGitHub')}
<span className="github-count px-1 sm:px-2">{stats.forksCount}</span>
</div>
</a>
Expand Down
Loading