Browse Source

HUE-5557 [core] Move to an SVG logo for the Hue topbar

Enrico Berti 9 years ago
parent
commit
13aeb090e6

+ 8 - 14
desktop/core/src/desktop/templates/common_header.mako

@@ -26,6 +26,7 @@ if USE_NEW_EDITOR.get():
 %>
 
 <%namespace name="koComponents" file="/ko_components.mako" />
+<%namespace name="hueIcons" file="/hue_icons.mako" />
 
 <!DOCTYPE html>
 <%def name="is_selected(selected)">
@@ -414,19 +415,6 @@ if USE_NEW_EDITOR.get():
         }
       });
 
-      var _skew = -1;
-      $("[data-hover]").on("mouseover", function(){
-        var _this = $(this);
-        _skew = window.setTimeout(function(){
-          _this.attr("src", _this.data("hover"));
-        }, 3000);
-      });
-
-      $("[data-hover]").on("mouseout", function(){
-        $(this).attr("src", $(this).data("orig"));
-        window.clearTimeout(_skew);
-      });
-
       window.hueDebug = {
         viewModel: function (element) {
           if (typeof element !== 'undefined' && typeof element === 'string') {
@@ -440,6 +428,8 @@ if USE_NEW_EDITOR.get():
 </head>
 <body>
 
+${ hueIcons.symbols() }
+
 % if conf.CUSTOM.BANNER_TOP_HTML.get():
   <div id="banner-top" class="banner">
     ${ conf.CUSTOM.BANNER_TOP_HTML.get() | n,unicode }
@@ -549,7 +539,11 @@ if USE_NEW_EDITOR.get():
   % endif
 
   </div>
-    <a class="brand nav-tooltip pull-left" title="${_('About Hue')}" rel="navigator-tooltip" href="/about"><img src="${ static('desktop/art/hue-logo-mini-white.png') }" data-orig="${ static('desktop/art/hue-logo-mini-white.png') }" data-hover="${ static('desktop/art/hue-logo-mini-white-hover.png') }" /></a>
+    <a class="brand nav-tooltip pull-left" title="${_('About Hue')}" rel="navigator-tooltip" href="/about">
+      <svg style="margin-top: 2px; margin-left:8px;width: 60px;height: 16px;display: inline-block;">
+        <use xlink:href="#hue-logo"></use>
+      </svg>
+    </a>
     % if user.is_authenticated() and section != 'login':
      <ul class="nav nav-pills pull-left">
        <li><a title="${_('My documents')}" rel="navigator-tooltip" href="${ home_url }" style="padding-bottom:2px!important"><i class="fa fa-home" style="font-size: 19px"></i></a></li>

+ 0 - 3
desktop/core/src/desktop/templates/document_browser.mako

@@ -21,10 +21,7 @@ from django.utils.translation import ugettext as _
 from desktop.views import _ko
 %>
 
-<%namespace name="hueIcons" file="/hue_icons.mako" />
-
 <%def name="docBrowser()">
-  ${ hueIcons.symbols() }
 
   <script src="/static/desktop/ext/js/bootstrap-fileupload.js" type="text/javascript" charset="utf-8"></script>
   <link rel="stylesheet" href="/static/desktop/ext/css/bootstrap-fileupload.css">

+ 0 - 4
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -25,8 +25,6 @@ from metadata.conf import has_optimizer
 from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, ENABLE_BATCH_EXECUTE
 %>
 
-<%namespace name="hueIcons" file="/hue_icons.mako" />
-
 <%def name="includes(is_embeddable=False)">
 <link rel="stylesheet" href="${ static('desktop/css/common_dashboard.css') }">
 % if not is_embeddable:
@@ -210,8 +208,6 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, ENABLE_
 % endif
 </style>
 
-${ hueIcons.symbols() }
-
 <div class="print-logo">
   <img class="pull-right" src="${ static('desktop/art/icon_hue_48.png') }" />
 </div>