mirror of
https://github.com/e107inc/e107.git
synced 2025-07-09 09:13:25 +02:00
Merge pull request #2295 from Jimmi08/master
cdn versions for boostrap script
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
* Released under the terms and conditions of the
|
* Released under the terms and conditions of the
|
||||||
* GNU General Public License (http://gnu.org).
|
* GNU General Public License (http://gnu.org).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
define("BOOTSTRAP", 3);
|
define("BOOTSTRAP", 3);
|
||||||
@ -21,30 +21,29 @@ e107::css('theme', 'css/animate.min.css');
|
|||||||
e107::css('theme', 'css/ionicons.min.css');
|
e107::css('theme', 'css/ionicons.min.css');
|
||||||
e107::css('theme', 'css/styles.css');
|
e107::css('theme', 'css/styles.css');
|
||||||
|
|
||||||
//e107::js("footer", 'https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js', 'jquery', 2);
|
|
||||||
e107::js("theme", "js/bootstrap.min.js", 'jquery');
|
$cndPref = e107::pref('theme', 'cdn','cdnjs');
|
||||||
e107::js("theme", "js/jquery.easing.min.js", 'jquery');
|
|
||||||
e107::js("theme", "js/wow.js", 'jquery');
|
switch($cndPref)
|
||||||
e107::js("theme", "js/scripts.js", 'jquery');
|
{
|
||||||
|
case "jsdelivr":
|
||||||
|
e107::js("footer", "https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js", 'jquery');
|
||||||
|
e107::js("footer", "https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js", 'jquery');
|
||||||
|
break;
|
||||||
|
case "localhost":
|
||||||
|
e107::js("theme", "js/bootstrap.min.js", 'jquery');
|
||||||
|
e107::js("theme", "js/jquery.easing.min.js", 'jquery');
|
||||||
|
break;
|
||||||
|
case "cdnjs":
|
||||||
|
default:
|
||||||
|
e107::js("footer", "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js", 'jquery', 2);
|
||||||
|
e107::js("footer", "https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js", 'jquery', 2);
|
||||||
|
|
||||||
/* theme plugin is needed for this */
|
|
||||||
$inlinecss = e107::pref('landingzero', 'inlinecss');
|
|
||||||
if($inlinecss) {
|
|
||||||
e107::css("inline", $inlinecss);
|
|
||||||
}
|
}
|
||||||
$inlinejs = e107::pref('landingzero', 'inlinejs');
|
e107::js("theme", "js/wow.js", 'jquery');
|
||||||
if($inlinejs) {
|
e107::js("theme", "js/scripts.js", 'jquery');
|
||||||
e107::js("footer-inline", $inlinejs);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* NOTE: with future update from original css not forget remove hardcoded image from style.css */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* video settings */
|
|
||||||
$default = e107::getParser()->parseTemplate('{SITELOGO}');
|
|
||||||
|
|
||||||
|
|
||||||
$videomobilehide = e107::pref('landingzero', 'videomobilehide');
|
$videomobilehide = e107::pref('landingzero', 'videomobilehide');
|
||||||
|
@ -15,7 +15,9 @@ class theme_config implements e_theme_config
|
|||||||
'videomobilebackground' => array('title' => 'Image background for mobile devices', 'type'=>'image', 'help'=>''),
|
'videomobilebackground' => array('title' => 'Image background for mobile devices', 'type'=>'image', 'help'=>''),
|
||||||
'videoposter' => array('title' => 'First frame of video [1920x1080px]', 'type'=>'image', 'help'=>''),
|
'videoposter' => array('title' => 'First frame of video [1920x1080px]', 'type'=>'image', 'help'=>''),
|
||||||
'videourl' => array('title' => 'URL path to header video in mp4 format', 'type'=>'text', 'writeParms'=>array('size'=>'xxlarge'),'help'=>''),
|
'videourl' => array('title' => 'URL path to header video in mp4 format', 'type'=>'text', 'writeParms'=>array('size'=>'xxlarge'),'help'=>''),
|
||||||
'usernav_placement' => array('title' => 'Signup/Login Placement', 'type'=>'dropdown', 'writeParms'=>array('optArray'=>array('top', 'bottom'), 'useValues'=>1))
|
'usernav_placement' => array('title' => 'Signup/Login Placement', 'type'=>'dropdown', 'writeParms'=>array('optArray'=>array('top', 'bottom'), 'useValues'=>1)),
|
||||||
|
'cdn' => array('title' => 'CDN', 'type'=>'dropdown',
|
||||||
|
'writeParms'=>array('optArray'=>array( 'cdnjs' => 'CDNJS (Cloudflare)', 'jsdelivr' => 'jsDelivr', 'local' => 'Local folder')))
|
||||||
);
|
);
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
|
Reference in New Issue
Block a user