Merge branch 'main' into allthebookmarks-com
This commit is contained in:
@ -31,6 +31,7 @@ class DefaultLoader extends Loader {
|
||||
if ( self::$loaded ) {
|
||||
return;
|
||||
}
|
||||
Components::set( 'DARK_MODE_SETTING', '' );
|
||||
Components::set( 'TEMPLATE_URL', Template::parse( '{ROOT_URL}app/templates/default/' ) );
|
||||
if ( VENDOR_AUTOLOADED === true ) {
|
||||
Components::set( 'FONT_AWESOME_URL', '/vendor/fortawesome/font-awesome/css/' );
|
||||
@ -54,9 +55,11 @@ class DefaultLoader extends Loader {
|
||||
*/
|
||||
if ( App::$isLoggedIn ) {
|
||||
if ( ! empty( App::$activePrefs['darkMode'] ) ) {
|
||||
Components::set( 'DARK_MODE_SETTING', 'true' );
|
||||
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main.css">' );
|
||||
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main-dark.css" id="dark-mode-stylesheet">' );
|
||||
} else {
|
||||
Components::set( 'DARK_MODE_SETTING', 'false' );
|
||||
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main.css">' );
|
||||
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main-dark.css" id="dark-mode-stylesheet" disabled>' );
|
||||
}
|
||||
@ -70,7 +73,9 @@ class DefaultLoader extends Loader {
|
||||
$this->addCss( '<link rel="stylesheet" href="{ROOT_URL}app/css/main-dark.css" id="dark-mode-stylesheet" disabled>' );
|
||||
}
|
||||
Components::set( 'topNavRight', Template::parse( App::$topNavRight . '{STATUS}' ) );
|
||||
Components::set( 'topNavLeft', Views::simpleView( 'nav.main', Navigation::getMenuLinks( App::MAIN_MENU_NAME ) ) );
|
||||
$menu = Views::simpleView( 'nav.main', Navigation::getMenuLinks( App::MAIN_MENU_NAME ) );
|
||||
$activeMenu = Navigation::activePageSelect( $menu, Input::get( 'url' ), false, true );
|
||||
Components::set( 'topNavLeft', $activeMenu );
|
||||
Components::set( 'colorSelect', Views::simpleView( 'forms.colorSelect' ) );
|
||||
Components::set( 'iconSelect', Views::simpleView( 'forms.iconSelect' ) );
|
||||
Navigation::setCrumbComponent( 'BREADCRUMB', Input::get( 'url' ) );
|
||||
|
@ -55,6 +55,7 @@
|
||||
</header>
|
||||
<div class="d-flex flex-column min-vh-100">
|
||||
<div class="flex-container flex-grow-1">
|
||||
<!-- Issues -->
|
||||
{ISSUES}
|
||||
<div class="container pt-4">
|
||||
<div class="row">
|
||||
@ -65,10 +66,14 @@
|
||||
</div>
|
||||
</div>
|
||||
{/ISSUES}
|
||||
<!-- Main Page Content -->
|
||||
{CONTENT}
|
||||
</div>
|
||||
<!-- Footer -->
|
||||
{FOOT}
|
||||
</div>
|
||||
<!-- User Pref to control Dark mode across frontend and backend -->
|
||||
<input type="hidden" name="dark-mode-pref" id="dark-mode-pref" value="{DARK_MODE_SETTING}">
|
||||
<!-- Bootstrap core JavaScript and jquery -->
|
||||
<script crossorigin="anonymous" src="{JQUERY_CDN}jquery.min.js"></script>
|
||||
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
|
||||
@ -77,4 +82,4 @@
|
||||
<!-- Custom javascript for this template -->
|
||||
{TEMPLATE_JS_INCLUDES}
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user