mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Basic Bootstrap 4 library support. Bootstrap4 theme added for testing purposes only.
This commit is contained in:
@@ -981,7 +981,7 @@ if (!class_exists('e107table', false))
|
|||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
// $this->themeClass = e107::getPref('sitetheme')."_theme"; // disabled at the moment.
|
$this->themeClass = e107::getPref('sitetheme')."_theme"; // disabled at the moment.
|
||||||
$this->adminThemeClass = e107::getPref('admintheme')."_admintheme"; // Check for a class.
|
$this->adminThemeClass = e107::getPref('admintheme')."_admintheme"; // Check for a class.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -293,7 +293,7 @@ class core_library
|
|||||||
),
|
),
|
||||||
'files' => array(
|
'files' => array(
|
||||||
'js' => array(
|
'js' => array(
|
||||||
'dist/js/bootstrap.min.js' => array(
|
'dist/js/bootstrap.bundle.min.js' => array(
|
||||||
'zone' => 2,
|
'zone' => 2,
|
||||||
'type' => 'footer',
|
'type' => 'footer',
|
||||||
),
|
),
|
||||||
@@ -325,7 +325,8 @@ class core_library
|
|||||||
|
|
||||||
),
|
),
|
||||||
// Override library path to CDN.
|
// Override library path to CDN.
|
||||||
'library_path' => 'https://cdn.jsdelivr.net/npm/bootstrap-beta@4.0.0-beta',
|
// https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.bundle.min.js
|
||||||
|
'library_path' => 'https://cdn.jsdelivr.net/npm/bootstrap@4.0.0',
|
||||||
'path' => '',
|
'path' => '',
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -334,19 +335,19 @@ class core_library
|
|||||||
'name' => 'Bootstrap 4 (local)',
|
'name' => 'Bootstrap 4 (local)',
|
||||||
'vendor_url' => 'http://getbootstrap.com/',
|
'vendor_url' => 'http://getbootstrap.com/',
|
||||||
'version_arguments' => array(
|
'version_arguments' => array(
|
||||||
'file' => 'dist/js/bootstrap.min.js',
|
'file' => 'js/bootstrap.bundle.min.js',
|
||||||
'pattern' => '/Bootstrap\s+v(\d\.\d\.\d+)/',
|
'pattern' => '/Bootstrap\s+v(\d\.\d\.\d+)/',
|
||||||
'lines' => 5,
|
'lines' => 5,
|
||||||
),
|
),
|
||||||
'files' => array(
|
'files' => array(
|
||||||
'js' => array(
|
'js' => array(
|
||||||
'dist/js/bootstrap.min.js' => array(
|
'js/bootstrap.bundle.min.js' => array(
|
||||||
'zone' => 2,
|
'zone' => 2,
|
||||||
'type' => 'footer',
|
'type' => 'footer',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'css' => array(
|
'css' => array(
|
||||||
'dist/css/bootstrap.min.css' => array(
|
'css/bootstrap.min.css' => array(
|
||||||
'zone' => 2,
|
'zone' => 2,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -356,13 +357,13 @@ class core_library
|
|||||||
'dev' => array(
|
'dev' => array(
|
||||||
'files' => array(
|
'files' => array(
|
||||||
'js' => array(
|
'js' => array(
|
||||||
'dist/js/bootstrap.js' => array(
|
'js/bootstrap.bundle.js' => array(
|
||||||
'zone' => 2,
|
'zone' => 2,
|
||||||
'type' => 'footer',
|
'type' => 'footer',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'css' => array(
|
'css' => array(
|
||||||
'dist/css/bootstrap.css' => array(
|
'css/bootstrap.css' => array(
|
||||||
'zone' => 2,
|
'zone' => 2,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -370,7 +371,7 @@ class core_library
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
'library_path' => '{e_WEB}lib/bootstrap',
|
'library_path' => '{e_WEB}lib/bootstrap',
|
||||||
'path' => '4.0.0-beta',
|
'path' => '4',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@@ -114,6 +114,16 @@ class e_theme
|
|||||||
// If no scope set, we load library on both areas.
|
// If no scope set, we load library on both areas.
|
||||||
if(empty($library['scope']) || $library['scope'] === 'all')
|
if(empty($library['scope']) || $library['scope'] === 'all')
|
||||||
{
|
{
|
||||||
|
if($library['name'] === 'bootstrap' && varset($library['version']) == 4) // quick fix.
|
||||||
|
{
|
||||||
|
$library['name'] .= '4';
|
||||||
|
|
||||||
|
if(!defined('BOOTSTRAP'))
|
||||||
|
{
|
||||||
|
define('BOOTSTRAP', 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
e107::library('load', $library['name']);
|
e107::library('load', $library['name']);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -695,6 +705,7 @@ class e_theme
|
|||||||
{
|
{
|
||||||
$vars['library'][] = array(
|
$vars['library'][] = array(
|
||||||
'name' => $val['@attributes']['name'],
|
'name' => $val['@attributes']['name'],
|
||||||
|
'version' => varset($val['@attributes']['version']),
|
||||||
'scope' => varset($val['@attributes']['scope']),
|
'scope' => varset($val['@attributes']['scope']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
4
e107_themes/bootstrap4/style.css
Normal file
4
e107_themes/bootstrap4/style.css
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/* CUSTOM Responsive Styles */
|
||||||
|
|
1545
e107_themes/bootstrap4/theme.php
Normal file
1545
e107_themes/bootstrap4/theme.php
Normal file
File diff suppressed because it is too large
Load Diff
29
e107_themes/bootstrap4/theme.xml
Normal file
29
e107_themes/bootstrap4/theme.xml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<e107Theme name="Bootstrap 4" version="1.0" date="2018-03-08" compatibility="2.0">
|
||||||
|
<author name ="e107 Inc" email="e107inc@something.com" url="http://e107.org" />
|
||||||
|
<summary>Bootstrap4 generic theme (under development)</summary>
|
||||||
|
<description>For testing only</description>
|
||||||
|
<category>generic</category>
|
||||||
|
<plugins>
|
||||||
|
<plugin name='rss_menu' url='core' />
|
||||||
|
<plugin name='social' url='core' />
|
||||||
|
</plugins>
|
||||||
|
<keywords>
|
||||||
|
<word>bootstrap</word>
|
||||||
|
<word>clean</word>
|
||||||
|
</keywords>
|
||||||
|
<libraries>
|
||||||
|
<library name="bootstrap" version="4" scope="all"/>
|
||||||
|
<library name="fontawesome" scope="all"/>
|
||||||
|
</libraries>
|
||||||
|
<stylesheets>
|
||||||
|
<css file="style.css" name="Default"/>
|
||||||
|
<css file="*" name="*"/>
|
||||||
|
</stylesheets>
|
||||||
|
<layouts>
|
||||||
|
<layout name='test' title='Test' default='true' />
|
||||||
|
<layout name='default' title='Default' />
|
||||||
|
<layout name='home' title='Home' />
|
||||||
|
<layout name='full' title='Full' />
|
||||||
|
</layouts>
|
||||||
|
</e107Theme>
|
37
e107_themes/bootstrap4/theme_config.php
Normal file
37
e107_themes/bootstrap4/theme_config.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
|
//e107::lan('theme', 'admin',true);
|
||||||
|
|
||||||
|
// Theme Configuration File.
|
||||||
|
class theme_config implements e_theme_config
|
||||||
|
{
|
||||||
|
|
||||||
|
function config($type='front')
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function help()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Custom Methods
|
||||||
|
class theme_config_form extends e_form
|
||||||
|
{
|
||||||
|
|
||||||
|
function custom_method($value,$mode,$parms) // named the same as $fields key.(eg. 'branding') Used when type = 'method'
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->text('custom_method', $value);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
26
e107_themes/bootstrap4/theme_shortcodes.php
Normal file
26
e107_themes/bootstrap4/theme_shortcodes.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* e107 website system
|
||||||
|
*
|
||||||
|
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||||
|
* Released under the terms and conditions of the
|
||||||
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
|
*
|
||||||
|
* e107 Bootstrap Theme Shortcodes.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class theme_shortcodes extends e_shortcode
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
8975
e107_web/lib/bootstrap/4/css/bootstrap.css
vendored
Normal file
8975
e107_web/lib/bootstrap/4/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
e107_web/lib/bootstrap/4/css/bootstrap.min.css
vendored
Normal file
7
e107_web/lib/bootstrap/4/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
6328
e107_web/lib/bootstrap/4/js/bootstrap.bundle.js
vendored
Normal file
6328
e107_web/lib/bootstrap/4/js/bootstrap.bundle.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
e107_web/lib/bootstrap/4/js/bootstrap.bundle.min.js
vendored
Normal file
7
e107_web/lib/bootstrap/4/js/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user