-
Notifications
You must be signed in to change notification settings - Fork 132
feat: add custom 404 error page #334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JayRathore10
wants to merge
2
commits into
GitMetricsLab:main
Choose a base branch
from
JayRathore10:feat/add-custom-404-page
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+123
−93
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,130 +1,130 @@ | ||
| # 🌟 Contributing to GitHub Tracker | ||
| # 🌟 Contributing to GitHub Tracker | ||
|
|
||
| Thank you for showing interest in **GitHub Tracker**! 🚀 | ||
| Whether you're here to fix a bug, propose an enhancement, or add a new feature, we’re thrilled to welcome you aboard. Let’s build something awesome together! | ||
| Thank you for showing interest in **GitHub Tracker**! 🚀 | ||
| Whether you're here to fix a bug, propose an enhancement, or add a new feature, we’re thrilled to welcome you aboard. Let’s build something awesome together! | ||
|
|
||
| <br> | ||
| <br> | ||
|
|
||
| ## 🧑⚖️ Code of Conduct | ||
| ## 🧑⚖️ Code of Conduct | ||
|
|
||
| Please make sure to read and adhere to our [Code of Conduct](https://github.com/GitMetricsLab/github_tracker/CODE_OF_CONDUCT.md) before contributing. We aim to foster a respectful and inclusive environment for everyone. | ||
| Please make sure to read and adhere to our [Code of Conduct](https://github.com/GitMetricsLab/github_tracker/CODE_OF_CONDUCT.md) before contributing. We aim to foster a respectful and inclusive environment for everyone. | ||
|
|
||
| <br> | ||
| <br> | ||
|
|
||
| ## 🛠 Project Structure | ||
| ## 🛠 Project Structure | ||
|
|
||
| ```bash | ||
| github_tracker/ | ||
| ├── backend/ # Node.js + Express backend | ||
| │ ├── routes/ # API routes | ||
| │ ├── controllers/ # Logic handlers | ||
| │ └── index.js # Entry point for server | ||
| │ | ||
| ├── frontend/ # React + Vite frontend | ||
| │ ├── components/ # Reusable UI components | ||
| │ ├── pages/ # Main pages/routes | ||
| │ └── main.jsx # Root file | ||
| │ | ||
| ├── public/ # Static assets like images | ||
| │ | ||
| ├── .gitignore | ||
| ├── README.md | ||
| ├── package.json | ||
| ├── tailwind.config.js | ||
| └── CONTRIBUTING.md | ||
| ``` | ||
| ```bash | ||
| github_tracker/ | ||
| ├── backend/ # Node.js + Express backend | ||
| │ ├── routes/ # API routes | ||
| │ ├── controllers/ # Logic handlers | ||
| │ └── index.js # Entry point for server | ||
| │ | ||
| ├── frontend/ # React + Vite frontend | ||
| │ ├── components/ # Reusable UI components | ||
| │ ├── pages/ # Main pages/routes | ||
| │ └── main.jsx # Root file | ||
| │ | ||
| ├── public/ # Static assets like images | ||
| │ | ||
| ├── .gitignore | ||
| ├── README.md | ||
| ├── package.json | ||
| ├── tailwind.config.js | ||
| └── CONTRIBUTING.md | ||
| ``` | ||
|
|
||
| --- | ||
| --- | ||
|
|
||
| ## 🤝 How to Contribute | ||
| ## 🤝 How to Contribute | ||
|
|
||
| ### 🧭 First-Time Contribution Steps | ||
| ### 🧭 First-Time Contribution Steps | ||
|
|
||
| 1. **Fork the Repository** 🍴 | ||
| Click "Fork" to create your own copy under your GitHub account. | ||
| 1. **Fork the Repository** 🍴 | ||
| Click "Fork" to create your own copy under your GitHub account. | ||
|
|
||
| 2. **Clone Your Fork** 📥 | ||
| ```bash | ||
| git clone https://github.com/<your-username>/github_tracker.git | ||
| ``` | ||
| 2. **Clone Your Fork** 📥 | ||
| ```bash | ||
| git clone https://github.com/<your-username>/github_tracker.git | ||
| ``` | ||
|
|
||
| 3. **Navigate to the Project Folder** 📁 | ||
| ```bash | ||
| cd github_tracker | ||
| ``` | ||
| 3. **Navigate to the Project Folder** 📁 | ||
| ```bash | ||
| cd github_tracker | ||
| ``` | ||
|
|
||
| 4. **Create a New Branch** 🌿 | ||
| ```bash | ||
| git checkout -b your-feature-name | ||
| ``` | ||
| 4. **Create a New Branch** 🌿 | ||
| ```bash | ||
| git checkout -b your-feature-name | ||
| ``` | ||
|
|
||
| 5. **Make Your Changes** ✍ | ||
| After modifying files, stage and commit: | ||
| 5. **Make Your Changes** ✍ | ||
| After modifying files, stage and commit: | ||
|
|
||
| ```bash | ||
| git add . | ||
| git commit -m "✨ Added [feature/fix]: your message" | ||
| ``` | ||
| ```bash | ||
| git add . | ||
| git commit -m "✨ Added [feature/fix]: your message" | ||
| ``` | ||
|
|
||
| 6. **Push Your Branch to GitHub** 🚀 | ||
| ```bash | ||
| git push origin your-feature-name | ||
| ``` | ||
| 6. **Push Your Branch to GitHub** 🚀 | ||
| ```bash | ||
| git push origin your-feature-name | ||
| ``` | ||
|
|
||
| 7. **Open a Pull Request** 🔁 | ||
| Go to the original repo and click **Compare & pull request**. | ||
|
|
||
| --- | ||
| 7. **Open a Pull Request** 🔁 | ||
| Go to the original repo and click **Compare & pull request**. | ||
| --- | ||
|
|
||
| ## 🚦 Pull Request Guidelines | ||
| ## 🚦 Pull Request Guidelines | ||
|
|
||
| ### **Split Big Changes into Multiple Commits** | ||
| - When making large or complex changes, break them into smaller, logical commits. | ||
| - Each commit should represent a single purpose or unit of change (e.g. refactoring, adding a feature, fixing a bug). | ||
| --- | ||
| - ✅ Ensure your code builds and runs without errors. | ||
| - 🧪 Include tests where applicable. | ||
| - 💬 Add comments if the logic is non-trivial. | ||
| - 📸 Attach screenshots for UI-related changes. | ||
| - 🔖 Use meaningful commit messages and titles. | ||
| ### **Split Big Changes into Multiple Commits** | ||
| - When making large or complex changes, break them into smaller, logical commits. | ||
| - Each commit should represent a single purpose or unit of change (e.g. refactoring, adding a feature, fixing a bug). | ||
| --- | ||
| - ✅ Ensure your code builds and runs without errors. | ||
| - 🧪 Include tests where applicable. | ||
| - 💬 Add comments if the logic is non-trivial. | ||
| - 📸 Attach screenshots for UI-related changes. | ||
| - 🔖 Use meaningful commit messages and titles. | ||
|
|
||
| --- | ||
| --- | ||
|
|
||
| ## 🐞 Reporting Issues | ||
| ## 🐞 Reporting Issues | ||
|
|
||
| If you discover a bug or have a suggestion: | ||
| If you discover a bug or have a suggestion: | ||
|
|
||
| ➡️ [Open an Issue](https://github.com/GitMetricsLab/github_tracker/issues/new/choose) | ||
| ➡️ [Open an Issue](https://github.com/GitMetricsLab/github_tracker/issues/new/choose) | ||
|
|
||
| Please include: | ||
| Please include: | ||
|
|
||
| - **Steps to Reproduce** | ||
| - **Expected vs. Actual Behavior** | ||
| - **Screenshots/Logs (if any)** | ||
| - **Steps to Reproduce** | ||
| - **Expected vs. Actual Behavior** | ||
| - **Screenshots/Logs (if any)** | ||
|
|
||
| --- | ||
| --- | ||
|
|
||
| ## 🧠 Good Coding Practices | ||
| ## 🧠 Good Coding Practices | ||
|
|
||
| 1. **Consistent Style** | ||
| Stick to the project's linting and formatting conventions (e.g., ESLint, Prettier, Tailwind classes). | ||
| 1. **Consistent Style** | ||
| Stick to the project's linting and formatting conventions (e.g., ESLint, Prettier, Tailwind classes). | ||
|
|
||
| 2. **Meaningful Naming** | ||
| Use self-explanatory names for variables and functions. | ||
| 2. **Meaningful Naming** | ||
| Use self-explanatory names for variables and functions. | ||
|
|
||
| 3. **Avoid Duplication** | ||
| Keep your code DRY (Don't Repeat Yourself). | ||
| 3. **Avoid Duplication** | ||
| Keep your code DRY (Don't Repeat Yourself). | ||
|
|
||
| 4. **Testing** | ||
| Add unit or integration tests for any new logic. | ||
| 4. **Testing** | ||
| Add unit or integration tests for any new logic. | ||
|
|
||
| 5. **Review Others’ PRs** | ||
| Help others by reviewing their PRs too! | ||
| 5. **Review Others’ PRs** | ||
| Help others by reviewing their PRs too! | ||
|
|
||
| --- | ||
| --- | ||
|
|
||
| ## 🙌 Thank You! | ||
| ## 🙌 Thank You! | ||
|
|
||
| We’re so glad you’re here. Your time and effort are deeply appreciated. Feel free to reach out via Issues or Discussions if you need any help. | ||
| We’re so glad you’re here. Your time and effort are deeply appreciated. Feel free to reach out via Issues or Discussions if you need any help. | ||
|
|
||
| **Happy Coding!** 💻🚀 | ||
| **Happy Coding!** 💻🚀 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { Link } from "react-router-dom"; | ||
|
|
||
| export default function Custom404() { | ||
| return ( | ||
| <section className="min-h-screen w-full flex items-center justify-center bg-gradient-to-br from-gray-50 to-blue-100 px-6"> | ||
| <div className="text-center"> | ||
| <h1 className="text-7xl md:text-8xl font-extrabold text-blue-600 mb-4"> | ||
| 404 | ||
| </h1> | ||
|
|
||
| <h2 className="text-2xl md:text-3xl font-bold text-gray-900 mb-4"> | ||
| Page Not Found | ||
| </h2> | ||
|
|
||
| <p className="text-gray-600 text-lg mb-8 max-w-md"> | ||
| The page you are looking for does not exist or has been moved. | ||
| </p> | ||
|
|
||
| <Link | ||
| to="/" | ||
| className="inline-block bg-blue-600 text-white px-8 py-4 rounded-lg font-semibold hover:bg-blue-700 transition-all transform hover:scale-105 shadow-lg" | ||
| > | ||
| Go Back Home | ||
| </Link> | ||
| </div> | ||
| </section> | ||
| ); | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.