Przeglądaj źródła

Change profiler menu entry images to be in template

alexandresalome 14 lat temu
rodzic
commit
0b41116a7b

+ 2 - 1
src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig

@@ -8,7 +8,8 @@
 {% endblock %}
 
 {% block menu %}
-<span class="picto png_fix">
+<span class="label png_fix">
+    <span class="icon"><img src="{{ asset('bundles/webprofiler/images/profiler/db.png') }}" alt="" /></span>
     <strong>Doctrine</strong>
     <span class="count">
         <span>{{ collector.querycount }}</span>

+ 36 - 65
src/Symfony/Bundle/WebProfilerBundle/Resources/public/css/profiler.css

@@ -155,96 +155,67 @@ fieldset
 
 .menu_profiler
 {
-    border-right:1px solid #dfdfdf;
+    border-right: 1px solid #dfdfdf;
 }
 
 .menu_profiler li
 {
-    border-bottom:1px solid #dfdfdf;
-    position:relative;
-    padding-bottom:0;
-    display:block;
+    border-bottom:    1px solid #dfdfdf;
+    position:         relative;
+    padding-bottom:   0;
+    display:          block;
+    background-color: #f6f6f6;
 }
 
-.menu_profiler li a,
-.menu_profiler li a .picto
+.menu_profiler li a
 {
-    display:block;
-    font-size:13px;
-    background-color:#f6f6f6;
-    text-transform:uppercase;
-    cursor:pointer;
+    color:           #404040;
+    display:         block;
+    font-size:       13px;
+    text-transform:  uppercase;
+    text-decoration: none;
+    cursor:          pointer;
 }
 
-.menu_profiler li a,
-.menu_profiler li a:hover
+.menu_profiler li a span.label
 {
-    color:#404040;
-    text-decoration:none;
-    display:block;
-    background-image:none;
+    display:    block;
+    padding:    20px 20px 16px 65px;
+    min-height: 24px;
+    _height:    24px;
 }
 
-.menu_profiler li.selected a,
-.menu_profiler li a:hover
+.menu_profiler li a span.icon
 {
-    background:#d1d1d1 url(../images/profiler/bg_submenu.gif) repeat-x 0 0;
+    display: block;
+    position: absolute;
+    left: 0px;
+    top: 12px;
+    width: 60px;
+    text-align: center;
 }
 
-.menu_profiler a .picto
+.menu_profiler li.selected a,
+.menu_profiler li a:hover
 {
-    display:block;
-    padding:20px 20px 16px 65px;
-    min-height:24px;
-    _height:24px;
+    background:#d1d1d1 url(../images/profiler/bg_submenu.gif) repeat-x 0 0;
 }
 
+.menu_profiler .request,
 .menu_profiler .request a,
-.menu_profiler .request .picto
+.menu_profiler .request a span.label
 {
     -moz-border-radius:16px 0 0 0;
     -webkit-border-radius:16px 0 0 0;
     border-radius:16px 0 0 0;
 }
 
-.menu_profiler .request .picto
-{
-    background:transparent url(../images/profiler/request.png) no-repeat 14px 14px;
-}
-
-.menu_profiler .exception .picto
+.menu_profiler li a span.count
 {
-    background:transparent url(../images/profiler/exception.png) no-repeat 14px 14px;
-}
-
-.menu_profiler .events .picto
-{
-    background:transparent url(../images/profiler/events.png) no-repeat 22px 14px;
-}
-
-.menu_profiler .logger .picto
-{
-    background:transparent url(../images/profiler/logger.png) no-repeat 22px 14px;
-}
-
-.menu_profiler .db .picto
-{
-    background:transparent url(../images/profiler/db.png) no-repeat 22px 14px;
-}
-
-.menu_profiler .security .picto
-{
-    background:transparent url(../images/profiler/security.png) no-repeat 22px 14px;
-}
-
-.menu_profiler .picto span.count
-{
-    float:right;
-    position:relative;
-    top:-4px;
-    display:block;
-    width:70px;
-    text-align:right;
+    padding: 0;
+    position:absolute;
+    right: 10px;
+    top: 20px;
 }
 
 .navigation, .collector_content
@@ -288,7 +259,7 @@ li
     margin-bottom:20px;
 }
 
-.menu_profiler .picto span.count span
+.menu_profiler span.count span
 {
     display:inline-block;
     background-color:#aacd4e;

+ 2 - 1
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig

@@ -1,7 +1,8 @@
 {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %}
 
 {% block menu %}
-<span class="picto png_fix">
+<span class="label png_fix">
+    <span class="icon"><img src="{{ asset('bundles/webprofiler/images/profiler/events.png') }}" alt="" /></span>
     <strong>Events</strong>
 </span>
 {% endblock %}

+ 2 - 1
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig

@@ -6,7 +6,8 @@
 {% endblock %}
 
 {% block menu %}
-<span class="picto png_fix">
+<span class="label png_fix">
+    <span class="icon"><img src="{{ asset('bundles/webprofiler/images/profiler/exception.png') }}" alt="" /></span>
     <strong>Exception</strong>
     <span class="count">
         {% if collector.hasexception %}

+ 2 - 1
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig

@@ -8,7 +8,8 @@
 {% endblock %}
 
 {% block menu %}
-<span class="picto png_fix">
+<span class="label png_fix">
+    <span class="icon"><img src="{{ asset('bundles/webprofiler/images/profiler/logger.png') }}" alt="" /></span>
     <strong>Logs</strong>
     <span class="count">
         <span>{{ collector.counterrors }}</span>

+ 2 - 1
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig

@@ -14,7 +14,8 @@
 {% endblock %}
 
 {% block menu %}
-<span class="picto png_fix">
+<span class="label png_fix">
+    <span class="icon"><img src="{{ asset('bundles/webprofiler/images/profiler/request.png') }}" alt="" /></span>
     <strong>Request</strong>
 </span>
 {% endblock %}