Skip to content
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

Added Feedback Form #363

Merged
merged 1 commit into from
Oct 28, 2024
Merged
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
45 changes: 45 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/react-fontawesome": "^0.2.2",
"@mui/material": "^5.15.19",
"axios": "^1.7.4",
"bootstrap": "^5.1.3",
Expand Down
63 changes: 36 additions & 27 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import Footer from "./components/shared/Footer";

import Home from "./pages/Home";
import About from "./pages/About";
import Help from "./pages/Help"
import Help from "./pages/Help";
import Feedback from "./pages/Feedback";

import ChanakyaAudio from "./pages/resources/ChanakyaAudio";
import ChanakyaBook from "./pages/resources/ChanakyaBook";
Expand All @@ -23,38 +24,38 @@ import Login from "./pages/auth/Login";
import SignUp from "./pages/auth/SignUp";
import ChanakyaGpt from "./pages/resources/ChanakyaGpt";
import "./App.css";
import AnimatedCursor from "react-animated-cursor"
import AnimatedCursor from "react-animated-cursor";

function App() {
const { progress, isDarkMode } = useContext(Context); // Assuming isDarkMode is provided in your context

useEffect(() => {
document.body.classList.toggle('dark', isDarkMode);
document.body.classList.toggle("dark", isDarkMode);
}, [isDarkMode]);

return (
<div className={`d-flex flex-column ${isDarkMode ? 'dark' : ''}`}>
<AnimatedCursor
innerSize={10}
outerSize={12}
color='111, 158, 111'
outerAlpha={0.8}
innerScale={1.0}
outerScale={5}
clickables={[
'a',
'input[type="text"]',
'input[type="email"]',
'input[type="number"]',
'input[type="submit"]',
'input[type="image"]',
'label[for]',
'select',
'textarea',
'button',
'.link'
]}
/>
<div className={`d-flex flex-column ${isDarkMode ? "dark" : ""}`}>
<AnimatedCursor
innerSize={10}
outerSize={12}
color="111, 158, 111"
outerAlpha={0.8}
innerScale={1.0}
outerScale={5}
clickables={[
"a",
'input[type="text"]',
'input[type="email"]',
'input[type="number"]',
'input[type="submit"]',
'input[type="image"]',
"label[for]",
"select",
"textarea",
"button",
".link",
]}
/>
<Router>
<Navbar />
<LoadingBar height={3} color="#f11946" progress={progress} />
Expand All @@ -63,16 +64,24 @@ function App() {
<Routes>
<Route exact path="/" element={<Home />} />
<Route exact path="/about" element={<About />} />
<Route path="/feedback" element={<Feedback />} />
<Route exact path="/help" element={<Help />} />
<Route exact path="/resources/audio" element={<ChanakyaAudio />} />
<Route exact path="/resources/book" element={<ChanakyaBook />} />
<Route exact path="/resources/news" element={<ChanakyaNews />} />
<Route exact path="/resources/quiz" element={<ChanakyaQuiz />} />
<Route exact path="/resources/video" element={<ChanakyaVideo />} />
<Route exact path="/resources/chanakyagpt" element={<ChanakyaGpt />} />
<Route
exact
path="/resources/chanakyagpt"
element={<ChanakyaGpt />}
/>

<Route exact path="/contributor" element={<Contributors />} />
<Route path="/contributor/details" element={<ContributorDetail />} />
<Route
path="/contributor/details"
element={<ContributorDetail />}
/>

{/* Authentication Pages */}
<Route exact path="/auth/login" element={<Login />} />
Expand Down
9 changes: 9 additions & 0 deletions src/components/shared/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ const Footer = () => {
<FaSignInAlt className="me-2" /> Login
</NavLink>
</li>
<li>
<NavLink
to="/Feedback"
className="text-decoration-none"
style={{ color: isDarkMode ? "white" : "black" }}
>
<FaInfoCircle className="me-2" /> Feedback
</NavLink>
</li>
</ul>
</div>

Expand Down
125 changes: 125 additions & 0 deletions src/css/Feedback.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
/* Container for feedback form */
.feedback-form-container {
background-color: #f5e6f6;
border: 5px solid rgb(178, 163, 123);
border-radius: 10px;
padding: 50px;
width: 600px; /* Slightly increased width for a spacious feel */
margin: 50px auto;
color: rgb(10, 10, 10);
text-align: center;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.7);
}

/* Form headings */
h2 {
margin-bottom: 30px; /* Increased spacing below heading */
font-size: 48px; /* Increased font size for the heading */
color: #f5f4ef;
}

/* Input fields styling */
.name,
.email,
.message {
margin-top: 30px; /* Increased top margin for space between inputs */
width: 100%;
padding: 15px; /* Increased padding for larger inputs */
background-color: #faf5f5;
border: 3px solid rgb(178, 163, 123);
border-radius: 5px;
color: rgb(21, 20, 20);
font-size: 22px; /* Slightly increased font size for input text */
box-sizing: border-box;
}

textarea {
height: 100px; /* Increased height of the textarea */
resize: none;
}

/* Star rating styling */
.stars {
margin-top: 30px; /* Ensure consistent spacing */
display: flex;
justify-content: center;
margin: 10px 0;
gap: 20px;
}

.star,
.star-filled {
font-size: 35px; /* Slightly larger stars for better visibility */
cursor: pointer;
transition: color 0.3s;
}

.star {
color: rgb(108, 106, 106);
}

.star-filled {
color: gold;
}

/* Submit button */
.post-button {
margin-top: 40px; /* More space between the last input and button */
background-color: #91918f;
color: #fdfafa;
border: 2px solid black;
padding: 15px 30px; /* Bigger button for easier clicking */
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}

.post-button:hover {
background-color: #d7dbdb;
color: black;
}

/* Pop-up overlay styling */
.popup-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
display: flex;
justify-content: center;
align-items: center;
}

.popup {
background-color: #e9ecd8;
padding: 28px;
border-radius: 10px;
text-align: center;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
color: black;
}

.popup h3 {
margin-bottom: 10px;
color: #0d0d0d;
}

.popup p {
margin-bottom: 20px;
color: #0f0e0e;
}

.close-popup-button {
background-color: #dcecad;
color: #2e2e2e;
border: 2px solid black;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
}

.close-popup-button:hover {
background-color: #e3e4e5;
}
Loading