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

Commit 30ae8d0

Browse files
committed
Улучшено оформление
1 parent 1942d13 commit 30ae8d0

File tree

4 files changed

+50
-14
lines changed

4 files changed

+50
-14
lines changed

assets/DebugBar/themes/general.css

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
justify-content: center !important;
3535
padding-left: 5px;
3636
padding-right: 5px;
37-
height: 30px !important;
37+
height: 31px !important;
3838
min-width: 30px !important;
3939
cursor: pointer !important;
4040
font-size: 16px !important;
@@ -70,20 +70,56 @@
7070

7171
.ggrach__debug_bar__item.active {
7272
font-weight: bold !important;
73+
height: 41px !important;
74+
line-height: 41px !important;
75+
z-index: 1;
76+
border-radius: 3px 3px 0 0;
77+
}
78+
79+
.ggrach__debug_bar__log__title {
80+
position: fixed !important;
81+
bottom: 0px !important;
82+
right: 0 !important;
83+
z-index: 5 !important;
84+
font-size: 14px !important;
85+
padding: 5px !important;
86+
height: 30px !important;
87+
display: flex !important;
88+
align-items: center !important;
7389
}
7490

7591
.type-notice-notice {
76-
background-color: #93c7ec !important;
92+
color: #fff;
93+
background: rgb(25,60,119);
94+
background: -moz-linear-gradient(180deg, rgba(25,60,119,1) 0%, rgba(18,97,148,1) 72%);
95+
background: -webkit-linear-gradient(180deg, rgba(25,60,119,1) 0%, rgba(18,97,148,1) 72%);
96+
background: linear-gradient(180deg, rgba(25,60,119,1) 0%, rgba(18,97,148,1) 72%);
97+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#193c77",endColorstr="#126194",GradientType=1);
7798
}
7899

79100
.type-notice-warning {
80-
background-color: #d8ff00 !important;
101+
color: #000;
102+
background: rgb(179,195,43);
103+
background: -moz-linear-gradient(180deg, rgba(179,195,43,1) 0%, rgba(213,224,27,1) 72%);
104+
background: -webkit-linear-gradient(180deg, rgba(179,195,43,1) 0%, rgba(213,224,27,1) 72%);
105+
background: linear-gradient(180deg, rgba(179,195,43,1) 0%, rgba(213,224,27,1) 72%);
106+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#b3c32b",endColorstr="#d5e01b",GradientType=1);
81107
}
82108

83109
.type-notice-error {
84-
background-color: red !important;
110+
color: #fff;
111+
background: rgb(170,18,18);
112+
background: -moz-linear-gradient(180deg, rgba(170,18,18,1) 0%, rgba(200,9,9,1) 72%);
113+
background: -webkit-linear-gradient(180deg, rgba(170,18,18,1) 0%, rgba(200,9,9,1) 72%);
114+
background: linear-gradient(180deg, rgba(170,18,18,1) 0%, rgba(200,9,9,1) 72%);
115+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#aa1212",endColorstr="#c80909",GradientType=1);
85116
}
86117

87118
.type-notice-success {
88-
background-color: green !important;
119+
color: #fff;
120+
background: rgb(25,119,44);
121+
background: -moz-linear-gradient(180deg, rgba(25,119,44,1) 0%, rgba(18,148,70,1) 72%);
122+
background: -webkit-linear-gradient(180deg, rgba(25,119,44,1) 0%, rgba(18,148,70,1) 72%);
123+
background: linear-gradient(180deg, rgba(25,119,44,1) 0%, rgba(18,148,70,1) 72%);
124+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#19772c",endColorstr="#129446",GradientType=1);
89125
}

assets/DebugBar/themes/light/theme.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
border-top: 1px solid #b3b3b3 !important;
55
}
66

7-
.ggrach__debug_bar__log {
8-
border-top: 1px solid #b3b3b3 !important;
9-
}
10-
117
.ggrach__debug_bar__log__line {
128
font-size: 12px;
139
color: darkgrey;

initializer.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?php
22

3-
// Нужно подключить этот файл в init.php
4-
// include 'BitrixDebugger/initializer.php';
5-
63
/**
4+
* https://github.com/ggrachdev/BitrixDebugger
5+
6+
* @version 0.1
7+
*
78
* Пример дебага:
89
*
910
* GD()->notice('Моя переменная', 'Моя переменная 2');
@@ -17,14 +18,16 @@
1718
* GD()->warningLog('Моя переменная', 'Моя переменная 2');
1819
* GD()->successLog('Моя переменная', 'Моя переменная 2');
1920
*
21+
* Нужно подключить этот файл в init.php
22+
* include 'BitrixDebugger/initializer.php';
23+
*
2024
*/
2125

22-
use Bitrix\Main\Loader;
2326
use Bitrix\Main\Page\Asset;
2427

2528
$ggrachDebuggerRootPath = str_replace($_SERVER['DOCUMENT_ROOT'], '', __DIR__);
2629

27-
Loader::registerAutoLoadClasses(null, [
30+
\Bitrix\Main\Loader::registerAutoLoadClasses(null, [
2831
"\GGrach\BitrixDebugger\Debugger\Debugger" => $ggrachDebuggerRootPath . "/src/BitrixDebugger/Debugger/Debugger.php",
2932
"\GGrach\BitrixDebugger\Debugger\DebuggerShowModable" => $ggrachDebuggerRootPath . "/src/BitrixDebugger/Debugger/DebuggerShowModable.php",
3033
"\GGrach\BitrixDebugger\Contract\ShowModableContract" => $ggrachDebuggerRootPath . "/src/BitrixDebugger/Contract/ShowModableContract.php",

src/BitrixDebugger/Representer/DebugBarRepresenter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public static function render(Debugger $debugger): string {
3535
$view .= '</div>';
3636

3737
$view .= '<div class="ggrach__debug_bar__log" data-type-notice="' . $typeLog . '" style="display: none;">';
38+
$view .= '<div class="ggrach__debug_bar__log__title">' . $typeLog . '</div>';
3839

3940
foreach ($arLogs as $arLogType) {
4041

0 commit comments

Comments
 (0)