Skip to content

Node.js based forum software built for the modern web

added a new option "state" to taskbar push... set to 'active' to have it load in an active (darkened) state, while 'pulse' will have it pulse between darkened and light states

Julian Lam9fb8701f4f86
diff --git a/public/css/style.less b/public/css/style.less
index 9e05474668..e0ba9d9f44 100644
--- a/public/css/style.less
+++ b/public/css/style.less
@@ -460,6 +460,17 @@ body .navbar .nodebb-inline-block {
max-height: 24px;
margin-right: 1em;
}
+
+ &.pulse {
+ -webkit-animation: pulsate 2500ms linear;
+ -webkit-animation-iteration-count: infinite;
+ }
+
+ @-webkit-keyframes pulsate {
+ 0% { background: none; }
+ 50% { background: rgb(170, 220, 170); }
+ 100% { background: none; }
+ }
}
}
@@ -631,9 +642,6 @@ body .navbar .nodebb-inline-block {
}
}
-
-
-
#mobile-sidebar {
height: 100%;
position: absolute;
diff --git a/public/src/modules/taskbar.js b/public/src/modules/taskbar.js
index a53f1fab64..28ae40b3fa 100644
--- a/public/src/modules/taskbar.js
+++ b/public/src/modules/taskbar.js
@@ -59,7 +59,7 @@ define(function() {
'</a>';
btnEl.setAttribute('data-module', module);
btnEl.setAttribute('data-uuid', uuid);
- btnEl.className = 'active';
+ btnEl.className = options.state || 'active';
taskbar.tasklist.appendChild(btnEl);
taskbar.update();