Skip to content

Commit

Permalink
[BS5] include dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddleSpl0it committed Mar 30, 2022
1 parent 36944f8 commit c1792df
Show file tree
Hide file tree
Showing 39 changed files with 316,546 additions and 27 deletions.
458 changes: 458 additions & 0 deletions data/web/css/build/003-bootstrap-select.css

Large diffs are not rendered by default.

1,704 changes: 1,704 additions & 0 deletions data/web/css/build/013-bootstrap-icons.css

Large diffs are not rendered by default.

11,427 changes: 11,427 additions & 0 deletions data/web/css/themes/cerulean-bootstrap.css

Large diffs are not rendered by default.

10,997 changes: 10,997 additions & 0 deletions data/web/css/themes/cosmo-bootstrap.css

Large diffs are not rendered by default.

11,411 changes: 11,411 additions & 0 deletions data/web/css/themes/cyborg-bootstrap.css

Large diffs are not rendered by default.

11,348 changes: 11,348 additions & 0 deletions data/web/css/themes/darkly-bootstrap.css

Large diffs are not rendered by default.

11,340 changes: 11,340 additions & 0 deletions data/web/css/themes/flatly-bootstrap.css

Large diffs are not rendered by default.

11,312 changes: 11,312 additions & 0 deletions data/web/css/themes/journal-bootstrap.css

Large diffs are not rendered by default.

11,433 changes: 11,433 additions & 0 deletions data/web/css/themes/litera-bootstrap.css

Large diffs are not rendered by default.

11,560 changes: 11,560 additions & 0 deletions data/web/css/themes/lumen-bootstrap.css

Large diffs are not rendered by default.

11,108 changes: 11,108 additions & 0 deletions data/web/css/themes/lux-bootstrap.css

Large diffs are not rendered by default.

12,431 changes: 12,431 additions & 0 deletions data/web/css/themes/materia-bootstrap.css

Large diffs are not rendered by default.

11,386 changes: 11,386 additions & 0 deletions data/web/css/themes/minty-bootstrap.css

Large diffs are not rendered by default.

11,949 changes: 11,949 additions & 0 deletions data/web/css/themes/morph-bootstrap.css

Large diffs are not rendered by default.

11,077 changes: 11,077 additions & 0 deletions data/web/css/themes/pulse-bootstrap.css

Large diffs are not rendered by default.

11,813 changes: 11,813 additions & 0 deletions data/web/css/themes/quartz-bootstrap.css

Large diffs are not rendered by default.

11,093 changes: 11,093 additions & 0 deletions data/web/css/themes/regent-bootstrap.css

Large diffs are not rendered by default.

11,400 changes: 11,400 additions & 0 deletions data/web/css/themes/sandstone-bootstrap.css

Large diffs are not rendered by default.

11,384 changes: 11,384 additions & 0 deletions data/web/css/themes/simplex-bootstrap.css

Large diffs are not rendered by default.

11,628 changes: 11,628 additions & 0 deletions data/web/css/themes/sketchy-bootstrap.css

Large diffs are not rendered by default.

11,569 changes: 11,569 additions & 0 deletions data/web/css/themes/slate-bootstrap.css

Large diffs are not rendered by default.

11,345 changes: 11,345 additions & 0 deletions data/web/css/themes/solar-bootstrap.css

Large diffs are not rendered by default.

11,465 changes: 11,465 additions & 0 deletions data/web/css/themes/spacelab-bootstrap.css

Large diffs are not rendered by default.

11,405 changes: 11,405 additions & 0 deletions data/web/css/themes/superhero-bootstrap.css

Large diffs are not rendered by default.

11,274 changes: 11,274 additions & 0 deletions data/web/css/themes/united-bootstrap.css

Large diffs are not rendered by default.

11,746 changes: 11,746 additions & 0 deletions data/web/css/themes/vapor-bootstrap.css

Large diffs are not rendered by default.

11,533 changes: 11,533 additions & 0 deletions data/web/css/themes/yeti-bootstrap.css

