|
Server : Apache System : Linux vps.urbanovitalino.adv.br 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 User : urbanovitalinoad ( 1001) PHP Version : 7.3.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/urbanovitalinoad/public_html/controlpatri/templates/shaper_helix3/features/ |
Upload File : |
<?php
/**
* @package Helix3 Framework
* @author JoomShaper https://www.joomshaper.com
* @copyright (c) 2010 - 2021 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/
//no direct accees
defined ('_JEXEC') or die('resticted aceess');
class Helix3FeatureLogo {
private $helix3;
public $position;
public function __construct( $helix3 ){
$this->helix3 = $helix3;
$this->position = $this->helix3->getParam('logo_position', 'logo');
$this->load_pos = $this->helix3->getParam('logo_load_pos');
}
public function renderFeature()
{
//Retina Image
if( $this->helix3->getParam('logo_type') == 'image' ) {
jimport('joomla.image.image');
if( $this->helix3->getParam('logo_image') ) {
$path = JPATH_ROOT . '/' . $this->helix3->getParam('logo_image');
} else {
$path = JPATH_ROOT . '/templates/' . $this->helix3->getTemplate() . '/images/presets/' . $this->helix3->Preset() . '/logo.png';
}
if(file_exists($path)) {
$image = new JImage( $path );
$width = $image->getWidth();
$height = $image->getHeight();
} else {
$width = '';
$height = '';
}
}
$html = '';
$custom_logo_class = '';
$sitename = JFactory::getApplication()->get('sitename');
if( $this->helix3->getParam('mobile_logo') ) {
$custom_logo_class = ' d-none d-lg-block';
}
if( $this->helix3->getParam('logo_type') == 'image' ) {
if( $this->helix3->getParam('logo_image') ) {
$html .= '<div class="logo">';
$html .= '<a href="' . JURI::base(true) . '/">';
$html .= '<img class="sp-default-logo'. $custom_logo_class .'" src="' . $this->helix3->getParam('logo_image') . '" srcset="'. ($this->helix3->getParam('logo_image_2x') ? $this->helix3->getParam('logo_image_2x') . ' 2x' : '') .'" alt="'. $sitename .'">';
if( $this->helix3->getParam('mobile_logo') ) {
$html .= '<img class="sp-default-logo d-block d-lg-none" src="' . $this->helix3->getParam('mobile_logo') . '" alt="'. $sitename .'">';
}
$html .= '</a>';
$html .= '</div>';
} else {
$html .= '<div class="logo">';
$html .= '<a href="' . JURI::base(true) . '/">';
$html .= '<img class="sp-default-logo'. $custom_logo_class .'" src="' . $this->helix3->getTemplateUri() . '/images/presets/' . $this->helix3->Preset() . '/logo.png" alt="'. $sitename .'">';
if( $this->helix3->getParam('mobile_logo') ) {
$html .= '<img class="sp-default-logo d-block d-lg-none" src="' . $this->helix3->getParam('mobile_logo') . '" alt="'. $sitename .'">';
}
$html .= '</a>';
$html .= '</div>';
}
} else {
if( $this->helix3->getParam('logo_text') ) {
$html .= '<h1 class="logo"> <a href="' . JURI::base(true) . '/">' . $this->helix3->getParam('logo_text') . '</a></h1>';
} else {
$html .= '<h1 class="logo"> <a href="' . JURI::base(true) . '/">' . $sitename . '</a></h1>';
}
if( $this->helix3->getParam('logo_slogan') ) {
$html .= '<p class="logo-slogan">' . $this->helix3->getParam('logo_slogan') . '</p>';
}
}
return $html;
}
}