Bug 32 CSS slowing things down

Solution taken was to remove font-awesome from the header and replace everything and use bootstrap with performs better than font-awesome as said by
https://downtimemonkey.com/blog/how-we-boosted-page-load-speed.php
font awesome is slow
Refactor-Moyo
MOYO NKOSANA THABO 2022-12-19 17:24:33 +08:00
parent 1b31229fb2
commit b551f6269e
6 changed files with 45 additions and 47 deletions

View File

@ -280,7 +280,7 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St
$id = $row['Lab_Report_ID']; $id = $row['Lab_Report_ID'];
if( $c_date < $deadline) if( $c_date < $deadline)
{ {
$submittedx="<a href='~\..\SubmitLab.php?id=$id&url=$url' class='btn-sm btn-default'><i class='fa fa-check-circle'></i> Re-Submit </a>"; $submittedx="<a href='~\..\SubmitLab.php?id=$id&url=$url' class='btn-sm btn-default'><i class='bi bi-check-circle-fill'></i> Re-Submit </a>";
} }
$full_link = "<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>"; $full_link = "<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";
@ -298,7 +298,7 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St
echo " <k href='#'> <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'> echo " <k href='#'> <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
$title <br> <span style='font-size:8pt'> $ins</span> $title <br> <span style='font-size:8pt'> $ins</span>
<br> <span style='font-size:8pt'>Posted : $posted Deadline : $deadline ($marks Marks) &nbsp; &nbsp; $submittedx&nbsp; <span class='btn-sm btn-success' style='margin-left:50px;'><i class='fa fa-Edit-circle'></i> Submitted </span> <br> <span style='font-size:8pt'>Posted : $posted Deadline : $deadline ($marks Marks) &nbsp; &nbsp; $submittedx&nbsp; <span class='btn-sm btn-success' style='margin-left:50px;'><i class='bi bi-check-lg'></i> Submitted </span>
<br> Submitted files: "; <br> Submitted files: ";
@ -426,7 +426,7 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
} }
if($status=='Remarking') if($status=='Remarking')
{ {
$remarking="<span style='color:orange'><i class='fa fa-info-circle'></i> Remarking Request sent </span> <br> Remarking Reason:<i>$remarking_reason </i> <br>"; $remarking="<span style='color:orange'><i class='bi bi-info-circle-fill'></i> Remarking Request sent </span> <br> Remarking Reason:<i>$remarking_reason </i> <br>";
} }

View File

