diff options
| author | 2023-03-04 13:30:45 +0100 | |
|---|---|---|
| committer | 2023-03-04 13:30:45 +0100 | |
| commit | b3239256dc6d188cda970adab516b3fcf1b86129 (patch) | |
| tree | d8e65dd9784834ba2e82ce7ee94b4718f8af19ea /app/layout | |
| parent | 27b71ffa99f7dff013fb8d51d020ed628e0d2ce6 (diff) | |
| parent | 0fe0ce894cbad09757d719dd4b400b9862c1a12a (diff) | |
Merge branch 'edge' into latest
Diffstat (limited to 'app/layout')
| -rw-r--r-- | app/layout/aside_configure.phtml | 138 | ||||
| -rw-r--r-- | app/layout/aside_feed.phtml | 2 | ||||
| -rw-r--r-- | app/layout/aside_subscription.phtml | 57 | ||||
| -rw-r--r-- | app/layout/header.phtml | 88 | ||||
| -rw-r--r-- | app/layout/layout.phtml | 2 | ||||
| -rw-r--r-- | app/layout/nav_menu.phtml | 67 | ||||
| -rw-r--r-- | app/layout/simple.phtml | 2 |
7 files changed, 214 insertions, 142 deletions
diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index 5f1762834..03b8108f7 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -1,72 +1,90 @@ <nav class="nav nav-list aside" id="aside_feed"> <a class="toggle_aside" href="#close"><?= _i('close') ?></a> - + <ul> - <li class="nav-header"><?= _t('gen.menu.account') ?>: <?= htmlspecialchars(Minz_Session::param('currentUser', '_'), ENT_NOQUOTES, 'UTF-8')?></li> - <li class="item<?= Minz_Request::controllerName() === 'user' && Minz_Request::actionName() === 'profile' ? ' active' : '' ?>"> - <a href="<?= _url('user', 'profile') ?>"><?= _t('gen.menu.user_profile') ?></a> - </li> - <li class="item"> - <a class="signout" href="<?= _url('auth', 'logout') ?>"> - <?php - echo _t('gen.auth.logout'); ?> <?= _i('logout') ?></a> - </li> - <li class="nav-header"><?= _t('gen.menu.configuration') ?></li> - <li class="item<?= Minz_Request::actionName() === 'display' ? ' active' : '' ?>"> - <a href="<?= _url('configure', 'display') ?>"><?= _t('gen.menu.display') ?></a> - </li> - <li class="item<?= Minz_Request::actionName() === 'reading' ? ' active' : '' ?>"> - <a href="<?= _url('configure', 'reading') ?>"><?= _t('gen.menu.reading') ?></a> - </li> - <li class="item<?= Minz_Request::actionName() === 'archiving' ? ' active' : '' ?>"> - <a href="<?= _url('configure', 'archiving') ?>"><?= _t('gen.menu.archiving') ?></a> - </li> - <li class="item<?= Minz_Request::actionName() === 'integration' ? ' active' : '' ?>"> - <a href="<?= _url('configure', 'integration') ?>"><?= _t('gen.menu.sharing') ?></a> - </li> - <li class="item<?= Minz_Request::actionName() === 'shortcut' ? ' active' : '' ?>"> - <a href="<?= _url('configure', 'shortcut') ?>"><?= _t('gen.menu.shortcuts') ?></a> - </li> - <li class="item<?= Minz_Request::actionName() === 'queries' ? ' active' : '' ?>"> - <a href="<?= _url('configure', 'queries') ?>"><?= _t('gen.menu.queries') ?></a> - </li> - <li class="item<?= Minz_Request::controllerName() === 'extension' ? ' active' : '' ?>"> - <a href="<?= _url('extension', 'index') ?>"><?= _t('gen.menu.extensions') ?></a> + <li class="item nav-section"> + <div class="item nav-header"><?= _t('gen.menu.account') ?>: <?= htmlspecialchars(Minz_Session::param('currentUser', '_'), ENT_NOQUOTES, 'UTF-8')?></div> + <ul> + <li class="item<?= Minz_Request::controllerName() === 'user' && Minz_Request::actionName() === 'profile' ? ' active' : '' ?>"> + <a href="<?= _url('user', 'profile') ?>"><?= _t('gen.menu.user_profile') ?></a> + </li> + <li class="item"> + <a class="signout" href="<?= _url('auth', 'logout') ?>"> + <?php + echo _t('gen.auth.logout'); ?> <?= _i('logout') ?></a> + </li> + </ul> </li> - <?php if (!FreshRSS_Auth::hasAccess('admin')) { ?> - <li class="item<?= Minz_Request::actionName() === 'logs' ? ' active' : '' ?>"> - <a href="<?= _url('index', 'logs') ?>"><?= _t('gen.menu.logs') ?></a> + + <li class="item nav-section"> + <div class="item nav-header"><?= _t('gen.menu.configuration') ?></div> + <ul> + <li class="item<?= Minz_Request::actionName() === 'display' ? ' active' : '' ?>"> + <a href="<?= _url('configure', 'display') ?>"><?= _t('gen.menu.display') ?></a> + </li> + <li class="item<?= Minz_Request::actionName() === 'reading' ? ' active' : '' ?>"> + <a href="<?= _url('configure', 'reading') ?>"><?= _t('gen.menu.reading') ?></a> + </li> + <li class="item<?= Minz_Request::actionName() === 'archiving' ? ' active' : '' ?>"> + <a href="<?= _url('configure', 'archiving') ?>"><?= _t('gen.menu.archiving') ?></a> + </li> + <li class="item<?= Minz_Request::actionName() === 'integration' ? ' active' : '' ?>"> + <a href="<?= _url('configure', 'integration') ?>"><?= _t('gen.menu.sharing') ?></a> + </li> + <li class="item<?= Minz_Request::actionName() === 'shortcut' ? ' active' : '' ?>"> + <a href="<?= _url('configure', 'shortcut') ?>"><?= _t('gen.menu.shortcuts') ?></a> + </li> + <li class="item<?= Minz_Request::actionName() === 'queries' ? ' active' : '' ?>"> + <a href="<?= _url('configure', 'queries') ?>"><?= _t('gen.menu.queries') ?></a> + </li> + <li class="item<?= Minz_Request::controllerName() === 'extension' ? ' active' : '' ?>"> + <a href="<?= _url('extension', 'index') ?>"><?= _t('gen.menu.extensions') ?></a> + </li> + <?php if (!FreshRSS_Auth::hasAccess('admin')) { ?> + <li class="item<?= Minz_Request::actionName() === 'logs' ? ' active' : '' ?>"> + <a href="<?= _url('index', 'logs') ?>"><?= _t('gen.menu.logs') ?></a> + </li> + <?php } ?> + <?= Minz_ExtensionManager::callHook('menu_configuration_entry') ?> + </ul> </li> - <?php } ?> - <?= Minz_ExtensionManager::callHook('menu_configuration_entry') ?> <?php if (FreshRSS_Auth::hasAccess('admin')) { ?> - <li class="nav-header"><?= _t('gen.menu.admin') ?></li> - <li class="item<?= Minz_Request::actionName() === 'system' ? ' active' : '' ?>"> - <a href="<?= _url('configure', 'system') ?>"><?= _t('gen.menu.system') ?></a> - </li> - <li class="item<?= Minz_Request::controllerName() === 'user' && Minz_Request::actionName() === 'manage' ? ' active' : '' ?>"> - <a href="<?= _url('user', 'manage') ?>"><?= _t('gen.menu.user_management') ?></a> - </li> - <li class="item<?= Minz_Request::controllerName() === 'auth' ? ' active' : '' ?>"> - <a href="<?= _url('auth', 'index') ?>"><?= _t('gen.menu.authentication') ?></a> - </li> - <li class="item<?= Minz_Request::controllerName() === 'update' && Minz_Request::actionName() === 'checkInstall' ? ' active' : '' ?>"> - <a href="<?= _url('update', 'checkInstall') ?>"><?= _t('gen.menu.check_install') ?></a> - </li> - <?php if (!Minz_Configuration::get('system')->disable_update) { ?> - <li class="item<?= Minz_Request::controllerName() === 'update' && Minz_Request::actionName() === 'index' ? ' active' : '' ?>"> - <a href="<?= _url('update', 'index') ?>"><?= _t('gen.menu.update') ?></a> - </li> - <li class="item<?= Minz_Request::actionName() === 'logs' ? ' active' : '' ?>"> - <a href="<?= _url('index', 'logs') ?>"><?= _t('gen.menu.logs') ?></a> + <li class="item nav-section"> + <div class="item nav-header"><?= _t('gen.menu.admin') ?></div> + <ul> + <li class="item<?= Minz_Request::actionName() === 'system' ? ' active' : '' ?>"> + <a href="<?= _url('configure', 'system') ?>"><?= _t('gen.menu.system') ?></a> + </li> + <li class="item<?= Minz_Request::controllerName() === 'user' && Minz_Request::actionName() === 'manage' ? ' active' : '' ?>"> + <a href="<?= _url('user', 'manage') ?>"><?= _t('gen.menu.user_management') ?></a> + </li> + <li class="item<?= Minz_Request::controllerName() === 'auth' ? ' active' : '' ?>"> + <a href="<?= _url('auth', 'index') ?>"><?= _t('gen.menu.authentication') ?></a> + </li> + <li class="item<?= Minz_Request::controllerName() === 'update' && Minz_Request::actionName() === 'checkInstall' ? ' active' : '' ?>"> + <a href="<?= _url('update', 'checkInstall') ?>"><?= _t('gen.menu.check_install') ?></a> + </li> + <?php if (!FreshRSS_Context::$system_conf->disable_update) { ?> + <li class="item<?= Minz_Request::controllerName() === 'update' && Minz_Request::actionName() === 'index' ? ' active' : '' ?>"> + <a href="<?= _url('update', 'index') ?>"><?= _t('gen.menu.update') ?></a> + </li> + <li class="item<?= Minz_Request::actionName() === 'logs' ? ' active' : '' ?>"> + <a href="<?= _url('index', 'logs') ?>"><?= _t('gen.menu.logs') ?></a> + </li> + <?php } ?> + <?= Minz_ExtensionManager::callHook('menu_admin_entry') ?> + </ul> </li> <?php } ?> - <?= Minz_ExtensionManager::callHook('menu_admin_entry') ?> - <?php } ?> - <li class="nav-header"><!-- empty headline --></li> - <li class="item<?= Minz_Request::actionName() === 'about' ? ' active' : '' ?>"> - <a href="<?= _url('index', 'about') ?>"><?= _t('gen.menu.about') ?></a> + + <li class="item nav-section"> + <div class="item nav-header"><!-- empty headline --></div> + <ul> + <li class="item<?= Minz_Request::actionName() === 'about' ? ' active' : '' ?>"> + <a href="<?= _url('index', 'about') ?>"><?= _t('gen.menu.about') ?></a> + </li> + </ul> </li> </ul> </nav> diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index 3c4f1ec2e..bb9d678dc 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -37,7 +37,7 @@ <li class="tree-folder category favorites<?= FreshRSS_Context::isCurrentGet('s') ? ' active' : '' ?>"> <div class="tree-folder-title"> - <?= _i('bookmark') ?> + <?= _i('starred') ?> <a class="title" data-unread="<?= format_number(FreshRSS_Context::$total_starred['unread']) ?>" href="<?= _url('index', $actual_view, 'get', 's') . $state_filter_manual ?>"> <?= _t('index.menu.favorites', format_number(FreshRSS_Context::$total_starred['all'])) ?> </a> diff --git a/app/layout/aside_subscription.phtml b/app/layout/aside_subscription.phtml index aa7857f74..e1f520f34 100644 --- a/app/layout/aside_subscription.phtml +++ b/app/layout/aside_subscription.phtml @@ -1,38 +1,45 @@ <nav class="nav nav-list aside" id="aside_feed"> <a class="toggle_aside" href="#close"><?= _i('close') ?></a> <ul> - <li class="nav-header"><?= _t('sub.menu.subscription_management') ?></li> + <li class="item nav-section"> + <div class="nav-header"><?= _t('sub.menu.subscription_management') ?></div> + <ul> + <li class="item<?= Minz_Request::controllerName() === 'subscription' && Minz_Request::actionName() === 'add' ? ' active' : '' ?>"> + <a href="<?= _url('subscription', 'add') ?>"><?= _t('sub.menu.add') ?></a> + </li> - <li class="item<?= Minz_Request::controllerName() === 'subscription' && Minz_Request::actionName() === 'add' ? ' active' : '' ?>"> - <a href="<?= _url('subscription', 'add') ?>"><?= _t('sub.menu.add') ?></a> - </li> + <li class="item<?= Minz_Request::controllerName() === 'subscription' && Minz_Request::actionName() === 'index' ? ' active' : '' ?>"> + <a href="<?= _url('subscription', 'index') ?>"><?= _t('sub.menu.subscription_management') ?></a> + </li> - <li class="item<?= Minz_Request::controllerName() === 'subscription' && Minz_Request::actionName() === 'index' ? ' active' : '' ?>"> - <a href="<?= _url('subscription', 'index') ?>"><?= _t('sub.menu.subscription_management') ?></a> - </li> + <li class="item<?= Minz_Request::controllerName() === 'tag' ? ' active' : '' ?>"> + <a href="<?= _url('tag', 'index') ?>"><?= _t('sub.menu.label_management') ?></a> + </li> - <li class="item<?= Minz_Request::controllerName() === 'tag' ? ' active' : '' ?>"> - <a href="<?= _url('tag', 'index') ?>"><?= _t('sub.menu.label_management') ?></a> - </li> + <li class="item<?= Minz_Request::controllerName() === 'importExport' ? ' active' : '' ?>"> + <a href="<?= _url('importExport', 'index') ?>"><?= _t('sub.menu.import_export') ?></a> + </li> - <li class="item<?= Minz_Request::controllerName() === 'importExport' ? ' active' : '' ?>"> - <a href="<?= _url('importExport', 'index') ?>"><?= _t('sub.menu.import_export') ?></a> + <li class="item<?= Minz_Request::controllerName() === 'subscription' && Minz_Request::actionName() === 'bookmarklet' ? ' active' : '' ?>"> + <a href="<?= _url('subscription', 'bookmarklet') ?>"><?= _t('sub.menu.subscription_tools') ?></a> + </li> + </ul> </li> - <li class="item<?= Minz_Request::controllerName() === 'subscription' && Minz_Request::actionName() === 'bookmarklet' ? ' active' : '' ?>"> - <a href="<?= _url('subscription', 'bookmarklet') ?>"><?= _t('sub.menu.subscription_tools') ?></a> - </li> - <li class="nav-header"><?= _t('admin.stats') ?></li> - <li class="item<?= Minz_Request::controllerName() == 'stats' && Minz_Request::actionName() == 'index' ? ' active' : '' ?>"> - <a href="<?= _url('stats', 'index') ?>"><?= _t('sub.menu.stats.main') ?></a> + <li class="item nav-section"> + <div class="nav-header"><?= _t('admin.stats') ?></div> + <ul> + <li class="item<?= Minz_Request::controllerName() == 'stats' && Minz_Request::actionName() == 'index' ? ' active' : '' ?>"> + <a href="<?= _url('stats', 'index') ?>"><?= _t('sub.menu.stats.main') ?></a> + </li> + <li class="item<?= Minz_Request::actionName() == 'idle' ? ' active' : '' ?>"> + <a href="<?= _url('stats', 'idle') ?>"><?= _t('sub.menu.stats.idle') ?></a> + </li> + <li class="item<?= Minz_Request::actionName() == 'repartition' ? ' active' : '' ?>"> + <a href="<?= _url('stats', 'repartition') ?>"><?= _t('sub.menu.stats.repartition') ?></a> + </li> + </ul> </li> - <li class="item<?= Minz_Request::actionName() == 'idle' ? ' active' : '' ?>"> - <a href="<?= _url('stats', 'idle') ?>"><?= _t('sub.menu.stats.idle') ?></a> - </li> - <li class="item<?= Minz_Request::actionName() == 'repartition' ? ' active' : '' ?>"> - <a href="<?= _url('stats', 'repartition') ?>"><?= _t('sub.menu.stats.repartition') ?></a> - </li> - </ul> </nav> <a class="close-aside" href="#close">❌</a> diff --git a/app/layout/header.phtml b/app/layout/header.phtml index f8e54c7ce..0a49d5992 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -2,7 +2,7 @@ <div class="item title"> <a href="<?= _url('index', 'index') ?>"> <?php if (FreshRSS_Context::$system_conf->logo_html == '') { ?> - <img class="logo" src="<?= _i('FreshRSS-logo', FreshRSS_Themes::ICON_URL) ?>" alt="FreshRSS" /> + <img class="logo" src="<?= _i('FreshRSS-logo', FreshRSS_Themes::ICON_URL) ?>" alt="FreshRSS" loading="lazy" /> <?php } else { echo FreshRSS_Context::$system_conf->logo_html; @@ -15,10 +15,15 @@ <?php if (FreshRSS_Auth::hasAccess() || FreshRSS_Context::$system_conf->allow_anonymous) { ?> <form action="<?= _url('index', 'index') ?>" method="get"> <div class="stick"> - <input type="search" name="search" id="search" class="extend" + <input type="search" name="search" id="search" value="<?= htmlspecialchars(htmlspecialchars_decode(FreshRSS_Context::$search, ENT_QUOTES), ENT_COMPAT, 'UTF-8') ?>" placeholder="<?= _t('gen.menu.search') ?>" /> + <?php $param_a = Minz_Request::actionName(); ?> + <?php if (in_array($param_a, ['normal', 'global', 'reader'])) { ?> + <input type="hidden" name="a" value="<?= $param_a ?>" /> + <?php } ?> + <?php $get = Minz_Request::param('get', ''); ?> <?php if ($get != '') { ?> <input type="hidden" name="get" value="<?= $get ?>" /> @@ -48,38 +53,59 @@ <ul class="dropdown-menu scrollbar-thin"> <li class="dropdown-header-close"><a class="toggle_aside" href="#close"><?= _i('close') ?></a></li> - <li class="dropdown-header"><?= _t('gen.menu.account') ?>: <?= htmlspecialchars(Minz_Session::param('currentUser', '_'), ENT_NOQUOTES, 'UTF-8') ?></li> - <li class="item"><a href="<?= _url('user', 'profile') ?>"><?= _t('gen.menu.user_profile') ?></a></li> - <?php if (FreshRSS_Auth::accessNeedsAction()): ?> - <li class="item"><a class="signout" href="<?= _url('auth', 'logout') ?>"><?= _t('gen.auth.logout'); ?><?= _i('logout') ?></a></li> - <?php else: ?> - <li class="item"><span class="signout">(<?= htmlspecialchars(Minz_Session::param('currentUser', '_'), ENT_NOQUOTES, 'UTF-8') ?>)</span></li> - <?php endif; ?> - <li class="dropdown-header"><?= _t('gen.menu.configuration') ?></li> - <li class="item"><a href="<?= _url('configure', 'display') ?>"><?= _t('gen.menu.display') ?></a></li> - <li class="item"><a href="<?= _url('configure', 'reading') ?>"><?= _t('gen.menu.reading') ?></a></li> - <li class="item"><a href="<?= _url('configure', 'archiving') ?>"><?= _t('gen.menu.archiving') ?></a></li> - <li class="item"><a href="<?= _url('configure', 'integration') ?>"><?= _t('gen.menu.sharing') ?></a></li> - <li class="item"><a href="<?= _url('configure', 'shortcut') ?>"><?= _t('gen.menu.shortcuts') ?></a></li> - <li class="item"><a href="<?= _url('configure', 'queries') ?>"><?= _t('gen.menu.queries') ?></a></li> - <li class="item"><a href="<?= _url('extension', 'index') ?>"><?= _t('gen.menu.extensions') ?></a></li> - <?= Minz_ExtensionManager::callHook('menu_configuration_entry') ?> - + <li class="item dropdown-section"> + <div class="dropdown-section-title"> + <?= _t('gen.menu.account') ?>: <?= htmlspecialchars(Minz_Session::param('currentUser', '_'), ENT_NOQUOTES, 'UTF-8') ?> + </div> + <ul> + <li class="item"><a href="<?= _url('user', 'profile') ?>"><?= _t('gen.menu.user_profile') ?></a></li> + <?php if (FreshRSS_Auth::accessNeedsAction()): ?> + <li class="item"><a class="signout" href="<?= _url('auth', 'logout') ?>"><?= _t('gen.auth.logout'); ?><?= _i('logout') ?></a></li> + <?php else: ?> + <li class="item"><span class="signout">(<?= htmlspecialchars(Minz_Session::param('currentUser', '_'), ENT_NOQUOTES, 'UTF-8') ?>)</span></li> + <?php endif; ?> + </ul> + </li> + <li class="item dropdown-section"> + <div class="dropdown-section-title"> + <?= _t('gen.menu.configuration') ?> + </div> + <ul> + <li class="item"><a href="<?= _url('configure', 'display') ?>"><?= _t('gen.menu.display') ?></a></li> + <li class="item"><a href="<?= _url('configure', 'reading') ?>"><?= _t('gen.menu.reading') ?></a></li> + <li class="item"><a href="<?= _url('configure', 'archiving') ?>"><?= _t('gen.menu.archiving') ?></a></li> + <li class="item"><a href="<?= _url('configure', 'integration') ?>"><?= _t('gen.menu.sharing') ?></a></li> + <li class="item"><a href="<?= _url('configure', 'shortcut') ?>"><?= _t('gen.menu.shortcuts') ?></a></li> + <li class="item"><a href="<?= _url('configure', 'queries') ?>"><?= _t('gen.menu.queries') ?></a></li> + <li class="item"><a href="<?= _url('extension', 'index') ?>"><?= _t('gen.menu.extensions') ?></a></li> + <?= Minz_ExtensionManager::callHook('menu_configuration_entry') ?> + </ul> + </li> <?php if (FreshRSS_Auth::hasAccess('admin')) { ?> - <li class="dropdown-header"><?= _t('gen.menu.admin') ?></li> - <li class="item"><a href="<?= _url('configure', 'system') ?>"><?= _t('gen.menu.system') ?></a></li> - <li class="item"><a href="<?= _url('user', 'manage') ?>"><?= _t('gen.menu.user_management') ?></a></li> - <li class="item"><a href="<?= _url('auth', 'index') ?>"><?= _t('gen.menu.authentication') ?></a></li> - <li class="item"><a href="<?= _url('update', 'checkInstall') ?>"><?= _t('gen.menu.check_install') ?></a></li> - <?php if (!Minz_Configuration::get('system')->disable_update) { ?> - <li class="item"><a href="<?= _url('update', 'index') ?>"><?= _t('gen.menu.update') ?></a></li> - <?php } ?> - <?= Minz_ExtensionManager::callHook('menu_admin_entry') ?> + <li class="item dropdown-section"> + <div class="dropdown-section-title"> + <?= _t('gen.menu.admin') ?> + </div> + <ul> + <li class="item"><a href="<?= _url('configure', 'system') ?>"><?= _t('gen.menu.system') ?></a></li> + <li class="item"><a href="<?= _url('user', 'manage') ?>"><?= _t('gen.menu.user_management') ?></a></li> + <li class="item"><a href="<?= _url('auth', 'index') ?>"><?= _t('gen.menu.authentication') ?></a></li> + <li class="item"><a href="<?= _url('update', 'checkInstall') ?>"><?= _t('gen.menu.check_install') ?></a></li> + <?php if (!FreshRSS_Context::$system_conf->disable_update) { ?> + <li class="item"><a href="<?= _url('update', 'index') ?>"><?= _t('gen.menu.update') ?></a></li> + <?php } ?> + <?= Minz_ExtensionManager::callHook('menu_admin_entry') ?> + </ul> + </li> <?php } ?> - <li class="item"><a href="<?= _url('index', 'logs') ?>"><?= _t('gen.menu.logs') ?></a></li> - <li class="item"><a href="<?= _url('index', 'about') ?>"><?= _t('gen.menu.about') ?></a></li> - <?= Minz_ExtensionManager::callHook('menu_other_entry') ?> + <li class="item dropdown-section"> + <ul> + <li class="item"><a href="<?= _url('index', 'logs') ?>"><?= _t('gen.menu.logs') ?></a></li> + <li class="item"><a href="<?= _url('index', 'about') ?>"><?= _t('gen.menu.about') ?></a></li> + <?= Minz_ExtensionManager::callHook('menu_other_entry') ?> + </ul> + </li> </ul> <a class="dropdown-close" href="#close">❌</a> </div> diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index 48ada7183..1e9ce6905 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -52,7 +52,7 @@ if (_t('gen.dir') === 'rtl') { <meta name="robots" content="noindex,nofollow" /> <?php } ?> </head> - <body class="<?= Minz_Request::actionName() ?>"> + <body class="<?= Minz_Request::actionName() ?><?= (FreshRSS_Context::$user_conf->darkMode === 'no') ? '' : ' darkMode_' . FreshRSS_Context::$user_conf->darkMode ?>"> <?php if (!Minz_Request::param('ajax')) { flush(); diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index e8c4170c9..848144568 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -29,10 +29,53 @@ href="<?= Minz_Url::display($url_state) ?>"><?= _i($state_str) ?></a> <?php } ?> + <div class="dropdown only-mobile" id="dropdown-search-wrapper"> + <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> + <div id="dropdown-search" class="dropdown-target"></div> + + <a id="toggle-search" class="dropdown-toggle btn<?= (strlen(FreshRSS_Context::$search) > 0) ? ' active' : ''; ?>" title="<?= _t('gen.menu.search') ?>" + href="#dropdown-search"><?= _i('search') ?></a> + <ul class="dropdown-menu"> + <li class="item"> + <span> + <form action="<?= _url('index', 'index') ?>" method="get"> + <?php $param_a = Minz_Request::actionName(); ?> + <?php if (in_array($param_a, ['normal', 'global', 'reader'])) { ?> + <input type="hidden" name="a" value="<?= $param_a ?>" /> + <?php } ?> + + <?php $get = Minz_Request::param('get', ''); ?> + <?php if ($get != '') { ?> + <input type="hidden" name="get" value="<?= $get ?>" /> + <?php } ?> + + <?php $order = Minz_Request::param('order', ''); ?> + <?php if ($order != '') { ?> + <input type="hidden" name="order" value="<?= $order ?>" /> + <?php } ?> + + <?php $state = Minz_Request::param('state', ''); ?> + <?php if ($state != '') { ?> + <input type="hidden" name="state" value="<?= $state ?>" /> + <?php } ?> + + <div class="stick search"> + <input type="search" name="search" + value="<?= htmlspecialchars(htmlspecialchars_decode(FreshRSS_Context::$search, ENT_QUOTES), ENT_COMPAT, 'UTF-8'); ?>" + placeholder="<?= _t('gen.menu.search') ?>" title="<?= _t('gen.menu.search') ?>" /><button class="btn" type="submit" title="<?= _t('index.menu.search_short') ?>"><?= _i('search') ?></button> + </div> + <p class="help"><?= _i('help') ?> <?= _t('gen.menu.search_help') ?></a></p> + </form> + </span> + </li> + </ul> + <a class="dropdown-close" href="#close">❌</a> + </div> + <div class="dropdown"> <div id="dropdown-query" class="dropdown-target"></div> - <a class="dropdown-toggle btn" href="#dropdown-query" title="<?= _t('index.menu.queries') ?>"><?= _i('bookmark-tag') ?></a> + <a id="toggle-userqueries" class="dropdown-toggle btn" href="#dropdown-query" title="<?= _t('index.menu.queries') ?>"><?= _i('bookmark-tag') ?></a> <ul class="dropdown-menu"> <li class="dropdown-header"> <?= _t('index.menu.queries') ?> @@ -185,28 +228,6 @@ </div> <?php } ?> - <div class="item search"> - <form action="<?= _url('index', 'index') ?>" method="get"> - <input type="search" name="search" class="extend" value="<?php - echo htmlspecialchars(htmlspecialchars_decode(FreshRSS_Context::$search, ENT_QUOTES), ENT_COMPAT, 'UTF-8'); ?>" placeholder="<?= _t('index.menu.search_short') ?>" /> - - <?php $get = Minz_Request::param('get', ''); ?> - <?php if($get != '') { ?> - <input type="hidden" name="get" value="<?= $get ?>" /> - <?php } ?> - - <?php $order = Minz_Request::param('order', ''); ?> - <?php if($order != '') { ?> - <input type="hidden" name="order" value="<?= $order ?>" /> - <?php } ?> - - <?php $state = Minz_Request::param('state', ''); ?> - <?php if($state != '') { ?> - <input type="hidden" name="state" value="<?= $state ?>" /> - <?php } ?> - </form> - </div> - <?php if (FreshRSS_Context::$order === 'DESC') { $order = 'ASC'; diff --git a/app/layout/simple.phtml b/app/layout/simple.phtml index 8a2ee14bb..c9d209999 100644 --- a/app/layout/simple.phtml +++ b/app/layout/simple.phtml @@ -31,7 +31,7 @@ <div class="item title"> <a href="<?= _url('index', 'index') ?>"> <?php if (FreshRSS_Context::$system_conf->logo_html == '') { ?> - <img class="logo" src="<?= _i('FreshRSS-logo', FreshRSS_Themes::ICON_URL) ?>" alt="FreshRSS" /> + <img class="logo" src="<?= _i('FreshRSS-logo', FreshRSS_Themes::ICON_URL) ?>" alt="FreshRSS" loading="lazy" /> <?php } else { echo FreshRSS_Context::$system_conf->logo_html; |
