11 Commits

Author SHA1 Message Date
MD. Ariful Alam
fadc5f3f7e Bump version 2021-10-14 23:17:16 +06:00
MD. Ariful Alam
edd365ef01 Merge branch 'main' of https://github.com/arifszn/ezprofile into main 2021-10-14 23:10:50 +06:00
MD. Ariful Alam
16aadfa664 Change status code for too many requests 2021-10-14 23:08:35 +06:00
MD. Ariful Alam
1cadcc1f59 Update README.md 2021-10-14 23:07:27 +06:00
MD. Ariful Alam
03c566615a Update dependencies 2021-10-14 22:58:29 +06:00
MD. Ariful Alam
7a4d8aefdf Update config.js 2021-10-09 11:44:20 +06:00
MD. Ariful Alam
d9de322944 Update config.js 2021-10-02 00:11:42 +06:00
MD. Ariful Alam
bc5bec50f4 Update README.md 2021-09-25 13:58:49 +06:00
MD. Ariful Alam
e6006e387a Refactor hotjar setup 2021-09-23 22:34:44 +06:00
MD. Ariful Alam
e4005d288d Merge pull request #9 from anton-gustafsson/add-hotjar
Add hotjar support
2021-09-23 22:21:54 +06:00
Anton Jacobsson
0424045f55 feat(all): add hotjar 2021-09-22 22:10:14 +02:00
7 changed files with 1043 additions and 1804 deletions

View File

