-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudent.html
More file actions
186 lines (179 loc) · 6.8 KB
/
Copy pathstudent.html
File metadata and controls
186 lines (179 loc) · 6.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html><html lang="en"><head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Student Portal Dashboard</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
body { font-family: Arial, sans-serif; margin: 0; padding: 0; background: #f9f9f9; }
header, nav, section, footer { padding: 20px; }
header { background-color: #4f46e5; color: white; display: flex; justify-content: space-between; align-items: center; }
nav a { margin: 0 10px; color: white; text-decoration: none; }
.overview { display: flex; justify-content: space-around; margin: 20px 0; }
.card { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); width: 30%; }
table { width: 100%; border-collapse: collapse; margin: 20px 0; }
th, td { padding: 10px; border: 1px solid #ddd; text-align: left; }
.request-form { background: #eef2ff; padding: 20px; border-radius: 10px; margin: 20px 0; }
.request-form input, .request-form textarea { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #ccc; border-radius: 5px; }
.submit-btn {
background: linear-gradient(135deg, #6366f1, #4f46e5);
color: white;
padding: 10px 20px;
border: none;
border-radius: 25px;
cursor: pointer;
font-weight: bold;
transition: all 0.3s ease;
}
.submit-btn:hover {
background: linear-gradient(135deg, #4f46e5, #4338ca);
transform: scale(1.05);
box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}
.secondary-btn {
background: linear-gradient(135deg, #3b82f6, #6366f1);
color: white;
padding: 8px 16px;
border: none;
border-radius: 20px;
cursor: pointer;
font-weight: 500;
margin-top: 10px;
transition: all 0.3s ease;
}
.secondary-btn:hover {
background: linear-gradient(135deg, #2563eb, #4f46e5);
transform: scale(1.05);
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.analytics {
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
margin-bottom: 20px;
max-width: 600px;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body>
<header>
<div>EduCert</div>
<nav>
<a href="#">Dashboard</a>
<a href="#">Courses</a>
<a href="#">Certificates</a>
<a href="#">Profile</a>
</nav>
<div>
<button onclick="goToCertificatePage()" style="padding: 8px 15px; background: white; color: #4f46e5; border: none; border-radius: 5px;">Request Certificate</button>
<button onclick="logout()" style="padding: 8px 15px; background: #ef4444; color: white; border: none; border-radius: 5px; margin-left: 10px;">Logout</button>
</div>
</header> <section class="overview">
<div class="card">
<h3>Certificate Status</h3>
<p>You have 2 pending and 3 approved certificates.</p>
<button class="secondary-btn">View All</button>
</div>
<div class="card">
<h3>Recent Requests</h3>
<p>Last request submitted on 15 May 2023.</p>
<button class="secondary-btn">Request History</button>
</div>
<div class="card">
<h3>Notifications</h3>
<p>You have 3 unread notifications.</p>
<button class="secondary-btn">View All</button>
</div>
</section> <section>
<h2>Certificate Requests</h2>
<table>
<tr>
<th>Certificate Type</th>
<th>Purpose</th>
<th>Date</th>
<th>Status</th>
</tr>
<tr><td>Bonafide Certificate</td><td>College Purpose</td><td>15 May 2023</td><td>Pending</td></tr>
<tr><td>Bonafide Certificate</td><td>Bank Loan</td><td>10 May 2023</td><td>Approved</td></tr>
<tr><td>Bonafide Certificate</td><td>Scholarship</td><td>05 May 2023</td><td>Approved</td></tr>
<tr><td>Bonafide Certificate</td><td>Internship</td><td>01 May 2023</td><td>Approved</td></tr>
<tr><td>Bonafide Certificate</td><td>Visa Application</td><td>25 Apr 2023</td><td>Rejected</td></tr>
</table>
</section> <section class="request-form">
<h2>Request New Certificate</h2>
<input type="text" id="requestPurpose" placeholder="Purpose of Certificate (e.g., Scholarship)" />
<textarea id="requestDetails" placeholder="Additional Details"></textarea>
<button class="submit-btn" onclick="submitRequestAndRedirect()">Submit Request</button>
</section> <section class="analytics">
<h2>Certificate Request Analytics</h2>
<canvas id="overviewChart" width="400" height="200"></canvas>
</section> <section class="analytics">
<h2>Status-wise Certificate Analytics</h2>
<canvas id="statusChart" width="400" height="200"></canvas>
</section> <script>
function goToCertificatePage() {
window.location.href = "certificate.html";
}
function logout() {
localStorage.removeItem("rememberedUser");
window.location.href = "login.html";
}
function submitRequestAndRedirect() {
const purpose = document.getElementById('requestPurpose').value;
const details = document.getElementById('requestDetails').value;
const newRequest = {
student: localStorage.getItem("rememberedUser") || "Unknown",
purpose: purpose,
details: details,
date: new Date().toLocaleDateString(),
status: "Pending"
};
let requests = JSON.parse(localStorage.getItem("requests") || "[]");
requests.push(newRequest);
localStorage.setItem("requests", JSON.stringify(requests));
window.location.href = "adminportal.html";
}
const overviewCtx = document.getElementById('overviewChart').getContext('2d');
const overviewChart = new Chart(overviewCtx, {
type: 'bar',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
datasets: [{
label: 'Certificate Requests',
data: [2, 3, 1, 4, 5, 2],
backgroundColor: '#4f46e5'
}]
},
options: {
responsive: true,
scales: {
y: {
beginAtZero: true,
stepSize: 1
}
}
}
});
const statusCtx = document.getElementById('statusChart').getContext('2d');
const statusChart = new Chart(statusCtx, {
type: 'pie',
data: {
labels: ['Approved', 'Pending', 'Rejected'],
datasets: [{
data: [3, 1, 1],
backgroundColor: ['#10b981', '#facc15', '#ef4444']
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'bottom'
}
}
}
});
</script></body>
</html>