StephenOTT / test4

0 stars 0 forks source link

Site slogan not appearing correctly (2134053) #63

Closed StephenOTT closed 10 years ago

StephenOTT commented 10 years ago

Looking at the working examples for the various themes, it seems that the site slogan needs a bit of touch-up work.

I only see a slogan displaying for the base and WET themes. It doesn't seem to have a home in any of the others. So should it be removed from those other themes completely? And for the two themes that do have it, it is not displaying in the correct place.

For example, on the WET theme it is within a <small> tag:

<div id="wet-title">
  <p id="wet-title-in">
    <a href="../index-en.html" class="ui-link">
      <object data="../../dist/theme-wet-boew/images/logo.svg" role="img" tabindex="-1" type="image/svg+xml">
        <img src="../../dist/theme-wet-boew/images/logo.png" alt="">
      </object>
      <span>Web Experience Toolkit&nbsp;(WET)
        <small>Collaborative open source project led by the Government of Canada</small>
      </span>
    </a>
  </p>
</div>

But in the WetKit it is within an <h2> tag:
<div id="wet-title">
  <p id="wet-title-in">
    <a href="/demo" class="ui-link">
      <object id="header-logo" data="/wetkit/profiles/wetkit/libraries/wet-boew/dist/theme-wet-boew/images/logo.svg" role="img" tabindex="-1" type="image/svg+xml">
        <img alt="WxT Logo" src="/wetkit/profiles/wetkit/libraries/wet-boew/dist/theme-wet-boew/images/logo.png">
      </object>
      <span>Web Experience Toolkit</span>
    </a>
  </p>
  <h2 class="site-slogan">Collaborative open source project led by the Government of Canada</h2>
</div>

This would be an easy fix if not for the way the $site_name is handled in page.preprocess.inc:

<?php
   
// Site Name logic.
   
if (!empty($variables['site_name'])) {
     
$variables['site_frontpage'] = '/' . variable_get('site_frontpage', 'node');
      if (!
$is_logo_rendered) {
       
$variables['site_name'] = '<span class="no-logo">' . $variables['site_name_title'] . '</span>';
      }
      else {
       
$variables['site_name'] = '<span>' . $variables['site_name_title'] . '</span>';
      }
?>

What has to be done is get the $site_slogan in right after the $site_name_title but before the closing </span> tag without messing up the usual access to the $site_slogan variable from the template pages.


To See Full Issue Go to: https://drupal.org/node/2134053

Issue Originally Created By: rob_johnston at November 12, 2013 at 1:58pm
Component: Code
Version: 7.x-1.0-rc24
Priority: Minor
Category: Bug report
Status: Closed (fixed)
Drupal Issue Node ID: 2134053
StephenOTT commented 10 years ago

Automated Close Message...
Close Code: Closed (fixed)