Hey
Is it possible to include a diffrent (smaller) Logo for the mobile layout? When the page is visited on an iPhone the Logo is to big and the button for the menu skips to the next line.
Website: wnsl.biz/columba3
Thanks
#gkLogo {
width:22%;
}
#gkLogo img {
max-width:100%;
height:auto;
}
Konrad M wrote:Hi,
you can try set 'Logo type' option to image in 'Features section' of template settings. Then upload your image and try add to override.css
- Code: Select all
#gkLogo {
width:22%;
}
#gkLogo img {
max-width:100%;
height:auto;
}
This should make your logo responsive. Remember to enable override.css option in template settings.
<a href="<?php echo JURI::root(); ?> " id="gkLogo" class="cssLogo"><?php echo $this->API->get('logo_text', ''); ?></a>
<a href="<?php echo JURI::root(); ?> " id="gkLogo" class="cssLogo <?php if($this->browser->get("tablet") == true || $this->browser->get("mobile") == true) echo ' mobileLogo'; ?>"><?php echo $this->API->get('logo_text', ''); ?></a>
#gkLogo.cssLogo.mobileLogo {
background: url("../images/mobile_logo.png") top left no-repeat;
height: 175px;
width: 198px;
}
Konrad M wrote:Please try go to layouts/blocks/logo.php and find:
- Code: Select all
<a href="<?php echo JURI::root(); ?> " id="gkLogo" class="cssLogo"><?php echo $this->API->get('logo_text', ''); ?></a>
and chamge it to:
- Code: Select all
<a href="<?php echo JURI::root(); ?> " id="gkLogo" class="cssLogo <?php if($this->browser->get("tablet") == true || $this->browser->get("mobile") == true) echo ' mobileLogo'; ?>"><?php echo $this->API->get('logo_text', ''); ?></a>
Then please add to override.css
- Code: Select all
#gkLogo.cssLogo.mobileLogo {
background: url("../images/mobile_logo.png") top left no-repeat;
height: 175px;
width: 198px;
}
and set width and height as same as your logo dimensions. Remember to upload your image to images folder inside template folder and enable override.css option in template settings.
Konrad M wrote:Please try go to layouts/blocks/logo.php and find:
- Code: Select all
<a href="<?php echo JURI::root(); ?> " id="gkLogo" class="cssLogo"><?php echo $this->API->get('logo_text', ''); ?></a>
and chamge it to:
- Code: Select all
<a href="<?php echo JURI::root(); ?> " id="gkLogo" class="cssLogo <?php if($this->browser->get("tablet") == true || $this->browser->get("mobile") == true) echo ' mobileLogo'; ?>"><?php echo $this->API->get('logo_text', ''); ?></a>
Then please add to override.css
- Code: Select all
#gkLogo.cssLogo.mobileLogo {
background: url("../images/mobile_logo.png") top left no-repeat;
height: 175px;
width: 198px;
}
and set width and height as same as your logo dimensions. Remember to upload your image to images folder inside template folder and enable override.css option in template settings.
<?php
// No direct access.
defined('_JEXEC') or die;
$altlogo_image = $this->API->get('altlogo_image', '');
if(($altlogo_image == '') || ($this->API->get('logo_type', '') == 'css')) {
$altlogo_image = $this->API->URLtemplate() . '/images/altlogo.png';
} else {
$altlogo_image = $this->API->URLbase() . $altlogo_image;
}
$altlogo_text = $this->API->get('altlogo_text', '');
$altlogo_slogan = $this->API->get('altlogo_slogan', '');
?>
<?php if ($this->API->get('altlogo_type', 'image')!=='none'): ?>
<?php if($this->API->get('altlogo_type', 'image') == 'css') : ?>
<a href="<?php echo JURI::root(); ?>" id="gkLogo" class="cssLogo"><?php echo $this->API->get('altlogo_text', ''); ?></a>
<?php elseif($this->API->get('altlogo_type', 'image')=='text') : ?>
<a href="<?php echo JURI::root(); ?>" id="gkLogo" class="text">
<span><?php echo $this->API->get('altlogo_text', ''); ?></span>
<small class="gkLogoSlogan"><?php echo $this->API->get('altlogo_slogan', ''); ?></small>
</a>
<?php elseif($this->API->get('altlogo_type', 'image')=='image') : ?>
<a href="<?php echo JURI::root(); ?>" id="gkLogo">
<img src="<?php echo $altlogo_image; ?>" alt="<?php echo $this->API->getPageName(); ?>" />
</a>
<?php endif; ?>
<?php endif; ?>
<field name="logo_slogan" type="text" default="" label="TPL_GK_LANG_LOGO_SLOGAN" description="TPL_GK_LANG_LOGO_SLOGAN_DESC" />
<field name="altlogo_type" type="list" default="image" label="TPL_GK_LANG_LOGO_TYPE" description="TPL_GK_LANG_LOGO_TYPE_DESC">
<option value="image">TPL_GK_LANG_LOGO_TYPE_IMAGE</option>
<option value="text">TPL_GK_LANG_LOGO_TYPE_TEXT</option>
<option value="css">TPL_GK_LANG_LOGO_TYPE_CSS</option>
<option value="none">TPL_GK_LANG_LOGO_TYPE_NONE</option>
</field>
<field name="altlogo_image" type="media" default="" label="TPL_GK_LANG_LOGO_IMAGE" description="TPL_GK_LANG_LOGO_IMAGE_DESC" />
<field name="altlogo_text" type="text" default="" label="TPL_GK_LANG_LOGO_TEXT" description="TPL_GK_LANG_LOGO_TEXT_DESC" />
<field name="altlogo_slogan" type="text" default="" label="TPL_GK_LANG_LOGO_SLOGAN" description="TPL_GK_LANG_LOGO_SLOGAN_DESC" />
<?php $this->layout->loadBlock('logo'); ?>
<?php $this->layout->loadBlock('altlogo'); ?>