-
Accessibility
+
+
+
+
Accessibility
Text Size
@@ -129,7 +134,7 @@
High Contrast Colors
Dark Mode
-
+
diff --git a/css/styles.css b/css/styles.css
index 4dc60da..e127eb5 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -1,6 +1,12 @@
/* Colors */
@import url(all.css);
/* Classes */
+a.anchor {
+ display: block;
+ position: relative;
+ top: -250px;
+ visibility: hidden; }
+
.back {
color: #ffffff; }
@@ -98,4 +104,20 @@ footer {
.nav-link > .fas:hover {
color: rgba(255, 202, 6, 0.5); }
+/* Dark Mode Stylings */
+.darkmode, .fas.darkmode {
+ color: white; }
+
+.alert-warning.darkmode {
+ background-color: #f9e7c950 !important; }
+
+.alert-info.darkmode {
+ background-color: #dcf3f850 !important; }
+
+.btn.darkmode {
+ background-color: black; }
+
+body.darkmode {
+ background-color: black; }
+
/*# sourceMappingURL=styles.css.map */
diff --git a/css/styles.css.map b/css/styles.css.map
index 41af2b7..8175d00 100644
--- a/css/styles.css.map
+++ b/css/styles.css.map
@@ -1,6 +1,6 @@
{
"version": 3,
-"mappings": "AAAA,YAAY;ACCJ,oBAAS;AAEjB,aAAa;AAEb,KAAM;EACF,KAAK,EAAE,OAAO;;AAGlB,UAAW;EACP,cAAc,EAAE,IAAI;;AAGxB,IAAK;EACD,MAAM,EAAE,KAAK;EACb,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,iBAAqB;EAC7B,aAAa,EAAE,GAAG;EAClB,OAAO,EAAE,YAAY;;AAGzB,UAAW;EACP,gBAAgB,EDrBP,OAAiB;;ACwB9B,QAAS;EACL,KAAK,EAAE,KAAK;EACZ,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,IAAI;;AAGb,cAAe;EACX,KAAK,EAAE,KAAK;;AAGhB,aAAc;EACV,SAAS,EAAE,kBAAiB;;AAGhC,cAAe;EACX,gBAAgB,EAAE,KAAK;EACvB,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;;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EAAE,CAAC;;AAGrB,iBAAkB;EACd,WAAW,EAAE,KAAK;;AAGtB,wBAAwB;AAExB,MAAO;EACH,gBAAgB,EAAE,KAAK;EACvB,MAAM,EAAE,IAAI;EAEZ,QAAQ,EAAE,KAAK;EACf,MAAM,EAAE,CAAC;EACT,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,GAAG;;AAGhB,gBAAiB;EACb,KAAK,EAAE,KAAK;;AAGhB,uBAAwB;EACpB,KAAK,EDhII,OAAiB;;ACmI9B,sBAAuB;EACnB,KAAK,EDnIM,sBAAmB;;ACsIlC,wBAAwB;AAExB,wBAAyB;EACrB,KAAK,EAAE,KAAK;;AAGhB,uBAAwB;EACpB,gBAAgB,EAAE,oBAAmB;;AAGzC,oBAAqB;EACjB,gBAAgB,EAAE,oBAAmB;;AAGzC,aAAc;EACV,gBAAgB,EAAE,KAAK;;AAG3B,aAAc;EACV,gBAAgB,EAAE,KAAK",
"sources": ["variables.scss","styles.scss"],
"names": [],
"file": "styles.css"
diff --git a/css/styles.scss b/css/styles.scss
index 90e8f58..2b57dfc 100644
--- a/css/styles.scss
+++ b/css/styles.scss
@@ -3,6 +3,13 @@
/* Classes */
+a.anchor {
+ display: block;
+ position: relative;
+ top: -250px;
+ visibility: hidden;
+}
+
.back {
color: #ffffff;
}
@@ -125,4 +132,26 @@ footer {
.nav-link > .fas:hover {
color: $brightGold50;
+}
+
+/* Dark Mode Stylings */
+
+.darkmode, .fas.darkmode {
+ color: white;
+}
+
+.alert-warning.darkmode {
+ background-color: #f9e7c950!important;
+}
+
+.alert-info.darkmode {
+ background-color: #dcf3f850!important;
+}
+
+.btn.darkmode {
+ background-color: black;
+}
+
+body.darkmode {
+ background-color: black;
}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 62902bc..b72b419 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "dig4104c",
- "version": "0.1.0",
+ "version": "0.2.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "dig4104c",
- "version": "0.0.1",
+ "version": "0.2.0",
"license": "ISC",
"dependencies": {
"jquery": "^3.6.0",
diff --git a/package.json b/package.json
index 279dc39..d5a52c9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "dig4104c",
- "version": "0.1.0",
+ "version": "0.2.0",
"description": "UCF Mobile App Prototype",
"main": "index.html",
"scripts": {
diff --git a/scripts/app.js b/scripts/app.js
index 77ae5c6..3e23d15 100644
--- a/scripts/app.js
+++ b/scripts/app.js
@@ -1,4 +1,4 @@
-/* Set font size based on preferences*/
+/* Get font size based on preferences */
function setFontSize() {
let accessibleText = "a, button:not('.text-size-toggle'), h1, h2, h3, h4, h5, h6, p";
@@ -42,6 +42,25 @@ function setFontSize() {
}
};
+/* Get dark mode based on preferences */
+function setDarkMode() {
+ let accessibleElements = "a, body, button, h1, h2, h3, h4, h5, h6, .alert, .fas";
+
+ if(Cookies.get('darkMode') == "true") {
+ $("#dark-mode-toggle").addClass("btn-success");
+ $("#dark-mode-toggle").removeClass("btn-default");
+ $("#dark-mode-toggle").text("Enabled");
+
+ $(accessibleElements).addClass("darkmode");
+ } else {
+ $("#dark-mode-toggle").addClass("btn-default");
+ $("#dark-mode-toggle").removeClass("btn-success");
+ $("#dark-mode-toggle").text("Disabled");
+
+ $(accessibleElements).removeClass("darkmode");
+ }
+}
+
/* Toggle clickable buttons */
$(".btn-toggle").on("click", function(){
if ($(this).hasClass("btn-success")) {
@@ -55,7 +74,7 @@ $(".btn-toggle").on("click", function(){
}
});
-/* Toggle font size buttons */
+/* Set font size preferences */
$("#text-size-sm").on("click", function() {
Cookies.set('fontSize', 'sm');
setFontSize()
@@ -69,4 +88,16 @@ $("#text-size-lg").on("click", function() {
setFontSize()
});
+/* Set dark mode preferences */
+$("#dark-mode-toggle").on("click", function() {
+ if($(this).hasClass("btn-success")) {
+ Cookies.set('darkMode', 'true');
+ setDarkMode();
+ } else {
+ Cookies.set('darkMode', 'false');
+ setDarkMode();
+ }
+});
+
setFontSize()
+setDarkMode();
\ No newline at end of file