@ -1,36 +1,18 @@
<?php <?php
include 'NoDirectPhpAcess.php'; include 'NoDirectPhpAcess.php';
require 'Header.php';
?> ?>
<?php <?php
$page='Courses'; $page='Courses';
include 'Header.php';
$user_d = $_SESSION['user_id']; $user_d = $_SESSION['user_id'];
if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA") if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA")
{ {
?> ?>
<!-- FOR LECTURER-->
<div class="row" style="width:80%;margin:auto; text-align:left;">
<script src="./css/jquery-1.11.1.min.js"></script>
<script src="./css/jquery-ui.min.js"></script>
<link rel="stylesheet" href="./css/jquery-ui.css" />
<script> <script>
function extend_deadline(id) { function extend_deadline(id) {
var dropstudents=$("#dropstudents").html(); var dropstudents=$("#dropstudents").html();
@ -441,7 +423,7 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'"
if(mysqli_num_rows($result)==0) if(mysqli_num_rows($result)==0)
{ {
echo "<br> <i class='fa fa-info-circle'></i> No Course joining request so far for all your courses <hr>"; echo "<br> <i class='bi bi-info-circle-fill'></i> No Course joining request so far for all your courses <hr>";
} else { while($row = mysqli_fetch_assoc($result)) { } else { while($row = mysqli_fetch_assoc($result)) {
$id=$row['ID']; $id=$row['ID'];
@ -599,7 +581,7 @@ if( $_SESSION['user_type']=="Student")
$msg2="Join Course"; $msg2="Join Course";
if($v>0) if($v>0)
{ {
$msg="<i class='fa fa-exclamation-circle'></i> Lecturer verification required"; $msg="<i class='bi bi-exclamation-circle-fill'></i> Lecturer verification required";
$msg2="Send Joining Request"; $msg2="Send Joining Request";
} }
@ -622,7 +604,7 @@ INNER JOIN course_students_table on course_students_table.Course_ID=courses_tabl
if(mysqli_num_rows($result)==0) if(mysqli_num_rows($result)==0)
{ {
echo "<i class='fa fa-exclamation-circle'></i> You are not Enrolled in any Course"; echo "<i class='bi bi-exclamation-circle-fill'></i> You are not Enrolled in any Course";
} else { } else {
while($row = mysqli_fetch_assoc($result)) { while($row = mysqli_fetch_assoc($result)) {
$name=$row['Course_Name']; $name=$row['Course_Name'];
@ -637,7 +619,7 @@ INNER JOIN course_students_table on course_students_table.Course_ID=courses_tabl
if($Status=="Joined") if($Status=="Joined")
{ {
echo "<a href='~\..\Course.php?url=$url'> <div class='btn btn-default' style='word-wrap:break-word'> echo "<a href='~\..\Course.php?url=$url'> <div class='btn btn-default' style='word-wrap:break-word'>
($code) - $name <br>($url) &nbsp;&nbsp;&nbsp; <i class='fa fa-check-circle'></i> $Status &nbsp;&nbsp;&nbsp;&nbsp; <a href='~\..\Course.php?url=$url' class='btn-sm btn-primary'> Open</a> ($code) - $name <br>($url) &nbsp;&nbsp;&nbsp; <i class='bi bi-check-circle-fill'></i> $Status &nbsp;&nbsp;&nbsp;&nbsp; <a href='~\..\Course.php?url=$url' class='btn-sm btn-primary'> Open</a>
<br> <span style='font-size:8pt'>Faculty : $faculty Year : $academic Lecturer :$lecturer </span></div></a> <br> <span style='font-size:8pt'>Faculty : $faculty Year : $academic Lecturer :$lecturer </span></div></a>
"; ";
} }

View File

@ -20,15 +20,14 @@ if (mysqli_connect_errno()) {
<head> <head>
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="./font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<!-- *this css file can be used across all the websites
and any new css class can be added there.
* The reason is to make the css code reusable.
* the css file is used by submissions.php
-->
<link href = "./css/main.css" rel = "stylesheet" type = "text/css" />
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href = "./css/main.css" rel = "stylesheet" type = "text/css" />
<script src="./css/jquery-1.11.1.min.js"></script>
<script src="./css/jquery-ui.min.js"></script
>
<link rel="stylesheet" href="./css/jquery-ui.css"/>
<script src="./css/jquery.min.js" type="text/javascript"></script> <script src="./css/jquery.min.js" type="text/javascript"></script>
<script src="./css/bootsrap.min.js" type="text/javascript"></script> <script src="./css/bootsrap.min.js" type="text/javascript"></script>
<script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script> <script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script>
@ -37,8 +36,10 @@ if (mysqli_connect_errno()) {
<body> <body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" style="padding-left:150px;padding-right:150px;margin:auto;"> <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="~\..\index.php"> <img src="logo.png" style="width:30px;height:30px;"> LRR </a> <a class="navbar-brand" href="#">
<label>LRR</label>
<img src="logo.png" class = "navlogoimage"style="width:30px;height:30px; padding-left: 6px" alt="LRR Logo"> </a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
@ -53,7 +54,7 @@ if (mysqli_connect_errno()) {
<?php <?php
if (isset($_SESSION["user_fullname"])) { if (isset($_SESSION["user_fullname"])) {
echo " <a class='nav-link' href='~\..\Courses.php'><i class='fa fa-book'></i> Courses <span class='sr-only'>(current)</span></a>"; echo " <a class='nav-link' href='~\..\Courses.php'><i class='bi bi-book-fill'></i> Courses <span class='sr-only'>(current)</span></a>";
?> ?>
</li> </li>
</ul> </ul>
@ -70,13 +71,13 @@ if (mysqli_connect_errno()) {
<?php <?php
if ($_SESSION['user_type'] == "Lecturer") { if ($_SESSION['user_type'] == "Lecturer") {
echo "&nbsp;&nbsp;&nbsp; <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i> &nbsp;<a style='color:#fff !important' href=\"~\..\Admin.php\" id=\"admin_tab\">Admin </a>"; echo "&nbsp;&nbsp;&nbsp; <i class=\"bi bi-gear-fill\" style=\"color:#fff;\"> </i> &nbsp;<a style='color:#fff !important' href=\"~\..\Admin.php\" id=\"admin_tab\">Admin </a>";
} }
?> ?>
&nbsp;&nbsp;&nbsp; <i class="fa fa-user" style="color:#fff;"> </i> &nbsp;&nbsp;&nbsp; <i class="bi bi-person-fill" style="color:#fff;"> </i>
&nbsp;<a href="#" style='color:#fff !important' onclick="updatePass(<?php echo $_SESSION['user_id']; ?>)">Update password</a> &nbsp;<a href="#" style='color:#fff !important' onclick="updatePass(<?php echo $_SESSION['user_id']; ?>)">Update password</a>
&nbsp;&nbsp;&nbsp; <i class="fa fa-lock" style="color:#fff;"> </i> &nbsp;<a style='color:#fff !important' href="~\..\logout.php">Logout </a> &nbsp;&nbsp;&nbsp; <i class="bi bi-lock-fill" style="color:#fff;"> </i> &nbsp;<a style='color:#fff !important' href="~\..\logout.php">Logout </a>
<?php <?php
} }

View File

@ -220,7 +220,7 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Marked' Order by lab
echo "No Marked submissions for this lab"; echo "No Marked submissions for this lab";
} else { } else {
echo "<h3><a href='~\..\Script.php?exportgrade=true&lab=$id&lab_name=$Report_Title'><i class='fa fa-book'></i> Export Grade Sheet </a></h3>"; echo "<h3><a href='~\..\Script.php?exportgrade=true&lab=$id&lab_name=$Report_Title'><i class='bi bi-book-fill'></i> Export Grade Sheet </a></h3>";
while ($row = mysqli_fetch_assoc($result)) { while ($row = mysqli_fetch_assoc($result)) {
$title = $row['Title']; $title = $row['Title'];

View File

@ -12,6 +12,19 @@
/* This is the CSS for the Header. */ /* This is the CSS for the Header. */
.navbar navbar-expand-lg navbar-dark bg-dark{
padding-left:150px;
padding-right:150px;
margin:auto;
}
navlogoimage {
max-width:100%;
height: auto;
position:relative;
right:-95px;
top:1px;
}
.nav-item { .nav-item {
border-color: #00ff66; border-color: #00ff66;
} }
@ -110,7 +123,7 @@ a {
.footer{ .footer{
font-weight:normal; font-weight:normal;
color:#2471A3; color:#2471A3;
font-family: Poppins-Regular, Serif; font-family: Poppins-Regular, Serif, serif;
font-size: 17px; font-size: 17px;
} }
/* CSS for index Page */ /* CSS for index Page */
@ -130,12 +143,12 @@ a {
color: #03407B; color: #03407B;
} }
img { .img_lrr_logo_home {
max-width:100%; max-width:100%;
height: auto; height: auto;
position:relative; position:relative;
right:-95px; right:-95px;
top:1px;" top:1px;
} }
/* CSS for Signup */ /* CSS for Signup */
.signup-form{ .signup-form{
@ -145,3 +158,5 @@ img {
.footer{ .footer{
background-color:white;width:100% background-color:white;width:100%
} }
/* Courses */

View File

@ -19,7 +19,7 @@ if (isset($_SESSION["user_fullname"])) {
<!---Index Page Logo and Labeling on the left hand side --> <!---Index Page Logo and Labeling on the left hand side -->
<section class="logolabel"> <section class="logolabel">
<div> <div>
<img src="logo.png" alt="LRR Logo"> <img class="img_lrr_logo_home" src="logo.png" alt="LRR Logo">
</div> </div>
<div> <div>
<h1 class="lrrwordlog">Lab Report Repository</h1> <h1 class="lrrwordlog">Lab Report Repository</h1>
@ -46,7 +46,7 @@ if (isset($_SESSION["user_fullname"])) {
<label> <label>
<!---Warning labels--> <!---Warning labels-->
<?php <?php
// wrong pass
if (isset($_SESSION['wrong_pass'])) { if (isset($_SESSION['wrong_pass'])) {
echo '<hr><div class="alert alert-danger" role="alert">' . $_SESSION['wrong_pass'] . '</div>'; echo '<hr><div class="alert alert-danger" role="alert">' . $_SESSION['wrong_pass'] . '</div>';
$_SESSION['wrong_pass'] = null; $_SESSION['wrong_pass'] = null;