Skip to content

Commit 920a903

Browse files
authored
Merge pull request #1 from LulububuApps/feature/profiler-dark-mode
Feature/profiler dark mode
2 parents fe3801c + 973e738 commit 920a903

File tree

3 files changed

+27
-20
lines changed

3 files changed

+27
-20
lines changed
-197 Bytes
Binary file not shown.
-213 Bytes
Binary file not shown.

Resources/views/Profiler/profiler.html.twig

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,22 @@
8787
</span>
8888
</div>
8989
{% if query.body is not empty %}
90-
<div onclick="return expandQuery(this);" title="Expand query" data-target-id="code-{{ i ~q }}" style="cursor: pointer;">
91-
<span id="smallcode-{{ i ~ q }}">
92-
<strong>Body:</strong> <small>{{ query.body|slice(0, 100) }}</small>
93-
</span>
94-
<img alt="+" src="{{ asset('bundles/ongrelasticsearch/images/blue_picto_more.gif') }}" style="display: inline;" />
95-
<img alt="-" src="{{ asset('bundles/ongrelasticsearch/images/blue_picto_less.gif') }}" style="display: none;" />
90+
<div>
91+
<span id="smallcode-{{ i ~ q }}">
92+
<strong>Body:</strong> <small>{{ query.body|slice(0, 100) }}</small>
93+
</span>
94+
<div>
95+
<small>
96+
<a
97+
onclick="return expandQuery(this);"
98+
style="cursor: pointer;"
99+
title="Expand query"
100+
data-target-id="code-{{ i ~q }}"
101+
>
102+
Expand [+]
103+
</a>
104+
</small>
105+
</div>
96106
</div>
97107
<code id="code-{{ i ~ q }}" class="hide">
98108
<pre class="code">{{ query.body }}</pre>
@@ -128,20 +138,17 @@
128138
{% endif %}
129139

130140
<script type="text/javascript">//<![CDATA[
131-
function expandQuery(link) {
132-
var sections = link.children,
133-
target = link.getAttribute('data-target-id'),
134-
targetId = target.replace('code-', '');
135-
if (document.getElementById('code-' + targetId).className != 'hide') {
136-
document.getElementById(target).style.display = 'none';
141+
function expandQuery (link) {
142+
var target = link.getAttribute('data-target-id'),
143+
targetId = target.replace('code-', '');
144+
if (document.getElementById('code-' + targetId).className !== 'hide') {
145+
document.getElementById(target).style.display = 'none';
137146
document.getElementById('code-' + targetId).className = 'hide';
138-
sections[1].style.display = 'inline';
139-
sections[2].style.display = 'none';
147+
link.innerText = 'Expand [+]'
140148
} else {
141149
document.getElementById('code-' + targetId).className = 'show';
142-
document.getElementById(target).style.display = 'inline';
143-
sections[1].style.display = 'none';
144-
sections[2].style.display = 'inline';
150+
document.getElementById(target).style.display = 'inline';
151+
link.innerText = 'Shrink [-]'
145152
}
146153
return false;
147154
}
@@ -152,7 +159,7 @@
152159
}
153160
code pre {
154161
padding: 5px;
155-
background-color: #DCDCDC;
162+
background-color: var(--base-1);
156163
}
157164
158165
ul.queries li h3 {
@@ -169,11 +176,11 @@
169176
ul h3 i {
170177
font-style: normal;
171178
font-weight: 400;
172-
color: #313131
179+
color: var(--highlight-string);
173180
}
174181
175182
ul.queries li ul li {
176-
background-color: #f6f6f6;
183+
background-color: var(--table-background);
177184
padding: 10px;
178185
margin: 0px 0px 5px 10px;
179186
}

0 commit comments

Comments
 (0)