Skip to content

Commit 76049e6

Browse files
authored
Fix #1184 -- Replace loading gif with css animation (#1353)
1 parent aee53aa commit 76049e6

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

debug_toolbar/static/debug_toolbar/css/toolbar.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,18 @@
233233
}
234234

235235
#djDebug .djDebugPanelContent .djdt-loader {
236-
display: block;
237236
margin: 80px auto;
237+
border: 6px solid white;
238+
border-radius: 50%;
239+
border-top: 6px solid #ffe761;
240+
width: 38px;
241+
height: 38px;
242+
animation: spin 2s linear infinite;
243+
}
244+
245+
@keyframes spin {
246+
0% { transform: rotate(0deg); }
247+
100% { transform: rotate(360deg); }
238248
}
239249

240250
#djDebug .djDebugPanelContent .djdt-scroll {
Binary file not shown.

debug_toolbar/templates/debug_toolbar/includes/panel_content.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h3>{{ panel.title }}</h3>
88
</div>
99
<div class="djDebugPanelContent">
1010
{% if toolbar.store_id %}
11-
<img src="{% static 'debug_toolbar/img/ajax-loader.gif' %}" alt="loading" class="djdt-loader">
11+
<div class="djdt-loader"></div>
1212
<div class="djdt-scroll"></div>
1313
{% else %}
1414
<div class="djdt-scroll">{{ panel.content }}</div>

tests/panels/test_custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_escapes_panel_title(self):
3737
<h3>Title with special chars &amp;&quot;&#39;&lt;&gt;</h3>
3838
</div>
3939
<div class="djDebugPanelContent">
40-
<img class="djdt-loader" src="/static/debug_toolbar/img/ajax-loader.gif" alt="loading">
40+
<div class="djdt-loader"></div>
4141
<div class="djdt-scroll"></div>
4242
</div>
4343
</div>

tests/panels/test_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_panel_title(self):
2828
<h3>Settings from None</h3>
2929
</div>
3030
<div class="djDebugPanelContent">
31-
<img class="djdt-loader" src="/static/debug_toolbar/img/ajax-loader.gif" alt="loading">
31+
<div class="djdt-loader"></div>
3232
<div class="djdt-scroll"></div>
3333
</div>
3434
</div>

0 commit comments

Comments
 (0)