From 799ae9551a914c300564a22b384e17cde3911e7b Mon Sep 17 00:00:00 2001 From: shreyas bp Date: Sun, 24 Aug 2025 22:58:38 +0530 Subject: [PATCH 1/2] Added Incident Response Plan page with routing and navbar link --- .idea/.gitignore | 3 ++ .idea/Good_First_Issue_Web_App.iml | 8 +++++ .idea/inspectionProfiles/Project_Default.xml | 21 +++++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 ++++ .idea/modules.xml | 8 +++++ .idea/vcs.xml | 6 ++++ frontend/src/App.js | 4 +++ frontend/src/pages/Navbar.js | 2 ++ frontend/src/pages/incident-response.html | 29 ++++++++++++++++++ frontend/src/pages/incidentResponse.js | 30 +++++++++++++++++++ 10 files changed, 117 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/Good_First_Issue_Web_App.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 frontend/src/pages/incident-response.html create mode 100644 frontend/src/pages/incidentResponse.js diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/Good_First_Issue_Web_App.iml b/.idea/Good_First_Issue_Web_App.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/.idea/Good_First_Issue_Web_App.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..4dfb542 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,21 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b29f58e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/App.js b/frontend/src/App.js index 4f2ede4..0e476ea 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -1,6 +1,10 @@ import "./App.css"; import {Hero, About, Repositories, Form, Layout} from './pages' import { Route, RouterProvider, createBrowserRouter, createRoutesFromElements } from 'react-router-dom' +import IncidentResponse from "./pages/IncidentResponse"; + +// inside or equivalent +} /> const router = createBrowserRouter( createRoutesFromElements( diff --git a/frontend/src/pages/Navbar.js b/frontend/src/pages/Navbar.js index aa535c8..051a94e 100644 --- a/frontend/src/pages/Navbar.js +++ b/frontend/src/pages/Navbar.js @@ -27,6 +27,8 @@ function Navbar() { Form + Incident Response Plan +
    diff --git a/frontend/src/pages/incident-response.html b/frontend/src/pages/incident-response.html new file mode 100644 index 0000000..30d367f --- /dev/null +++ b/frontend/src/pages/incident-response.html @@ -0,0 +1,29 @@ + + + + + + Incident Response Plan + + + + + +
    +

    Incident Response Plan

    +

    Creating an incident response plan is crucial for organizations for several reasons:

    +
      +
    • Minimize Impact and Damage: React quickly and effectively to security incidents.
    • +
    • Clear Roles and Responsibilities: Everyone knows their role during a crisis.
    • +
    • Enhance Communication: Ensure accurate and consistent information is shared.
    • +
    • Compliance: Meet regulatory and legal requirements.
    • +
    • Reputation: Preserve trust with customers and stakeholders.
    • +
    • Cost Savings: Prevent unnecessary expenses due to poor response.
    • +
    • Continuous Improvement: Learn and adapt after incidents.
    • +
    +
    + + diff --git a/frontend/src/pages/incidentResponse.js b/frontend/src/pages/incidentResponse.js new file mode 100644 index 0000000..a83f671 --- /dev/null +++ b/frontend/src/pages/incidentResponse.js @@ -0,0 +1,30 @@ +import React from "react"; + +const IncidentResponse = () => { + return ( +
    +

    Incident Response Plan

    +

    Creating an incident response plan is crucial for organizations for several reasons:

    +
      +
    • Minimize Impact and Damage: React quickly and effectively to limit damage and shorten recovery time.
    • +
    • Clear Roles and Responsibilities: Defines responsibilities for the response team, avoiding confusion.
    • +
    • Enhance Communication: Provides internal and external communication protocols.
    • +
    • Legal and Regulatory Compliance: Ensures compliance with laws and avoids fines.
    • +
    • Preserve Organizational Reputation: A transparent and fast response builds trust.
    • +
    • Reduction in Downtime: Predetermined steps reduce downtime and business impact.
    • +
    • Cost Savings: Prevents unnecessary expenses from misinformation or chaos.
    • +
    • Continuous Improvement: Post-incident reviews refine procedures.
    • +
    • Stakeholder Assurance: Shows partners and customers the org is prepared.
    • +
    • Enhanced Security Posture: Regular reviews help identify and fix gaps.
    • +
    +

    + + In essence, an incident response plan is like an insurance policy for cybersecurity incidents. + You hope never to use it, but when the need arises, you’ll be glad you have it. + +

    +
    + ); +}; + +export default IncidentResponse; From c9656b5e726420d8c45c4c11af05f6ca4d2be2de Mon Sep 17 00:00:00 2001 From: shreyas bp Date: Thu, 28 Aug 2025 22:24:18 +0530 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=20Added=20dark=20mode=20toggle=20?= =?UTF-8?q?button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/misc.xml | 7 ++++++ .idea/vcs.xml | 1 + Good_First_Issue_Web_App | 1 + frontend/src/App.css | 28 +++++++++++++++++++++ frontend/src/pages/Layout.js | 47 ++++++++++++++++++++++++++++++++++++ 5 files changed, 84 insertions(+) create mode 100644 .idea/misc.xml create mode 160000 Good_First_Issue_Web_App diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..1d3ce46 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 35eb1dd..f03a665 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/Good_First_Issue_Web_App b/Good_First_Issue_Web_App new file mode 160000 index 0000000..7e25890 --- /dev/null +++ b/Good_First_Issue_Web_App @@ -0,0 +1 @@ +Subproject commit 7e25890e80c511450ba39769acbff21be4a33293 diff --git a/frontend/src/App.css b/frontend/src/App.css index 74b5e05..8ca269b 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -12,6 +12,34 @@ animation: App-logo-spin infinite 20s linear; } } +/* Light Mode (default) */ +body { + background-color: #ffffff; + color: #000000; + transition: background-color 0.3s, color 0.3s; +} + +/* Dark Mode */ +body.dark-mode { + background-color: #121212; + color: #ffffff; +} + +/* Toggle Button */ +.dark-toggle-btn { + background: transparent; + color: inherit; + border: 1px solid #888; + padding: 6px 12px; + border-radius: 6px; + cursor: pointer; + margin-left: 15px; +} + +.dark-toggle-btn:hover { + background: rgba(255, 255, 255, 0.1); +} + .App-header { background-color: #282c34; diff --git a/frontend/src/pages/Layout.js b/frontend/src/pages/Layout.js index 963149b..ad0ac00 100644 --- a/frontend/src/pages/Layout.js +++ b/frontend/src/pages/Layout.js @@ -5,6 +5,53 @@ import {Outlet} from 'react-router-dom' function Layout() { return ( <> + import React, { useState, useEffect } from "react"; +import { Outlet } from "react-router-dom"; +import "./Layout.css"; + +export default function Layout() { + const [darkMode, setDarkMode] = useState(false); + + // Load theme from localStorage on mount + useEffect(() => { + const savedTheme = localStorage.getItem("theme"); + if (savedTheme === "dark") { + setDarkMode(true); + document.body.classList.add("dark-mode"); + } + }, []); + + const toggleTheme = () => { + if (darkMode) { + document.body.classList.remove("dark-mode"); + localStorage.setItem("theme", "light"); + setDarkMode(false); + } else { + document.body.classList.add("dark-mode"); + localStorage.setItem("theme", "dark"); + setDarkMode(true); + } + }; + + return ( +
    +
    +

    Good First Issue Web App

    + +
    + +
    + +
    +
    + ); +} +