From f67a6688b3f452bf492abf9582ff4af2637a4ccd Mon Sep 17 00:00:00 2001 From: Avneesh Agarwal Date: Sun, 3 Apr 2022 10:35:09 +0530 Subject: [PATCH] feat: add umami and minor improvements --- .github/FUNDING.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.yml | 62 +- .github/ISSUE_TEMPLATE/feature_request.yml | 6 +- .prettierignore | 1 + .versionrc.js | 23 +- CHANGELOG.md | 36 +- CODE_OF_CONDUCT.md | 22 +- README.md | 3 +- USING.md | 6 +- components/About.tsx | 4 +- components/Blog.tsx | 2 +- components/Contact.tsx | 6 +- components/Header.tsx | 6 +- components/Intro.tsx | 2 +- components/Post.tsx | 4 +- components/Projects.tsx | 6 +- components/Skills.tsx | 4 +- components/Testimonials.tsx | 2 +- components/Title.tsx | 2 +- components/header/MenuItem.tsx | 2 +- components/header/Navigation.tsx | 2 +- package.json | 47 +- pages/_app.tsx | 15 +- pages/index.tsx | 6 +- postcss.config.js | 2 +- tailwind.config.js | 1 - tsconfig.json | 16 +- yarn.lock | 890 ++++++++++++++------- 28 files changed, 722 insertions(+), 458 deletions(-) create mode 100644 .prettierignore diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 4812277..35d729d 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -custom: ["blog.avneesh.tech/sponsor", "https://sponsor.avneesh.tech/"] \ No newline at end of file +custom: ["blog.avneesh.tech/sponsor", "https://sponsor.avneesh.tech/"] diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 180e3be..573daee 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,57 +1,25 @@ -name: 🐛Bug Report -description: File a bug report +name: 🐛 Bug +description: Report an issue to help improve the project. +labels: ["bug"] body: - type: textarea - id: bug-description + id: description attributes: - label: Describe the Bug - placeholder: A clear and concise description of what the bug is. - validation: - required: true - - type: textarea - id: steps-to-reproduce - attributes: - label: Steps to Reproduce - placeholder: | - Steps to reproduce the behavior: - 1. Go to '...' - 2. Click on '....' - 3. Scroll down to '....' - 4. See error - validation: - required: true - - type: textarea - id: expected-behaviour - attributes: - label: Expected Behaviour - placeholder: A clear and concise description of what you expected to happen. - validation: + label: Description + description: A brief description of the question or issue, also include what you tried and what didn't work + validations: required: true - type: textarea id: screenshots attributes: label: Screenshots - placeholder: If applicable, add screenshots to help explain your problem. Highlight this area and drag and drop any file to attach it. - - type: textarea - id: desktop - attributes: - label: Desktop (please complete the following information): - value: | - - OS [e.g. iOS]: - - Browser [e.g. chrome, safari]: - - Version [e.g. 22]: - - type: textarea - id: smartphone - attributes: - label: Smartphone (please complete the following information): - value: | - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] + description: Please add screenshots if applicable + validations: + required: false - type: textarea - id: additional-context + id: extrainfo attributes: - label: Additional Context - placeholder: Add any other context about the problem here. - + label: Additional information + description: Is there anything else we should know about this bug? + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 4758bc6..77cd070 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -6,21 +6,21 @@ body: attributes: label: Is your feature request related to a problem? Please describe. placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - validation: + validation: required: true - type: textarea id: solution attributes: label: Describe the solution you'd like placeholder: A clear and concise description of what you want to happen. - validation: + validation: required: true - type: textarea id: alternatives attributes: label: Describe alternatives you've considered placeholder: A clear and concise description of any alternative solutions or features you've considered. - validation: + validation: required: true - type: textarea id: additional-context diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..d0d878e --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +.next \ No newline at end of file diff --git a/.versionrc.js b/.versionrc.js index b3078e2..70e230a 100644 --- a/.versionrc.js +++ b/.versionrc.js @@ -1,14 +1,15 @@ module.exports = { types: [ - { type: "feat", "section": "Features" }, - { type: "fix", "section": "Bug Fixes" }, - { type: "chore", "hidden": true }, - { type: "docs", "hidden": true }, - { type: "style", "hidden": true }, - { type: "refactor", "hidden": true }, - { type: "perf", "hidden": true }, - { type: "test", "hidden": true } + { type: "feat", section: "Features" }, + { type: "fix", section: "Bug Fixes" }, + { type: "chore", hidden: true }, + { type: "docs", hidden: true }, + { type: "style", hidden: true }, + { type: "refactor", hidden: true }, + { type: "perf", hidden: true }, + { type: "test", hidden: true }, ], - "commitUrlFormat": "https://github.com/avneesh0612/Portoflio/commits/{{hash}}", - "compareUrlFormat": "https://github.com/avneesh0612/Portoflio/compare/{{previousTag}}...{{currentTag}}" -} \ No newline at end of file + commitUrlFormat: "https://github.com/avneesh0612/Portoflio/commits/{{hash}}", + compareUrlFormat: + "https://github.com/avneesh0612/Portoflio/compare/{{previousTag}}...{{currentTag}}", +}; diff --git a/CHANGELOG.md b/CHANGELOG.md index 94c947d..821aa56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,57 +1,39 @@ # [1.5.0](https://github.com/avneesh0612/portfolio/compare/v1.4.2...v1.5.0) (2022-02-08) - ### Bug Fixes -* build and use link ([e8fc196](https://github.com/avneesh0612/portfolio/commit/e8fc1965d0f7d77fec6aecd0f0e8b8e8791f9312)) -* typo ([3ea1146](https://github.com/avneesh0612/portfolio/commit/3ea11468f2aa841de16712e253a03c941ae77f85)) -* use router instead of a tag ([d554049](https://github.com/avneesh0612/portfolio/commit/d554049f05bae4cde300afa6d152f7b39f45adeb)) - +- build and use link ([e8fc196](https://github.com/avneesh0612/portfolio/commit/e8fc1965d0f7d77fec6aecd0f0e8b8e8791f9312)) +- typo ([3ea1146](https://github.com/avneesh0612/portfolio/commit/3ea11468f2aa841de16712e253a03c941ae77f85)) +- use router instead of a tag ([d554049](https://github.com/avneesh0612/portfolio/commit/d554049f05bae4cde300afa6d152f7b39f45adeb)) ### Features -* changes on the 404 page ([eefac78](https://github.com/avneesh0612/portfolio/commit/eefac7857de018db1906f82d7cc1aef7204490bd)) - - +- changes on the 404 page ([eefac78](https://github.com/avneesh0612/portfolio/commit/eefac7857de018db1906f82d7cc1aef7204490bd)) ## [1.4.2](https://github.com/avneesh0612/portfolio/compare/v1.4.1...v1.4.2) (2022-01-30) - ### Bug Fixes -* add node types ([a77de92](https://github.com/avneesh0612/portfolio/commit/a77de92b4e04b87a2f5bc51d6c1c11a861716065)) - - +- add node types ([a77de92](https://github.com/avneesh0612/portfolio/commit/a77de92b4e04b87a2f5bc51d6c1c11a861716065)) ## [1.4.1](https://github.com/avneesh0612/portfolio/compare/v1.4.0...v1.4.1) (2022-01-22) - ### Bug Fixes -* og image ([117e68d](https://github.com/avneesh0612/portfolio/commit/117e68d7449a4f8bf1bf0bcd294b4dfa4b987b8a)) - - +- og image ([117e68d](https://github.com/avneesh0612/portfolio/commit/117e68d7449a4f8bf1bf0bcd294b4dfa4b987b8a)) # [1.4.0](https://github.com/avneesh0612/portfolio/compare/v1.3.0...v1.4.0) (2022-01-16) - ### Bug Fixes -* formatting ([d53e93c](https://github.com/avneesh0612/portfolio/commit/d53e93c61261d9b5b1d2ca7942ff27f7bf08dba7)) - +- formatting ([d53e93c](https://github.com/avneesh0612/portfolio/commit/d53e93c61261d9b5b1d2ca7942ff27f7bf08dba7)) ### Features -* minor refactors, and improve via feedback ([b05cc88](https://github.com/avneesh0612/portfolio/commit/b05cc88a0f9dae698038db9587c49b23d91caf74)) - - +- minor refactors, and improve via feedback ([b05cc88](https://github.com/avneesh0612/portfolio/commit/b05cc88a0f9dae698038db9587c49b23d91caf74)) # [1.3.0](https://github.com/avneesh0612/portfolio/compare/v1.2.2...v1.3.0) (2022-01-14) - ### Features -* added google analytics ([ce861ad](https://github.com/avneesh0612/portfolio/commit/ce861ada8b76474979fd5fb866bee55d7b9acc7f)) - - - +- added google analytics ([ce861ad](https://github.com/avneesh0612/portfolio/commit/ce861ada8b76474979fd5fb866bee55d7b9acc7f)) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 34f1b85..344b297 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within diff --git a/README.md b/README.md index 95eb560..338f26b 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,12 @@ ![Avneesh's portfolio banner](https://user-images.githubusercontent.com/76690419/149654118-3cc524c0-9772-4eb0-a86f-e1d2e532abcb.png) - - ### 🏠 [Homepage](https://www.avneesh.tech/) ### ✨ [Demo](https://www.avneesh.tech/) ## Using the template + To use this template follow the instructions given in [Using guide](https://github.com/avneesh0612/portfolio/blob/main/USING.md). ## Author diff --git a/USING.md b/USING.md index bb9883d..9aa7de0 100644 --- a/USING.md +++ b/USING.md @@ -5,15 +5,13 @@ Click on Use this template Now give your repository a name and you can give some additional details if you want. - ![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1631618260606/8ElFhJMQT.png) - ### Running the template - Clone the repository youhave been redirected to by -``` +``` git clone url ``` @@ -25,12 +23,14 @@ npm install # npm ``` - Starting the server + ``` npm run dev # yarn yarn dev # npm ``` ## Making changes + To add your details go to the data.json file in the public folder and replace my data with yours. To customize the colors go to `tailwind.config.js` and replace the existing colors with your brand colors. diff --git a/components/About.tsx b/components/About.tsx index c51687e..b246395 100644 --- a/components/About.tsx +++ b/components/About.tsx @@ -1,7 +1,7 @@ -import Image from "next/image"; -import React from "react"; import data from "../public/data.json"; import Title from "./Title"; +import Image from "next/image"; +import React from "react"; const About = () => { return ( diff --git a/components/Blog.tsx b/components/Blog.tsx index ff397bf..9aac76d 100644 --- a/components/Blog.tsx +++ b/components/Blog.tsx @@ -1,7 +1,7 @@ -import { FC } from "react"; import { PostType } from "../types/PostType"; import Post from "./Post"; import Title from "./Title"; +import { FC } from "react"; interface Props { Posts: [PostType]; diff --git a/components/Contact.tsx b/components/Contact.tsx index c7bf0b2..b879c68 100644 --- a/components/Contact.tsx +++ b/components/Contact.tsx @@ -1,8 +1,8 @@ -import Image from "next/image"; -import React from "react"; -import ContactButtons from "./ContactButtons"; import data from "../public/data.json"; +import ContactButtons from "./ContactButtons"; import { LineSvg } from "./icons"; +import Image from "next/image"; +import React from "react"; const Contact = () => { return ( diff --git a/components/Header.tsx b/components/Header.tsx index 9a8af03..75277e5 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -1,10 +1,10 @@ +import { useDimensions } from "../hooks/useDimensions"; +import Logo from "./Logo"; +import { MenuToggle, Navigation } from "./header"; import { motion, useCycle } from "framer-motion"; import Image from "next/image"; import { useEffect, useRef, useState } from "react"; import { Link } from "react-scroll"; -import { useDimensions } from "../hooks/useDimensions"; -import Logo from "./Logo"; -import { MenuToggle, Navigation } from "./header"; const sidebar = { open: (height = 1000) => ({ diff --git a/components/Intro.tsx b/components/Intro.tsx index 80715d5..b32a6b4 100644 --- a/components/Intro.tsx +++ b/components/Intro.tsx @@ -1,7 +1,7 @@ +import data from "../public/data.json"; import { motion } from "framer-motion"; import React from "react"; import { Link } from "react-scroll"; -import data from "../public/data.json"; const Intro = () => { return ( diff --git a/components/Post.tsx b/components/Post.tsx index 5cc847c..418349d 100644 --- a/components/Post.tsx +++ b/components/Post.tsx @@ -1,7 +1,7 @@ -import Image from "next/image"; -import { FC } from "react"; import { PostType } from "../types/PostType"; import { CommentIcon, LikeIcon } from "./icons"; +import Image from "next/image"; +import { FC } from "react"; interface Props { post: PostType; diff --git a/components/Projects.tsx b/components/Projects.tsx index 2ad1835..b4ad9ef 100644 --- a/components/Projects.tsx +++ b/components/Projects.tsx @@ -1,8 +1,8 @@ -import Image from "next/image"; -import React from "react"; import data from "../public/data.json"; -import { GitHubIcon, VisitIcon } from "./icons"; import Title from "./Title"; +import { GitHubIcon, VisitIcon } from "./icons"; +import Image from "next/image"; +import React from "react"; const Projects = () => { return ( diff --git a/components/Skills.tsx b/components/Skills.tsx index d9ce490..849d8ed 100644 --- a/components/Skills.tsx +++ b/components/Skills.tsx @@ -1,7 +1,7 @@ -import { motion } from "framer-motion"; -import Image from "next/image"; import data from "../public/data.json"; import Title from "./Title"; +import { motion } from "framer-motion"; +import Image from "next/image"; const Skills = () => { return ( diff --git a/components/Testimonials.tsx b/components/Testimonials.tsx index 0ba6a16..7855309 100644 --- a/components/Testimonials.tsx +++ b/components/Testimonials.tsx @@ -1,5 +1,5 @@ -import Title from "./Title"; import data from "../public/data.json"; +import Title from "./Title"; import Image from "next/image"; const Testimonials = () => { diff --git a/components/Title.tsx b/components/Title.tsx index 732e64f..01fe823 100644 --- a/components/Title.tsx +++ b/components/Title.tsx @@ -1,5 +1,5 @@ -import { FC } from "react"; import { LineSvg } from "./icons"; +import { FC } from "react"; interface TitleProps { num: number; diff --git a/components/header/MenuItem.tsx b/components/header/MenuItem.tsx index 4ab103f..6248fbe 100644 --- a/components/header/MenuItem.tsx +++ b/components/header/MenuItem.tsx @@ -1,7 +1,7 @@ import { motion } from "framer-motion"; import * as React from "react"; -import { Link } from "react-scroll"; import { FC } from "react"; +import { Link } from "react-scroll"; const variants = { open: { diff --git a/components/header/Navigation.tsx b/components/header/Navigation.tsx index dd8c0ff..b678605 100644 --- a/components/header/Navigation.tsx +++ b/components/header/Navigation.tsx @@ -1,6 +1,6 @@ +import MenuItem from "./MenuItem"; import { motion } from "framer-motion"; import * as React from "react"; -import MenuItem from "./MenuItem"; const variants = { open: { diff --git a/package.json b/package.json index 087e528..fa28735 100644 --- a/package.json +++ b/package.json @@ -4,47 +4,48 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "eslint --fix '{components,pages,utils}/**/*.{js,jsx,ts,tsx}'", - "lint:check": "eslint '{components,pages,utils}/**/*.{js,jsx,ts,tsx}'", + "lint": "eslint --fix .", + "lint:check": "eslint .", "prepare": "husky install", "pre-commit": "yarn run format && yarn run lint && git add -A .", "release": "standard-version", "release:minor": "standard-version --release-as minor", "release:patch": "standard-version --release-as patch", "release:major": "standard-version --release-as major", - "format": "prettier --write \"{components,content,docs,pages,styles,utils}/**/*.{js,jsx,ts,tsx,css,scss,json,yaml,md}\"", - "format:check": "prettier --check \"{components,content,docs,pages,styles,utils}/**/*.{js,jsx,ts,tsx,css,scss,json,yaml,md}\"" + "format": "prettier --write .", + "format:check": "prettier --check ." }, "dependencies": { "aos": "^3.0.0-beta.6", "feed": "^4.2.2", - "framer-motion": "^6.2.6", - "next": "^12.1.0", - "next-seo": "^5.1.0", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "react-scroll": "^1.8.4" + "framer-motion": "^6.2.8", + "next": "^12.1.4", + "next-seo": "^5.3.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "react-scroll": "^1.8.6" }, "devDependencies": { - "@commitlint/cli": "^16.2.1", + "@commitlint/cli": "^16.2.3", "@commitlint/config-conventional": "^16.2.1", + "@trivago/prettier-plugin-sort-imports": "^3.2.0", "@types/aos": "^3.0.4", - "@types/node": "^17.0.18", - "@types/react": "^17.0.39", + "@types/node": "^17.0.23", + "@types/react": "^17.0.43", "@types/react-scroll": "^1.8.3", - "autoprefixer": "^10.4.2", - "eslint": "^8.9.0", - "eslint-config-next": "^12.0.10", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-react": "^7.28.0", + "autoprefixer": "^10.4.4", + "eslint": "^8.12.0", + "eslint-config-next": "^12.1.4", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-react": "^7.29.4", "eslint-plugin-tailwind": "^0.2.1", - "eslint-plugin-tailwindcss": "^3.4.4", + "eslint-plugin-tailwindcss": "^3.5.0", "husky": "^7.0.4", - "postcss": "^8.4.6", - "prettier": "^2.5.1", + "postcss": "^8.4.12", + "prettier": "^2.6.2", "standard-version": "^9.3.2", "tailwindcss": "^3.0.23", - "typescript": "^4.5.5" + "typescript": "^4.6.3" }, "version": "1.5.0" -} \ No newline at end of file +} diff --git a/pages/_app.tsx b/pages/_app.tsx index 51c194f..f007c4c 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,9 +1,9 @@ -import { NextSeo } from "next-seo"; -import { AppProps } from "next/app"; +import data from "../public/data.json"; import "../styles/globals.css"; import AOS from "aos"; import "aos/dist/aos.css"; -import data from "../public/data.json"; +import { NextSeo } from "next-seo"; +import { AppProps } from "next/app"; import Head from "next/head"; import Script from "next/script"; @@ -14,6 +14,15 @@ function MyApp({ Component, pageProps }: AppProps) { return ( <> + {process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL && + process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID && ( +