wip from ATB
This commit is contained in:
@ -41,8 +41,6 @@ class DefaultLoader extends Loader {
|
||||
Components::set( 'JQUERY_CDN', self::JQUERY_CDN );
|
||||
Components::set( 'FONT_AWESOME_URL', self::FONT_AWESOME_URL );
|
||||
}
|
||||
$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>' );
|
||||
$this->addJs( '<script language="JavaScript" crossorigin="anonymous" type="text/javascript" src="{ROOT_URL}app/js/main.js"></script>' );
|
||||
Components::setIfNull( 'LOGO', Config::getValue( 'main/logo' ) ?? TP_DEFAULT_LOGO );
|
||||
Components::setIfNull( 'COPY', Views::simpleView( 'footer.copy') );
|
||||
@ -55,12 +53,21 @@ class DefaultLoader extends Loader {
|
||||
* Top-Nav
|
||||
*/
|
||||
if ( App::$isLoggedIn ) {
|
||||
if ( ! empty( App::$activePrefs['darkMode'] ) ) {
|
||||
$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 {
|
||||
$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>' );
|
||||
}
|
||||
Components::set( 'topNavRightDropdown', Template::parse( App::$topNavRightDropdown ) );
|
||||
Components::set( 'STATUS', Views::simpleView( 'nav.statusLoggedIn' ) );
|
||||
Components::set( 'USERNAME', \ucfirst( App::$activeUser->username ) );
|
||||
Components::set( 'AVATAR', App::$activeUser->avatar );
|
||||
} else {
|
||||
Components::set( 'STATUS', Views::simpleView( 'nav.statusLoggedOut' ) );
|
||||
$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>' );
|
||||
}
|
||||
Components::set( 'topNavRight', Template::parse( App::$topNavRight . '{STATUS}' ) );
|
||||
Components::set( 'topNavLeft', Views::simpleView( 'nav.main', Navigation::getMenuLinks( App::MAIN_MENU_NAME ) ) );
|
||||
|
Reference in New Issue
Block a user