Large diffs are not rendered by default.

11,458 changes: 11,458 additions & 0 deletions data/web/css/themes/zephyr-bootstrap.css

Large diffs are not rendered by default.

Binary file modified data/web/fonts/bootstrap-icons.woff
Binary file not shown.
Binary file modified data/web/fonts/bootstrap-icons.woff2
Binary file not shown.
1 change: 0 additions & 1 deletion data/web/inc/header.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
'dual_login' => @$_SESSION['dual-login'],
'ui_texts' => $UI_TEXTS,
'css_path' => '/cache/'.basename($CSSPath),
'theme' => strtolower(trim($DEFAULT_THEME)),
'logo' => customize('get', 'main_logo'),
'available_languages' => $AVAILABLE_LANGUAGES,
'lang' => $lang,
Expand Down
43 changes: 27 additions & 16 deletions data/web/inc/prerequisites.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,6 @@

require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/lib/array_merge_real.php';

// Minify JS
use MatthiasMullie\Minify;
$js_minifier = new JSminifierExtended();
$js_dir = array_diff(scandir('/web/js/build'), array('..', '.'));
foreach ($js_dir as $js_file) {
$js_minifier->add('/web/js/build/' . $js_file);
}

// Minify CSS
$css_minifier = new CSSminifierExtended();
$css_dir = array_diff(scandir('/web/css/build'), array('..', '.'));
foreach ($css_dir as $css_file) {
$css_minifier->add('/web/css/build/' . $css_file);
}

// U2F API + T/HOTP API
// u2f - deprecated, should be removed
$u2f = new u2flib_server\U2F('https://' . $_SERVER['HTTP_HOST']);
Expand Down Expand Up @@ -221,6 +206,33 @@ function get_remote_ip() {
$lang = array_merge_real($lang, json_decode(file_get_contents($langFile), true));
}


// init frontend
// Minify JS
use MatthiasMullie\Minify;
$js_minifier = new JSminifierExtended();
$js_dir = array_diff(scandir('/web/js/build'), array('..', '.'));
// Minify CSS
$css_minifier = new CSSminifierExtended();
$css_dir = array_diff(scandir('/web/css/build'), array('..', '.'));
// get customized ui data
$UI_TEXTS = customize('get', 'ui_texts');
$UI_THEME = "lumen"; // TODO: customize('get', 'ui_theme');
// minify bootstrap theme
if (file_exists('../css/themes'.$UI_THEME.'-bootstrap.css'))
$css_minifier->add('../css/themes/'.$UI_THEME.'-bootstrap.css');
else
$css_minifier->add('../css/themes/lumen-bootstrap.css');
// minify css build files
foreach ($css_dir as $css_file) {
$css_minifier->add('/web/css/build/' . $css_file);
}
// minify js build files
foreach ($js_dir as $js_file) {
$js_minifier->add('/web/js/build/' . $js_file);
}


require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.acl.inc.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.address_rewriting.inc.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.admin.inc.php';
Expand Down Expand Up @@ -255,4 +267,3 @@ function get_remote_ip() {
// }
acl('to_session');
}
$UI_TEXTS = customize('get', 'ui_texts');
7 changes: 0 additions & 7 deletions data/web/inc/vars.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,6 @@
'zh' => '中文 (Chinese)'
);

// Change theme (default: lumen)
// Needs to be one of those: cerulean, cosmo, cyborg, darkly, flatly, journal, lumen, paper, readable, sandstone,
// simplex, slate, spacelab, superhero, united, yeti
// See https://bootswatch.com/
// WARNING: Only lumen is loaded locally. Enabling any other theme, will download external sources.
$DEFAULT_THEME = 'lumen';

// Show DKIM private keys - false by default
$SHOW_DKIM_PRIV_KEYS = false;

Expand Down
2 changes: 2 additions & 0 deletions data/web/js/build/000-jquery-3.6.0.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions data/web/js/build/001-bootstrap.bundle.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit c1792df

Please sign in to comment.