Skip to content

Commit

Permalink
fixed less php fatal error & added container width option
Browse files Browse the repository at this point in the history
  • Loading branch information
kawshar committed Dec 12, 2021
1 parent 9dce80d commit 148c3dc
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 921 deletions.
2 changes: 2 additions & 0 deletions language/en-GB/en-GB.tpl_shaper_helix3.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ HELIX_HIDE="Hide"
JDETAILS="<i class='fa fa-home'></i>Basic"

HELIX_GLOBAL="Global"
HELIX_CONTAINER_WIDTH="Container Width"
HELIX_CONTAINER_WIDTH_DESC="Select the container width from the list"
HELIX_PRELOADER="Preloader"
HELIX_PRELOADER_DESC="Yes to enable preloader"
HELIX_PRELOADER_ANIMATION="Preloader Animation"
Expand Down
2 changes: 1 addition & 1 deletion plugins/ajax/helix3/helix3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://www.joomshaper.com</authorUrl>
<version>3.0.0</version>
<version>3.0.1</version>
<description>Helix3 Framework - Joomla Template Framework by JoomShaper</description>

<updateservers>
Expand Down
6 changes: 3 additions & 3 deletions plugins/system/helix3/core/classes/lessc.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,7 @@ protected function get($name) {
// inject array of unparsed strings into environment as variables
protected function injectVariables($args) {
$this->pushEnv();
$parser = new lessc_parser($this, __METHOD__);
$parser = new helix3_lessc_parser($this, __METHOD__);
foreach ($args as $name => $strValue) {
if ($name[0] !== '@') {
$name = '@' . $name;
Expand Down Expand Up @@ -2139,7 +2139,7 @@ public function parse($str = null, $initialVariables = null) {
}

protected function makeParser($name) {
$parser = new lessc_parser($this, $name);
$parser = new helix3_lessc_parser($this, $name);
$parser->writeComments = $this->preserveComments;

return $parser;
Expand Down Expand Up @@ -2377,7 +2377,7 @@ public static function cexecute($in, $force = false, $less = null) {

// responsible for taking a string of LESS code and converting it into a
// syntax tree
class lessc_parser {
class helix3_lessc_parser {
protected static $nextBlockId = 0; // used to uniquely identify blocks

protected static $precedence = array(
Expand Down
19 changes: 15 additions & 4 deletions plugins/system/helix3/core/helix3.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,27 +272,38 @@ public static function getColXsNo($col_name)

public static function generatelayout()
{

self::getInstance()->addCSS('custom.css');
self::getInstance()->addJS('custom.js');

$doc = JFactory::getDocument();
$app = JFactory::getApplication();
$option = $app->input->get('option', '');
$view = $app->input->get('view', '');
$layout = $app->input->get('layout', '');
$layout = $app->input->get('layout', '');
$pagebuilder = false;
$params = JFactory::getApplication()->getTemplate(true)->params;

if ($option == 'com_sppagebuilder')
{
$doc->addStylesheet(JURI::base(true) . '/plugins/system/helix3/assets/css/pagebuilder.css');
$pagebuilder = true;
}

// add container width
$container_width = (int) $params->get('container_width', 1140);
if ($container_width == 1140)
{
$container_css = "@media (min-width: 1400px) {\n";
$container_css .= ".container {\n";
$container_css .= "max-width: 1140px;\n";
$container_css .= "}\n";
$container_css .= "}";

self::getInstance()->addInlineCSS($container_css);
}

//Import Features
self::importFeatures();

$params = JFactory::getApplication()->getTemplate(true)->params;
$rows = json_decode($params->get('layout'));

//Load from file if not exists in database
Expand Down
2 changes: 1 addition & 1 deletion plugins/system/helix3/helix3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://www.joomshaper.com</authorUrl>
<version>3.0.0</version>
<version>3.0.1</version>
<description>Helix3 Framework - Joomla Template Framework by JoomShaper</description>

<updateservers>
Expand Down
Loading

0 comments on commit 148c3dc

Please sign in to comment.