Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 091e471

Browse files
committed
Add actual files
1 parent a12af5e commit 091e471

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

module/ggrachdev.debugbar/install/css/general.css

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,32 @@
222222
background: -webkit-linear-gradient(180deg, rgba(0,97,65,1) 0%, rgba(0,172,115,1) 72%);
223223
background: linear-gradient(180deg, rgba(0,97,65,1) 0%, rgba(0,172,115,1) 72%);
224224
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#006141",endColorstr="#00ac73",GradientType=1);
225+
}
226+
227+
.ggrach-debug-bar-color-black {
228+
color: #fff;
229+
background: #000;
230+
}
231+
232+
.ggrach__debug_bar.hide-debug-bar > * {
233+
display: none !important;
234+
}
235+
236+
.ggrach__debug_bar.hide-debug-bar {
237+
background: transparent !important;
238+
border: unset !important;
239+
width: 30px !important;
240+
right: 0 !important;
241+
}
242+
243+
.ggrach__debug_bar.hide-debug-bar > .ggrach__debug_bar__right {
244+
display: flex !important;
245+
}
246+
247+
.ggrach__debug_bar.hide-debug-bar > .ggrach__debug_bar__right > * {
248+
display: none !important;
249+
}
250+
251+
.ggrach__debug_bar.hide-debug-bar > .ggrach__debug_bar__right > [data-click="toggle_debug_bar"] {
252+
display: flex !important;
225253
}

module/ggrachdev.debugbar/install/js/initializer.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,35 @@ Ggrach.DebugBar = {
3737
element.addEventListener('click', Ggrach.Handlers.onClickItemNotice);
3838
});
3939
}
40+
41+
42+
document.querySelector('[data-click="toggle_debug_bar"]').addEventListener('click', function (e) {
43+
e.preventDefault();
44+
Ggrach.DebugBar.toggle();
45+
});
4046
}
4147
}
4248
});
4349
},
4450

4551
removeBar: function () {
46-
document.querySelector('.ggrach__debug_bar').remove();
52+
this.getDebugBar().remove();
53+
},
54+
55+
getDebugBar: function () {
56+
return document.querySelector('.ggrach__debug_bar');
57+
},
58+
59+
toggle: function () {
60+
this.getDebugBar().classList.toggle('hide-debug-bar');
61+
},
62+
63+
hide: function () {
64+
this.getDebugBar().classList.add('hide-debug-bar');
65+
},
66+
67+
show: function () {
68+
this.getDebugBar().classList.remove('hide-debug-bar');
4769
}
4870
};
4971

0 commit comments

Comments
 (0)