updates
diff --git a/dtps.css b/dtps.css
index 0250086..7ce6a6c 100644
--- a/dtps.css
+++ b/dtps.css
@@ -1406,7 +1406,7 @@
.headerArea {
margin: 10px 20px;
width: auto;
- height: 300px;
+ height: 250px;
}
body.themeImage .headerArea .content {
diff --git a/scripts/assignments.js b/scripts/assignments.js
index cf67e77..928db3a 100644
--- a/scripts/assignments.js
+++ b/scripts/assignments.js
@@ -199,14 +199,14 @@
if (combinedStream.length == 0) {
//Nothing due today
if (doneLoading) {
- combinedHTML = `<p style="text-align: center;margin: 10px 25px 10px 75px; font-size: 18px;"><i class="material-icons">done</i> Nothing due today</p>`;
+ combinedHTML = `<p style="text-align: center;margin: 10px 0px; font-size: 18px;"><i class="material-icons">done</i> Nothing due today</p>`;
} else {
combinedHTML = ``;
}
} else {
//Add header
combinedHTML = /*html*/`
- <h5 style="text-align: center; margin: 10px 25px 10px 75px; font-weight: bold;">Due today</h5>
+ <h5 style="text-align: center; margin: 10px 0px; font-weight: bold;">Due today</h5>
` + combinedHTML;
}
@@ -452,13 +452,13 @@
if (!assignment.dueAt) {
if (prevAssignment && (prevAssignment !== "undated")) {
- divider = `<h5 style="margin: 75px 75px 10px 75px;font-weight: bold;">Undated Assignments</h5>`;
+ divider = `<h5 style="margin: 75px 20px 10px 20px;font-weight: bold;">Undated Assignments</h5>`;
}
prevAssignment = "undated";
} else if (new Date(assignment.dueAt) < new Date()) {
if (prevAssignment && (prevAssignment !== "old")) {
- divider = `<h5 style="margin: 75px 75px 10px 75px;font-weight: bold;">Old Assignments</h5>`;
+ divider = `<h5 style="margin: 75px 20px 10px 20px;font-weight: bold;">Old Assignments</h5>`;
}
prevAssignment = "old";
diff --git a/scripts/core.js b/scripts/core.js
index f287bc5..e5269ea 100644
--- a/scripts/core.js
+++ b/scripts/core.js
@@ -89,20 +89,6 @@
//Load jQuery ASAP
jQuery.getScript("https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js");
-//Fluid UI theme listener (for changing background color)
-document.addEventListener("fluidTheme", function (data) {
- if (dtps.oldTheme !== data.detail) {
- //Theme has changed
- dtps.oldTheme = data.detail;
-
- //Update background gradient
- var next = window.getComputedStyle(document.getElementsByClassName("background")[0]).getPropertyValue("--grad")
- if (dtps.selectedClass !== "dash") next = "linear-gradient(to bottom right, " + (dtps.classes[dtps.selectedClass] && dtps.classes[dtps.selectedClass].color) + ", var(--background))"
- if (dtps.selectedClass !== "dash") $('body').removeClass('dashboard');
- $(".background").css("background", next);
- }
-});
-
/**
* Debugging shortcut for getting the selected class. This should only be used in the web inspector and not in actual code.
*
@@ -837,57 +823,16 @@
document.title = "Power+";
}
- //Set dashboard body class for CSS styles
- if (classNum == "dash") {
- $('body').addClass('dashboard');
- } else {
- $('body').removeClass('dashboard');
- }
-
- //Set the default imageURL to an empty PNG to make the CSS transition work
- var imageURL = "https://i.imgur.com/SpqHCNo.png";
-
- if (fluid.get("pref-hideClassImages") !== "true") {
- //Class images are not disabled
- if (dtps.classes[classNum] && dtps.classes[classNum].image) {
- //Class has image
- imageURL = dtps.classes[classNum].image;
- }
- }
-
- //Run CSS animation for class transition
- $(".background").addClass("trans");
- $(".cover.image").css("background-image", 'url("' + imageURL + '")');
- $(".background").css("opacity", '0.6');
- $(".background").css("filter", 'none');
-
- if (dtps.classes[classNum] && dtps.classes[classNum].image) {
+ //Set the class image
+ if ((fluid.get("pref-showClassImages") !== "false") && dtps.classes[classNum] && dtps.classes[classNum].image) {
$(".headerArea").addClass("classImage");
- $(".headerArea img").attr("src", imageURL);
+ $(".headerArea img").attr("src", dtps.classes[classNum].image);
$(".headerArea img").show();
} else {
$(".headerArea").removeClass("classImage");
$(".headerArea img").hide();
}
- //Clear any existing background animation timeout
- clearTimeout(dtps.bgTimeout);
-
- //Set 500ms transition
- dtps.bgTimeout = setTimeout(function () {
- //Set theme to something random to force the theme change listener to update
- dtps.oldTheme = "nklfsdlflsdajflks";
- document.dispatchEvent(new CustomEvent('fluidTheme'));
-
- //Remove transition
- $(".background").removeClass("trans");
- }, 500);
-
- //Set background color
- if (dtps.classes[classNum]) {
- $(".background").css("--classColor", dtps.classes[classNum].color);
- }
-
//Remove active class from other classes in the sidebar, add the active class to the selected class
$(".class." + classNum).siblings().removeClass("active");
$(".class." + classNum).addClass("active");
@@ -1787,9 +1732,6 @@
//Render sidebar
dtps.showClasses();
- //Load header background gradient
- document.dispatchEvent(new CustomEvent('fluidTheme'));
-
//Remove loading screen styles
jQuery("#dtpsNativeOverlay style").remove();