$logo support

fm - October 4, 2008 - 23:00
Project:Blueprint
Version:6.x-2.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:fixed
Description

Will Blueprint 6.x-1.x-dev display site logo?

I configured the admin. settings to display a logo, but it won't show up. So I looked at the Blueprint files and can't find any support for this common feature.

#1

designerbrent - October 28, 2008 - 18:59
Status:active» needs review

You are correct. Currently the $logo variable is not included in the php. That attached patch will do it. However if there is no logo.png file in the theme folder, it will give either a broken image icon or just display the alt text (Firefox).

@m3avrck: Should we just add a logo.png of the Drupal logo to the package?

AttachmentSize
blueprint_add_logo.patch 1.57 KB

#2

fm - November 16, 2008 - 19:19

The first hunk fails ... apparently it is trying to modify part of the code that has already changed.

Second hunk patches successfully. It would be nice to see this code make it into the official release.

#3

designerbrent - November 16, 2008 - 20:33

The first hunk shouldn't have been there. Here is an updated version.

AttachmentSize
blueprint_add_logo.patch 1.28 KB

#4

designerbrent - November 17, 2008 - 13:42
Status:needs review» by design

On further though, I am going to mark this a 'By Design'.

The preferred way to add a logo to the design is to do it in the CSS was a background image. An example of the way I typically do it is as follows:

h1 a{
width: [width of logo];
height: [height of logo];
display:block;
text-indent: -99999em;
background: url(images/logo.png) no-repeat left top;
}

What this ends up doing is removing the text title of the site, and replacing it with a background image of the logo that is still linked to the homepage of the site.

Hope that helps.

Brent

#5

otosi - April 28, 2009 - 23:17

Thanks Brent, this just answered a question I had as well.

Note for others: the URL path to the logo in the CSS to images might also be ../images/logo.png - at least that's what it was in my case.

Otosi

#6

amorfati - August 21, 2009 - 05:25
Status:by design» active

I hate to re-open a "by design" issue, but I don't believe #4 to be accurate.

According to Matt Cutts, head of Google's Webspam and Search Quality team, the preferred way is to add the logo as an image in the HTML and use the alt attribute to store the logo text. He specifically, and exacerbatingly, rejects the text-indent/CSS method in one of his Q&A videos: http://www.youtube.com/watch?v=fBLvn_WkDJ4

If Google strongly recommends not using CSS techniques for displaying the logo, it could adversely affect those who implement the blueprint theme according to the documentation.

#7

drew reece - August 26, 2009 - 04:40

I think mark has a good point in #6. The 'CSS image replacement' is working against the standard Drupal theme code that inserts the image as html. It basically breaks the core logo feature. A CSS logo also won't be printed, unlike an inline html image.

#8

fm - October 21, 2009 - 13:32

I agree with Mark and Drew in #6 and #7 respectively. While I have implemented Brent's recommendation from #4, it has complicated updates and multisite management. I would prefer a solution that conformed to the Drupal system and didn't require me to customize code every time I updated this theme.

#9

drew reece - October 21, 2009 - 14:19

If the 'correct way' is via CSS as used in #4 then surely the module should be performing a drupal_add_css() rule that dynamically adds the logo path to the logo assigned in the Drupal theme settings. This would mean that the standard way to assign the logo in admin/build/themes/settings still isn't broken by this theme. I don't really think this is the way to get the original functionality back.

I personally think it should just be printed in the page.tpl. CSS best practice is changing constantly and is often a philosophical argument, eg should you use text-indent:-99999px; or display:none to hide.

If people are using this theme you can assume they have some desire to do additional theming via CSS as required, so they can take the logo out if required.

@fm if you are creating a subtheme you don't need to worry about this issue, you have your own copy of the page.tpl to print whatever you need, so upgrading the theme is fine.

#10

designerbrent - October 21, 2009 - 16:24

Ok... I just watched the Matt Cutts video for the first time and can see that my current method of site building may be a bit out-dated. (How in the world does that happen?!)

@fm: Sub-themes are certainly the way to go on updates. I do realize that in the past that was much harder, However with the release of the 1.3 version of the theme, that should be better and the subtheme function names shouldn't clash as before.

One possibility is to enable the upload form and add a radio button to select the method for logo inclusion? (Inline image tag vs. CSS) The real problem with the CSS method is that to do it in code we will have to generate the css code inline on each page, thereby negating the gains of actually using CSS code in once place.

The other option would be to just enable it in the subtheme.

I'll be working soon to add more options to the base theme and then to actually publish a sample starter theme that you can customize to your needs. That way when the actual Blueprint theme is updated, your sub-theme won't have to change much.

#11

grateful_drupal_user - November 14, 2009 - 22:50

subscribe

#12

designerbrent - December 7, 2009 - 23:26
Version:6.x-1.x-dev» 6.x-2.x-dev

I'm moving this into the 2.x line as this is something that will be addressed soon.

#13

designerbrent - December 8, 2009 - 00:37

This has now been committed to the 2.x branch: http://drupal.org/cvs?commit=299338

#14

designerbrent - December 8, 2009 - 00:38
Status:active» fixed
 
 

Drupal is a registered trademark of Dries Buytaert.