Skip to content

Commit

Permalink
Added UIkit v3-beta.35
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Nov 18, 2017
1 parent fe13211 commit 5d13a02
Show file tree
Hide file tree
Showing 9 changed files with 35,495 additions and 1 deletion.
12,344 changes: 12,344 additions & 0 deletions public_html/vendor/uikit3/css/uikit-rtl.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public_html/vendor/uikit3/css/uikit-rtl.min.css

Large diffs are not rendered by default.

12,344 changes: 12,344 additions & 0 deletions public_html/vendor/uikit3/css/uikit.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public_html/vendor/uikit3/css/uikit.min.css

Large diffs are not rendered by default.

262 changes: 262 additions & 0 deletions public_html/vendor/uikit3/js/uikit-icons.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions public_html/vendor/uikit3/js/uikit-icons.min.js

Large diffs are not rendered by default.

10,491 changes: 10,491 additions & 0 deletions public_html/vendor/uikit3/js/uikit.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions public_html/vendor/uikit3/js/uikit.min.js

Large diffs are not rendered by default.

47 changes: 46 additions & 1 deletion system/classes/Resource.php
Expand Up @@ -97,6 +97,11 @@ class Resource
*/
private $useUIkit = false;

/**
* @var bool
*/
private $useUIkit3 = false;

/**
* @var string
*/
Expand Down Expand Up @@ -158,6 +163,8 @@ class Resource
'uikit.timepicker' => '/vendor/uikit/js/components/timepicker.min.js',
'uikit.tooltip' => '/vendor/uikit/js/components/tooltip.min.js',
'uikit.upload' => '/vendor/uikit/js/components/upload.min.js',
'uikit3' => '/vendor/uikit3/js/uikit.min.js',
'uikit3-icons' => '/vendor/uikit3/js/uikit-icons.min.js',
);

/**
Expand Down Expand Up @@ -408,6 +415,17 @@ public function setJavaScriptLibrary($name, $isFooter = true)
return true;
break;

case 'uikit3':
if ($this->useUIkit3) {
// Already used
return true;
}

$this->useUIkit3 = true;

return true;
break;

default:
$this->localJsFiles[$position][] = array(
'file' => $this->libraryLocations[$name],
Expand Down Expand Up @@ -890,6 +908,25 @@ private function makeTagsForSystemLibraries($isFooter = true)
$retval .= PHP_EOL;
}

// UIkit3
if (!$isFooter && $this->useUIkit3) {
if ($this->config['cdn_hosted']) {
$retval .= sprintf(
self::JS_TAG_TEMPLATE,
sprintf(self::UIKIT3_CDN, self::UIKIT3_VERSION)
);
} else {
$retval .= sprintf(
self::JS_TAG_TEMPLATE,
$this->config['site_url'] . $this->libraryLocations['uikit3']
)
. PHP_EOL
. sprintf(self::JS_TAG_TEMPLATE, $this->libraryLocations['uikit3-icons']);
}

$retval .= PHP_EOL;
}

return $retval;
}

Expand All @@ -900,7 +937,7 @@ private function makeTagsForSystemLibraries($isFooter = true)
*/
public function getHeader()
{
global $MESSAGE;
global $LANG_DIRECTION, $MESSAGE;

$retval = PHP_EOL;
$this->isHeaderSet = true;
Expand Down Expand Up @@ -940,6 +977,14 @@ public function getHeader()
'priority' => self::JQUERY_UI_PRIORITY + 30,
),
);
} elseif ($this->useUIkit3) {
$cssFileName = (isset($LANG_DIRECTION) && ($LANG_DIRECTION === 'rtl')) ? 'uikit-rtl' : 'uikit';
$cssFiles = array(
array(
'file' => '/vendor/uikit3/css/' . $cssFileName . '.min.css',
'priority' => self::UIKIT3_PRIORITY,
),
);
}

// 3. Local CSS files
Expand Down

0 comments on commit 5d13a02

Please sign in to comment.