diff options
| author | 2023-01-30 20:32:55 +0100 | |
|---|---|---|
| committer | 2023-01-30 20:32:55 +0100 | |
| commit | e53ba88bb96ba1343ffc771f6170baa4342b4e39 (patch) | |
| tree | 6b7f2cec9fe51b788e186f102008ff4b2e86d1b2 /app/layout | |
| parent | 4ad66c24bfd96a5f5a71eec895e9d3085d67f4a0 (diff) | |
Search Improved: dropdown (#4994)
* first draft
* fix
* RTL CSS
* add link to documentation
* hide search button in desktop view
* rename .no-desktop to .only-mobile
* i18n
* add ID
* Theme: Swage
* Theme Scewdriver
* Theme Pafat
* Theme flat
* Theme: Adark
* Theme: Dark
* i18n: German
* i18n en-us
* fix i18n
* Update app/i18n/fr/gen.php
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* Update app/layout/nav_menu.phtml
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* Update app/layout/nav_menu.phtml
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* Update app/layout/nav_menu.phtml
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* wip
* mapco theme
* RTL for Ansum and Mapco
* fix
* fix
---------
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/layout')
| -rw-r--r-- | app/layout/nav_menu.phtml | 72 |
1 files changed, 44 insertions, 28 deletions
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index f719538fd..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,33 +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 $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 } ?> - </form> - </div> - <?php if (FreshRSS_Context::$order === 'DESC') { $order = 'ASC'; |
