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

Letter to me #131

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
3 changes: 2 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ import Nominations from "./pages/Nominations/Nominations";
import LiveScoreboard from "./pages/LiveScoreboard/LiveScoreboard";
import Results from "./pages/Results/Results";
import ViewCertificate from "./pages/certifgen/ViewCertificate";

import LetterToMe from "./pages/LetterToMe/LetterToMe"
import SocietyForm from "./pages/SocReg/form";
// import SocietyLayout from "./pages/Societies/SocietyLayout";


function App() {
useEffect(() => {
Expand Down
11 changes: 11 additions & 0 deletions src/components/Layouts/NavLayout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";
import Navbar from "../Navbar/Navbar";

export default function Layout({ children }) {
return (
<div className="layout">
<Navbar />
<main>{children}</main>
</div>
);
}
279 changes: 150 additions & 129 deletions src/pages/LetterToMe/LetterToMe.css
Original file line number Diff line number Diff line change
@@ -1,195 +1,216 @@
.backgroundImage {
.letter-to-me-container {
display: flex;
flex-wrap: wrap; /* Allow columns to stack on smaller screens */
height: 95vh; /* Full viewport height */
width: 100%;
height: 100vh;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url("../../images/iitkgp.jpg");
overflow: hidden;
}

.left-column {
position: relative;
width: 48%;
background-image: url('../../images/iitkgp.jpg');
background-color: black;
background-size: cover;
background-position: center;
position: fixed;
background-repeat: no-repeat;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 20px;
}

.page-wrapper {
.overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
max-width: 1200px;
margin: 0 auto;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
}

.content {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 20px;
color: #f7f9f8;
}


.form-container {
background: #ebebeb;
padding: 40px;
border-radius: 16px;
box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.15);
width: 100%;
max-width: 500px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
font-family: 'Poppins', sans-serif;
color: #444;
.left-column h2 {
position: relative;
margin-top: 16px;
font-size: 2.7rem;
font-weight: 900;
margin-bottom: 28px;
text-align: center;
}


.form-container:hover {
transform: translateY(-5px);
box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.2);
.left-column h2 img {
position: absolute;
top: -40px;
left: -60px;
width: 100px;
height: 80px;
transform: rotate(340deg);
}


.form-container h1 {
text-align: center;
font-size: 28px;
margin-bottom: 30px;
font-weight: 600;
color: #2c3e50;
letter-spacing: 1px;
.left-column p {
font-size: 1.1rem;
margin: 10px 0;
line-height: 1.5;
}


.form-container label {
display: block;
font-size: 14px;
font-weight: 500;
margin-bottom: 8px;
color: #000000;
font-weight: 500;
.right-column {
width: 52%;
background-color: #1c272b;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 20px;
height: 100%; /* Ensure the form container takes up full height */
}

/* Inputs and textareas */
.form-container input,
.form-container textarea {
form {
display: flex;
flex-direction: column;
width: 100%;
padding: 12px 16px;
margin-bottom: 20px;
border: 1px solid #ddd;
border-radius: 8px;
font-size: 15px;
background: #f9f9f9;
color: #000000;
transition: border-color 0.3s ease, box-shadow 0.3s ease;
gap: 20px;
justify-content: center;
align-items: center;
padding: 0 60px;
height: 100vh; /* Make the form take up the full viewport height */
box-sizing: border-box; /* To ensure padding doesn’t affect the height */
}


.form-container input:focus,
.form-container textarea:focus {
border-color: #007bff;
box-shadow: 0px 4px 10px rgba(0, 123, 255, 0.1);
outline: none;
form input,
form textarea,
form button {
background-color: white;
width: 100%;
padding: 12px;
border: 1px solid white;
border-radius: 4px;
font-size: 1rem;
}


.form-container input::placeholder,
.form-container textarea::placeholder {
font-size: 14px;
color: #aaa;
.box1 {
width: 100%;
display: flex;
gap: 16px;
align-items: center;
}


.form-container textarea {
resize: none;
height: 120px;
#sendDate,
#rollNo {
width: 60%;
}

#message {
height: 220px;
}

.form-container button {
width: 100%;
padding: 12px;
background: linear-gradient(135deg, #007bff, #0056b3);
color: #ffffff;
font-size: 16px;
font-weight: 600;
border: none;
border-radius: 8px;
form button {
background-color: #68d128;
color: #fff;
font-weight: bold;
cursor: pointer;
transition: background 0.3s ease, transform 0.2s ease;
border: none;
transition: background-color 0.3s ease;
}


.form-container button:hover {
background: linear-gradient(135deg, #0056b3, #003d80);
form button:hover {
background-color: #4eda0d;
}


.form-container button:active {
transform: scale(0.98);
.error-message {
color: #ff4d4d;
font-size: 0.9rem;
}


.form-container button:disabled {
background: #f0eaea;
cursor: not-allowed;
.server-message {
color: #256b27;
font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 1024px) {
.letter-to-me-container {
height: auto; /* Allow height to adjust */
}

.form-container button.loading {
position: relative;
color: transparent;
cursor: wait;
}
.left-column,
.right-column {
width: 100%; /* Full width for each column */
height: auto; /* Adjust height automatically */
}

.form-container button.loading:after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 20px;
height: 20px;
border: 3px solid #ffffff;
border-top: 3px solid #0056b3;
border-radius: 50%;
animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
0% {
transform: translate(-50%, -50%) rotate(0deg);
/* Hide left column on smaller screens */
.left-column {
display: none;
}
100% {
transform: translate(-50%, -50%) rotate(360deg);

form {
padding: 0 40px; /* Adjust padding for medium screens */
height: 100vh; /* Ensure form takes up full height */
}
}

#message {
height: 200px; /* Adjust text area height */
}
}

@media (max-width: 768px) {
.form-container {
padding: 30px;
.letter-to-me-container {
flex-direction: column; /* Stack columns vertically */
}

/* Hide left column on smaller screens */
.left-column {
display: none;
}

.form-container h1 {
font-size: 24px;
.right-column {
width: 100%; /* Full width for the form */
}

.form-container input,
.form-container textarea {
font-size: 14px;
form {
padding: 0 20px; /* Reduce padding for smaller screens */
height: 100vh; /* Ensure form takes up full height */
}

.form-container button {
font-size: 14px;
#message {
height: 180px; /* Adjust text area height */
}
}

@media (max-width: 480px) {
.form-container {
padding: 20px;
.left-column {
display: none; /* Completely hide the left column */
}

.right-column {
width: 100%; /* Full width for the form */
}

.form-container h1 {
font-size: 20px;
form input,
form textarea,
form button {
font-size: 0.9rem; /* Adjust input sizes */
padding: 10px; /* Reduce padding for smaller screens */
}

.form-container input,
.form-container textarea {
font-size: 13px;
.box1 {
flex-direction: column; /* Stack inputs vertically */
gap: 10px;
width: 100%;
}

.form-container button {
font-size: 13px;
padding: 10px;
#sendDate,
#rollNo {
width: 100%; /* Make inputs full-width on small screens */
}
}
Loading