Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7affb71

Browse filesBrowse files
committed
minor #10172 [WebProfilerBundle] Use inline images instead of asset() in form-panel (Danez)
This PR was merged into the 2.5-dev branch. Discussion ---------- [WebProfilerBundle] Use inline images instead of asset() in form-panel | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | silexphp/Silex-WebProfiler#33 | License | MIT | Doc PR | In the ```form.html.twig```-template in dev-master the twig function ```assert()``` is used to load the images for the toggle-buttons. This is bad, as the profiler is also used in other projects, which maybe do not have an ```assert()``` function, like Silex. In version 2.4.x this is not an issue, as the new images were introduced for 2.5. I change the assert() part to inline data-images with this [converter](http://www.askapache.com/online-tools/base64-image-converter/). Compression was enabled, so the images should be as small as possible. I also compressed the toolbar-icon a little bit further. While switching between before (dev-master) and after (this PR) I have not spotted any visual difference. Commits ------- 12eabd8 remove unused icons f259157 Further compress icon eb6d02c Use inline images instead of asset() function
2 parents 7c3a3e1 + 12eabd8 commit 7affb71
Copy full SHA for 7affb71

File tree

Expand file treeCollapse file tree

5 files changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+5
-5
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

‎src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{% block toolbar %}
66
{% if collector.data|length %}
77
{% set icon %}
8-
<img width="20" height="28" alt="Forms" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAAYElEQVRIiWNgGHGAEZ+knZ3df2zihw4dwqmPiVIXoQMMm3C5ChdAdy0LsgH4vIIPIJtBdS9T3UAWdAFyvQ0DjKRGAiEwQsIQOdioHoYoLqRGwh514VB0IakWjsC8PAIBAMl9LomdN/ohAAAAAElFTkSuQmCC"/>
8+
<img width="20" height="28" alt="Forms" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcAQMAAABbFA0jAAAABlBMVEUAAAA+Pj4LNneDAAAAAXRSTlMAQObYZgAAACxJREFUCNdjYEACjD8gmP8/A8P7/wVw/IChgOH//w9w/AHKf4CLRlILwkgAANMJMNaUFdtJAAAAAElFTkSuQmCC"/>
99
<span class="sf-toolbar-status sf-toolbar-status-{% if collector.data.nb_errors %}red{% else %}green{% endif %}">{% if collector.data.nb_errors %}{{ collector.data.nb_errors }}{% else %}{{ collector.data.forms|length }}{% endif %}</span>
1010
{% endset %}
1111

@@ -31,13 +31,13 @@
3131
}
3232
.toggle-icon {
3333
display: inline-block;
34-
background: url("{{ asset('bundles/framework/images/toggler.png') }}") no-repeat top left #5eb5e0;
34+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgBAMAAADpp+X/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QweDgwx4LcKwAAAABVQTFRFAAAA////////////////ZmZm////bvjBwAAAAAV0Uk5TABZwsuCVEUjgAAAAAWJLR0QF+G/pxwAAAE1JREFUGNNjSHMSYGBgUEljSGYAAzMGBwiDhUEBwmBiEIAwGBmwgTQgQGWgA7h2uIFwK+CWwp1BpHvYEqDuATEYkBlY3IOmBq6dCPcAAIT5Eg2IksjQAAAAAElFTkSuQmCC") no-repeat top left #5eb5e0;
3535
}
3636
.closed .toggle-icon, .closed.toggle-icon {
3737
background-position: bottom left;
3838
}
3939
.toggle-icon.empty {
40-
background-image: url("{{ asset('bundles/framework/images/toggler_empty.png') }}");
40+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QAZgBmAGYHukptAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QweDhIf6CA40AAAAFRJREFUOMvtk7ENACEMA61vfx767MROWfO+AdGBHlNyTZrYUZRYDBII4NWE1pNdpFarfgLUbpDaBEgBYRiEVjsvDLa1l6O4Z3wkFWN+OfLKdpisOH/TlICzukmUJwAAAABJRU5ErkJggg==");
4141
}
4242
.tree {
4343
width: 230px;
@@ -119,11 +119,11 @@
119119
color: #313131;
120120
}
121121
.tree .tree-inner.active .toggle-icon, .tree .tree-inner:hover .toggle-icon, .tree .tree-inner.active:hover .toggle-icon {
122-
background-image: url("{{ asset('bundles/framework/images/toggler_hover.png') }}");
122+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgBAMAAADpp+X/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QweDhEYXWn+sAAAABhQTFRFAAAA39/f39/f39/f39/fZmZm39/f////gc3YPwAAAAV0Uk5TAAtAc6ZeVyCYAAAAAWJLR0QF+G/pxwAAAE1JREFUGNNjSHMSYGBgUEljSGYAAzMGBwiDhUEBwmBiEIAwGBmwgXIgQGWgA7h2uIFwK+CWwp1BpHvYC6DuATEYkBlY3IOmBq6dCPcAADqLE4MnBi/fAAAAAElFTkSuQmCC");
123123
background-color: #aaa;
124124
}
125125
.tree .tree-inner.active .toggle-icon.empty, .tree .tree-inner:hover .toggle-icon.empty, .tree .tree-inner.active:hover .toggle-icon.empty {
126-
background-image: url("{{ asset('bundles/framework/images/toggler_hover_empty.png') }}");
126+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QweDhoucSey4gAAABVQTFRFAAAA39/f39/f39/f39/fZmZm39/fD5Dx2AAAAAV0Uk5TAAtAc6ZeVyCYAAAAAWJLR0QF+G/pxwAAADJJREFUCNdjSHMSYGBgUEljSGYAAzMGBwiDhUEBwmBiEIAwGBnIA3DtcAPhVsAthTkDAFOfBKW9C1iqAAAAAElFTkSuQmCC");
127127
}
128128
.tree-details {
129129
border-left: 1px solid #dfdfdf;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.