Skip to content

Commit 32f2bdd

Browse files
committed
chore:updated file names, folder structures and the landing page UI
1 parent 71d39de commit 32f2bdd

File tree

11 files changed

+259
-84
lines changed

11 files changed

+259
-84
lines changed

src/assets/black_background.webp

110 KB
Binary file not shown.

src/components/Auth/Auth.jsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ import React, { useState, useEffect } from "react";
22
import { IoCloseOutline } from "react-icons/io5";
33
import LoginForm from "./LoginForm";
44
import RegisterForm from "./RegisterForm";
5-
import { useDispatch, useSelector } from "react-redux";
5+
import { useDispatch } from "react-redux";
66
import { resetStatus } from "../../redux/slice/auth/loginSlice";
77
import { resetRegisterStatus } from "../../redux/slice/auth/registerSlice";
88

99
const AuthenticationModal = ({ openModal, closeModal }) => {
1010
const dispatch = useDispatch();
1111
const [modalHandler, setModalHandler] = useState(false);
1212
const [currentPage, setCurrentPage] = useState("login");
13-
const loginStatus = useSelector((state) => state.userLogin?.status);
1413

1514
const handleModeChange = (mode) => {
1615
setCurrentPage(mode);

src/components/Auth/RegisterForm.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const RegisterForm = ({ handleModeChange }) => {
3232
const registerData = {
3333
first_name: values.first_name,
3434
last_name: values.last_name,
35+
school_belong: values.selected_school,
3536
username: values.register_username,
3637
password: values.register_password,
3738
};

src/components/Auth/updateInfoForm.jsx

+16
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,22 @@ const UpdateInfoForm = ({ userId, closeModal }) => {
103103
</p>
104104
)}
105105
</div>
106+
107+
<div className="mb-5 w-full">
108+
<TextField
109+
disabled
110+
label="School Belong To"
111+
variant="outlined"
112+
name="school_belong"
113+
className="w-full"
114+
defaultValue={userInfo.school_belong}
115+
inputProps={{
116+
style: {
117+
height: "14px",
118+
},
119+
}}
120+
/>
121+
</div>
106122
{complete === "loading" ? (
107123
<>
108124
<Button

src/components/GetStarted.jsx src/components/FormatSession/SPITICFormat.jsx

+37-21
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ import { TextField } from "@mui/material";
88
import { useForm } from "react-hook-form";
99
import FormControl from "@mui/material/FormControl";
1010
import MenuItem from "@mui/material/MenuItem";
11-
import TemplateOne from "./../assets/certificate-sample/two_signature.webp";
12-
import TemplateTwo from "./../assets/certificate-sample/three_signature.webp";
13-
import TemplateThree from "./../assets/certificate-sample/four_signature.webp";
14-
import ImageIcon from "./../assets/image_icon.webp";
11+
import TemplateOne from "./../../assets/certificate-sample/two_signature.webp";
12+
import TemplateTwo from "./../../assets/certificate-sample/three_signature.webp";
13+
import TemplateThree from "./../../assets/certificate-sample/four_signature.webp";
14+
import ImageIcon from "./../../assets/image_icon.webp";
1515
import CircularProgress from "@mui/material/CircularProgress";
1616
import { useDispatch, useSelector } from "react-redux";
17-
import { createSession } from "../redux/slice/session/createSession";
18-
import { getUserDatafromToken } from "../utils/extractJWT";
17+
import { createSession } from "../../redux/slice/session/createSession";
18+
import { getUserDatafromToken } from "../../utils/extractJWT";
1919

20-
const GetStarted = ({ openModal, closeModal }) => {
20+
const SPITICFormat = ({ openModal, closeModal }) => {
2121
const dispatch = useDispatch();
2222
const SessionStatus = useSelector((state) => state.createSession?.status);
2323
const [complete, setComplete] = useState("idle");
@@ -48,7 +48,7 @@ const GetStarted = ({ openModal, closeModal }) => {
4848
section: values.section,
4949
quarter: values.quarter,
5050
dateToPresent: values.date_to_present,
51-
schoolName: values.school_name,
51+
designationPlace: values.designation_place,
5252
signatoryName1:
5353
watch("signatory_name1") === "" ||
5454
watch("signatory_name1") === undefined
@@ -212,7 +212,7 @@ const GetStarted = ({ openModal, closeModal }) => {
212212
<div className="flex flex-col w-full">
213213
<section className="flex flex-wrap gap-2 w-full h-full justify-center">
214214
<button
215-
className="relative bg-[#ED6559] w-[48%] h-[170px] flex flex-col justify-end cursor-pointer rounded-[10px] p-2"
215+
className="relative bg-[#ED6559] w-[48%] h-[170px] flex flex-col justify-end cursor-pointer rounded-[10px] p-2 button-9"
216216
onClick={() => {
217217
pathHandler("path2");
218218
setModalName("TEMPLATE FORMAT");
@@ -225,7 +225,7 @@ const GetStarted = ({ openModal, closeModal }) => {
225225
</p>
226226
</button>
227227
<button
228-
className="relative bg-[#5AC648] w-[48%] h-[170px] flex flex-col justify-end cursor-pointer rounded-[10px] p-2"
228+
className="relative bg-[#5AC648] w-[48%] h-[170px] flex flex-col justify-end cursor-pointer rounded-[10px] p-2 button-9"
229229
// onClick={() => {
230230
// // pathHandler("path2");
231231
// // setModalName("TEMPLATE FORMAT");
@@ -238,7 +238,7 @@ const GetStarted = ({ openModal, closeModal }) => {
238238
</p>
239239
</button>
240240
<button
241-
className="relative bg-[#a057ff] w-[48%] h-[170px] flex flex-col justify-end cursor-pointer rounded-[10px] p-2"
241+
className="relative bg-[#a057ff] w-[48%] h-[170px] flex flex-col justify-end cursor-pointer rounded-[10px] p-2 button-9"
242242
// onClick={() => {
243243
// // pathHandler("path2");
244244
// // setModalName("TEMPLATE FORMAT");
@@ -251,7 +251,7 @@ const GetStarted = ({ openModal, closeModal }) => {
251251
</p>
252252
</button>
253253
<button
254-
className="relative bg-[#F5D45E] w-[48%] h-[170px] flex flex-col justify-end cursor-pointer rounded-[10px] p-2"
254+
className="relative bg-[#F5D45E] w-[48%] h-[170px] flex flex-col justify-end cursor-pointer rounded-[10px] p-2 button-9"
255255
// onClick={() => {
256256
// // pathHandler("path2");
257257
// // setModalName("TEMPLATE FORMAT");
@@ -332,7 +332,7 @@ const GetStarted = ({ openModal, closeModal }) => {
332332
FOUR SIGNATURE
333333
</p>
334334
</div>
335-
<div className="flex flex-row justify-end mt-2 mb-[-1rem]">
335+
<div className="flex flex-row justify-end mt-2 mb-[-1rem] z-10">
336336
<button
337337
className="py-2 bg-[#F5D45E] w-[150px] text-white font-bold rounded-md"
338338
type="submit"
@@ -572,13 +572,29 @@ const GetStarted = ({ openModal, closeModal }) => {
572572
3rd Quarter
573573
</MenuItem>
574574
<MenuItem
575-
value="2th Quarter"
575+
value="4th Quarter"
576576
onClick={() => {
577577
setQuarter(false);
578578
}}
579579
>
580580
4th Quarter
581581
</MenuItem>
582+
<MenuItem
583+
value="1st Semester"
584+
onClick={() => {
585+
setQuarter(false);
586+
}}
587+
>
588+
1st Semester
589+
</MenuItem>
590+
<MenuItem
591+
value="2nd Semester"
592+
onClick={() => {
593+
setQuarter(false);
594+
}}
595+
>
596+
2nd Semester
597+
</MenuItem>
582598
</TextField>
583599
{errors.quarter && (
584600
<p className="ml-1 mt-1 text-[13px] text-red-500 mb-[-1.5rem]">
@@ -616,23 +632,23 @@ const GetStarted = ({ openModal, closeModal }) => {
616632
</div>
617633
<div className="mb-3 w-full">
618634
<TextField
619-
label="School Name"
635+
label="Designating place for the award ceremony"
620636
variant="outlined"
621-
name="school_name"
637+
name="designation_place"
622638
className="w-full"
623-
error={errors.school_name ? true : false}
639+
error={errors.designation_place ? true : false}
624640
inputProps={{
625641
style: {
626642
height: "14px",
627643
},
628644
}}
629-
{...register("school_name", {
645+
{...register("designation_place", {
630646
required: "This is required.",
631647
})}
632648
/>
633-
{errors.school_name && (
649+
{errors.designation_place && (
634650
<p className="ml-1 mt-1 text-[13px] text-red-500 mb-[-0.2rem]">
635-
{errors.school_name.message}
651+
{errors.designation_place.message}
636652
</p>
637653
)}
638654
</div>
@@ -1514,4 +1530,4 @@ const GetStarted = ({ openModal, closeModal }) => {
15141530
);
15151531
};
15161532

1517-
export default GetStarted;
1533+
export default SPITICFormat;

src/components/Navigation/AuthenticateUser.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import { Route, Routes } from "react-router";
33
import Landing from "../../screens/Landing";
44
import Option1 from "../../screens/AcademicExcellence/Option1";
5-
import AcademicExcellence from "../../templates/AcademicExcellence";
5+
import SPITICTemplate from "../../templates/AcademicExcellence/SPITICTemplate";
66
import NotFound from "../../screens/NotFound";
77
const AuthenticateUser = () => {
88
return (
@@ -13,7 +13,7 @@ const AuthenticateUser = () => {
1313
<Route path="*" element={<NotFound />} />
1414
<Route
1515
path="/generate-certificate/acadmic-excellence/"
16-
element={<AcademicExcellence />}
16+
element={<SPITICTemplate />}
1717
/>
1818
</Routes>
1919
</>

src/index.css

+139-13
Original file line numberDiff line numberDiff line change
@@ -111,30 +111,156 @@ html::-webkit-scrollbar-thumb:hover {
111111
background-color: #c4c4c4;
112112
}
113113

114-
button {
114+
.shadow-text {
115+
text-shadow: 2px 2px 4px rgba(0, 76, 198, 0.425); /* Horizontal offset, Vertical offset, Blur radius, Color */
116+
}
117+
118+
/* CSS */
119+
.button-9 {
120+
appearance: button;
121+
backface-visibility: hidden;
115122
cursor: pointer;
123+
line-height: 1.15;
124+
outline: none;
125+
overflow: hidden;
116126
position: relative;
117-
transition: 0.2s;
127+
text-align: center;
128+
text-transform: none;
129+
transform: translateZ(0);
130+
transition: all 0.2s, box-shadow 0.08s ease-in;
131+
user-select: none;
132+
-webkit-user-select: none;
133+
touch-action: manipulation;
134+
}
135+
136+
.button-9:disabled {
137+
cursor: default;
138+
}
139+
140+
.button-9:focus {
141+
box-shadow: rgba(50, 50, 93, 0.1) 0 0 0 1px inset,
142+
rgba(50, 50, 93, 0.2) 0 6px 15px 0, rgba(0, 0, 0, 0.1) 0 2px 2px 0,
143+
rgba(50, 151, 211, 0.3) 0 0 0 4px;
144+
}
145+
146+
/* CSS */
147+
.button-52 {
148+
font-size: 16px;
149+
font-weight: 200;
150+
letter-spacing: 1px;
151+
padding: 13px 20px 13px;
152+
outline: 0;
153+
border: 1px solid black;
154+
cursor: pointer;
155+
position: relative;
156+
background-color: rgba(0, 0, 0, 0);
157+
user-select: none;
158+
-webkit-user-select: none;
159+
touch-action: manipulation;
118160
}
119161

120-
button::before {
162+
.button-52:after {
121163
content: "";
122-
height: 3px;
123-
width: 0;
124-
left: 0;
125-
bottom: 0;
164+
background-color: #ffe54c;
165+
width: 100%;
166+
z-index: -1;
126167
position: absolute;
127-
transition: 0.4s;
168+
height: 100%;
169+
top: 7px;
170+
left: 7px;
171+
transition: 0.2s;
172+
}
173+
174+
.button-52:hover:after {
175+
top: 0px;
176+
left: 0px;
128177
}
129178

130-
button:hover::before {
179+
@media (min-width: 768px) {
180+
.button-52 {
181+
padding: 13px 50px 13px;
182+
}
183+
}
184+
185+
/* CSS */
186+
.button-53 {
187+
border: 0 solid #e5e7eb;
188+
box-sizing: border-box;
189+
color: #000000;
190+
display: flex;
191+
font-family: ui-sans-serif, system-ui, -apple-system, system-ui, "Segoe UI",
192+
Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
193+
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
194+
font-size: 1rem;
195+
font-weight: 700;
196+
justify-content: center;
197+
line-height: 1.75rem;
198+
padding: 0.75rem 1.65rem;
199+
position: relative;
200+
text-align: center;
201+
text-decoration: none #000000 solid;
202+
text-decoration-thickness: auto;
131203
width: 100%;
204+
max-width: 460px;
205+
position: relative;
206+
cursor: pointer;
207+
transform: rotate(-2deg);
208+
user-select: none;
209+
-webkit-user-select: none;
210+
touch-action: manipulation;
132211
}
133212

134-
button:active {
135-
background-color: rgba(255, 255, 255, 0.1);
213+
.button-53:focus {
214+
outline: 0;
136215
}
137216

138-
.shadow-text {
139-
text-shadow: 2px 2px 4px rgba(0, 76, 198, 0.425); /* Horizontal offset, Vertical offset, Blur radius, Color */
217+
.button-53:after {
218+
content: "";
219+
position: absolute;
220+
border: 1px solid #000000;
221+
bottom: 4px;
222+
left: 4px;
223+
width: calc(100% - 1px);
224+
height: calc(100% - 1px);
225+
}
226+
227+
.button-53:hover:after {
228+
bottom: 2px;
229+
left: 2px;
230+
}
231+
232+
@media (min-width: 768px) {
233+
.button-53 {
234+
padding: 0.75rem 3rem;
235+
font-size: 1.25rem;
236+
}
237+
}
238+
239+
.waviy {
240+
position: relative;
241+
}
242+
243+
.waviy span {
244+
position: relative;
245+
display: inline-block;
246+
animation: flip 4s infinite, glow 6s infinite; /* Add glow animation */
247+
248+
animation-delay: calc(0.2 * var(--i));
249+
}
250+
251+
@keyframes flip {
252+
0%,
253+
80% {
254+
transform: rotateY(360deg);
255+
}
256+
}
257+
258+
@keyframes glow {
259+
0%,
260+
100% {
261+
text-shadow: 0 0 5px #fb7878, 0 0 5px #fb7878, 0 0 5px #fb7878; /* Adjust the colors and size as needed */
262+
}
263+
50% {
264+
text-shadow: none;
265+
}
140266
}

src/redux/slice/session/createSession.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const createSession = createAsyncThunk(
1414
formData.append("section", data.section);
1515
formData.append("quarter", data.quarter);
1616
formData.append("dateToPresent", data.dateToPresent);
17-
formData.append("schoolName", data.schoolName);
17+
formData.append("designationPlace", data.designationPlace);
1818
formData.append("signatoryName1", data.signatoryName1);
1919
formData.append("signatoryPosition1", data.signatoryPosition1);
2020
formData.append("signatoryName2", data.signatoryName2);

0 commit comments

Comments
 (0)