@@ -24,6 +24,7 @@ It's all possible using [GitHub API](https://developer.github.com/v3/) (for auto
✓ [21 Themes](#themes)\ ✓ [21 Themes](#themes)\
✓ [Google Analytics](#google-analytics)\ ✓ [Google Analytics](#google-analytics)\
✓ [Hotjar](#hotjar)\
✓ [Meta Tags](#meta-tags)\ ✓ [Meta Tags](#meta-tags)\
✓ [Avatar and Bio](#avatar-and-bio)\ ✓ [Avatar and Bio](#avatar-and-bio)\
✓ [Social Links](#social-links)\ ✓ [Social Links](#social-links)\
@@ -146,6 +147,10 @@ module.exports = {
// GA3 tracking id/GA4 tag id // GA3 tracking id/GA4 tag id
id: '' // UA-XXXXXXXXX-X | G-XXXXXXXXXX id: '' // UA-XXXXXXXXX-X | G-XXXXXXXXXX
}, },
hotjar: {
id: '',
snippetVersion : 6
},
themeConfig: { themeConfig: {
default: 'light', default: 'light',
@@ -238,6 +243,20 @@ Besides tracking visitors, ezFolio will track click events on projects and blog
<br/> <br/>
![Event](https://www.arifszn.com/assets/img/hosted/ezprofile/event.png) ![Event](https://www.arifszn.com/assets/img/hosted/ezprofile/event.png)
### Hotjar
ezProfile supports hotjar. If you do not want to use Hotjar, keep the <code>id</code> empty.
```js
// config.js
module.exports = {
// ...
hotjar: {
id: '',
snippetVersion : 6
},
}
```
### Meta Tags ### Meta Tags
@@ -389,7 +408,7 @@ The posts are fetched by [Article-api](https://github.com/arifszn/article-api).
## 📢 Please Read ## 📢 Please Read
I intend to keep my works open source. Please do not discourage me by claiming this work by copying it as your own or removing/changing the footer notice. However You are open to use this project by forking it and change any code necessary(except footer notice). Go through the [License](https://github.com/arifszn/ezprofile/blob/main/LICENSE) before thinking of stealing this project. For every stolen copy found, an issue will be created on the concerned repo and a [DMCA Takedown](https://www.dmca.com/FAQ/What-is-a-DMCA-Takedown) notice will be sent. Do not fall into this [list](https://github.com/arifszn/ezprofile/issues/2). I intend to keep my works open source. Please do not discourage me by claiming this work by copying it as your own or removing/changing the footer notice. However You are open to use this project by forking it and change any code necessary by giving attribute to the original author.
## 💖 Support ## 💖 Support

2793
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "ezprofile", "name": "ezprofile",
"version": "1.0.1", "version": "1.1.0",
"description": "Kickstart your personal portfolio with Github Api and blog", "description": "Kickstart your personal portfolio with Github Api and blog",
"homepage": "https://arifszn.github.io/ezprofile", "homepage": "https://arifszn.github.io/ezprofile",
"private": true, "private": true,
@@ -16,7 +16,7 @@
"@testing-library/react": "^11.1.0", "@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10", "@testing-library/user-event": "^12.1.10",
"article-api": "^1.0.5", "article-api": "^1.0.5",
"axios": "^0.21.1", "axios": "^0.23.0",
"daisyui": "^1.12.1", "daisyui": "^1.12.1",
"gh-pages": "^3.2.3", "gh-pages": "^3.2.3",
"moment": "^2.29.1", "moment": "^2.29.1",
@@ -24,6 +24,7 @@
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-helmet-async": "^1.1.0", "react-helmet-async": "^1.1.0",
"react-hotjar": "^3.0.1",
"react-icons": "^4.2.0", "react-icons": "^4.2.0",
"react-scripts": "4.0.3", "react-scripts": "4.0.3",
"sass": "^1.38.0", "sass": "^1.38.0",

View File

@@ -90,7 +90,7 @@ function App() {
}); });
if (error.response.status === 403) { if (error.response.status === 403) {
setError(403); setError(429);
} else if (error.response.status === 404) { } else if (error.response.status === 404) {
setError(404); setError(404);
} else { } else {
@@ -111,7 +111,7 @@ function App() {
<ErrorPage <ErrorPage
status={`${error}`} status={`${error}`}
title={(error === 404) ? 'The Github Username is Incorrect' : ( title={(error === 404) ? 'The Github Username is Incorrect' : (
error === 403 ? 'Too Many Request.' : `Ops!!` error === 429 ? 'Too Many Requests.' : `Ops!!`
)} )}
subTitle={ subTitle={
(error === 404) ? ( (error === 404) ? (
@@ -119,7 +119,7 @@ function App() {
Please provide correct github username in <code>src\config.js</code> Please provide correct github username in <code>src\config.js</code>
</p> </p>
) : ( ) : (
error === 403 ? ( error === 429 ? (
<p> <p>
Oh no, you hit the{' '} Oh no, you hit the{' '}
<a <a

View File

@@ -31,6 +31,7 @@ module.exports = {
'Jquery', 'Jquery',
'MySQL', 'MySQL',
'Git', 'Git',
'Docker',
'CSS', 'CSS',
'Antd', 'Antd',
'Tailwind', 'Tailwind',
@@ -39,7 +40,7 @@ module.exports = {
experiences: [ experiences: [
{ {
company: 'Monstarlab Bangladesh', company: 'Monstarlab Bangladesh',
position: 'Software Engineer', position: 'Backend Engineer',
from: 'September 2021', from: 'September 2021',
to: 'Present' to: 'Present'
}, },
@@ -86,6 +87,10 @@ module.exports = {
// GA3 tracking id/GA4 tag id UA-XXXXXXXXX-X | G-XXXXXXXXXX // GA3 tracking id/GA4 tag id UA-XXXXXXXXX-X | G-XXXXXXXXXX
id: 'G-WLLB5E14M6' // Please remove this and use your own tag id id: 'G-WLLB5E14M6' // Please remove this and use your own tag id
}, },
hotjar: {
id: '2617601', // Please remove this and use your own id
snippetVersion : 6
},
themeConfig: { themeConfig: {
default: 'light', default: 'light',

View File

@@ -1,5 +1,6 @@
import config from "../config"; import config from "../config";
import colors from './colors.json'; import colors from './colors.json';
import { hotjar } from 'react-hotjar';
export const getInitialTheme = () => { export const getInitialTheme = () => {
if (config.themeConfig.disableSwitch) { if (config.themeConfig.disableSwitch) {
@@ -68,3 +69,11 @@ export const isThemeDarkish = (theme) => {
return false; return false;
} }
} }
export const setupHotjar = () => {
if (config.hotjar?.id) {
let snippetVersion = config.hotjar?.snippetVersion ? config.hotjar?.snippetVersion : 6;
hotjar.initialize(config.hotjar.id, snippetVersion);
}
}

View File

@@ -6,6 +6,7 @@ import reportWebVitals from './reportWebVitals';
import { HelmetProvider } from 'react-helmet-async'; import { HelmetProvider } from 'react-helmet-async';
import { ThemeProvider } from './contexts/ThemeContext'; import { ThemeProvider } from './contexts/ThemeContext';
import { LoadingProvider } from './contexts/LoadingContext'; import { LoadingProvider } from './contexts/LoadingContext';
import { setupHotjar } from './helpers/utils';
ReactDOM.render( ReactDOM.render(
<React.StrictMode> <React.StrictMode>
@@ -21,3 +22,4 @@ ReactDOM.render(
); );
reportWebVitals(); reportWebVitals();
setupHotjar();