Added a configuration setting that will replace the Puppet Dashboard logo with any arbitrary image.
Signed-off-by: Jesse Wolfe <jes5...@gmail.com> --- Local-branch: ticket/next/5117 app/views/shared/_global_nav.html.haml | 6 +++++- config/settings.yml.example | 3 +++ public/stylesheets/application.css | 1 - public/stylesheets/sass/application.scss | 1 - 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/views/shared/_global_nav.html.haml b/app/views/shared/_global_nav.html.haml index ba9c338..ee20dd3 100644 --- a/app/views/shared/_global_nav.html.haml +++ b/app/views/shared/_global_nav.html.haml @@ -1,6 +1,10 @@ %ul#global-navigation.navigation %li - = link_to "Puppet Dashboard", root_path, :id => "logo" + - if SETTINGS.custom_logo_url + %a{:href => root_path, :id => "logo", :style => "background-image:none"} + %img{:src => SETTINGS.custom_logo_url, :height => '23', :width => '155', :alt => "Puppet Dashboard" } + - else + %a{:href => root_path, :id => "logo", :style => "text-indent: -9000px;"} Puppet Dashboard %li{:class => active_if(request.url == release_notes_url)} = link_to "v#{APP_VERSION}", release_notes_path %li » diff --git a/config/settings.yml.example b/config/settings.yml.example index 0bb10f5..3a81790 100644 --- a/config/settings.yml.example +++ b/config/settings.yml.example @@ -53,4 +53,7 @@ use_external_node_classification: true datetime_format: '%Y-%m-%d %H:%M %Z' date_format: '%Y-%m-%d' +# Set this to the URL of an image. The image will be scaled to 155x23 pixels. +#custom_logo_url: 'http://www.puppetlabs.com/images/puppet-short.png' + #===[ fin ]============================================================= diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index a2a7b56..fc07d5e 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -35,7 +35,6 @@ body { font-weight: bold; } body #header a#logo { background: transparent url("../images/dashboard_logo.png") no-repeat top center; - text-indent: -9000px; display: inline-block; height: 23px; width: 155px; diff --git a/public/stylesheets/sass/application.scss b/public/stylesheets/sass/application.scss index a6dd120..3e657c4 100644 --- a/public/stylesheets/sass/application.scss +++ b/public/stylesheets/sass/application.scss @@ -138,7 +138,6 @@ body { a#logo { background: transparent url('../images/dashboard_logo.png') no-repeat top center; - text-indent: -9000px; display: inline-block; height: 23px; width: 155px; -- 1.7.0.4 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-...@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.