-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
206 lines (181 loc) · 7.16 KB
/
index.html
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<title>Student Information System</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="resources\pictures\studentcap.png" id="picture" class="d-inline-block align-text-top">
<style>
#picture {
border-radius: 50%; width:75px; height:75px;
}
</style>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link " aria-current="page" href="#courses_grades_view" style=" font-size: 20px;">Courses & Grades</a>
</li>
<li class="nav-item">
<a class="nav-link " aria-current="page" href="#professors_view" style=" font-size: 20px;">Professors</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#notifications_view" style=" font-size: 20px;">Notifications</a>
</li>
<li class="nav-item">
<a class="nav-link " aria-current="page" href="#timetable_view" style=" font-size: 20px;">Timetable</a>
</li>
<li class="nav-item" style=" font-size: 20px;">
<a class="nav-link " href="#students_view">Colleagues</a>
</li>
<li class="nav-item" style=" font-size: 20px;">
<a class="nav-link " href="#spaces_view">Spaces</a>
</li>
</ul>
<!-- <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> -->
<img src="resources\pictures\userpic.png" id="user_picture" style="margin-right: 10px;border-radius: 50%; width:75px; height:75px;
" class="d-inline-block align-text-top">
<span style="font-size: 20px; margin-right:15px" id="user_full_name">Student Account</span>
<button class="btn btn-outline-success" type="" onclick="UserService.logout()">Logout</button>
</div>
</div>
</nav>
</div>
<style>
body {
background-image: url('resources/pictures/backgound2.jpg');
}
</style>
<main id="jqueryspapp" role="main">
<section id="courses_grades_view" data-load="courses_grades_view.html"></section>
<section id="students_view" data-load="students_view.html"></section>
<section id="notifications_view" data-load="notifications_view.html"></section>
<section id="professors_view" data-load="professors_view.html"></section>
<section id="timetable_view" data-load="timetable_view.html"></section>
<section id="spaces_view" data-load="spaces_view.html"></section>
</main>
<div class="container ">
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
<p class="col-md-4 mb-0 text-muted">© Bilal Durakovic, 2023</p>
<a href="/" class="col-md-4 d-flex align-items-center justify-content-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none">
<svg class="bi me-2" width="40" height="32"><use xlink:href="#bootstrap"/></svg>
</a>
<ul class="nav col-md-4 justify-content-end">
<li class="nav-item" style="color:black;"><a target="_blank" href="https://github.com/DurakovicB" class="nav-link px-2 text-muted">Github</a></li>
<!-- <li class="nav-item"><a href="#" class="nav-link px-2 text-muted">Features</a></li> -->
</ul>
</footer>
</div>
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<style>
#myBtn {
display: none; /* Hidden by default */
position: fixed; /* Fixed/sticky position */
bottom: 20px; /* Place the button at the bottom of the page */
right: 30px; /* Place the button 30px from the right */
z-index: 99; /* Make sure it does not overlap */
border: none; /* Remove borders */
outline: none; /* Remove outline */
background-color: red; /* Set a background color */
color: white; /* Text color */
cursor: pointer; /* Add a mouse pointer on hover */
padding: 15px; /* Some padding */
border-radius: 10px; /* Rounded corners */
font-size: 18px; /* Increase font size */
}
#myBtn:hover {
background-color: #555; /* Add a dark-grey background on hover */
}
</style>
<script src="js/jquery-3.6.0.min.js"></script>
<script src="js/jQuerySPApp.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/course-service.js"></script>
<script src="js/user-service.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>
<script>
$(document).ready(function() {
var app = $.jQuerySPApp({
defaultView: "courses_grades_view",
templateDir: "./views/",
});
function showView(view) {
const views = ['students_view', 'notifications_view', 'courses_grades_view', 'professors_view', 'timetable_view', 'spaces_view'];
for (let v of views) {
document.getElementById(v).style.display = v === view ? "inline" : "none";
}
}
function onReady(view) {
return function() {
showView(view);
};
}
app.route({
view: 'spaces_view',
onCreate: showView('spaces_view'),
onReady: onReady('spaces_view'),
});
app.route({
view: 'timetable_view',
onCreate: showView('timetable_view'),
onReady: onReady('timetable_view'),
});
app.route({
view: 'courses_grades_view',
onCreate: showView('courses_grades_view'),
onReady: onReady('courses_grades_view'),
});
app.route({
view: 'students_view',
load: 'students_view.html',
onCreate: showView('students_view'),
onReady: onReady('students_view'),
});
app.route({
view: 'notifications_view',
onCreate: showView('notifications_view'),
onReady: onReady('notifications_view'),
});
app.route({
view: 'professors_view',
onCreate: showView('professors_view'),
onReady: onReady('professors_view'),
});
app.run();
});
var token = localStorage.getItem("token");
if (token) {
CourseService.init();
UserService.fillName();
} else {
window.location.replace("login.html");
}
//Get the button:
mybutton = document.getElementById("myBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}
</script>
</html>