Просмотр исходного кода

Fix missing left outline on Mark as read button (#9426)

The hidden CSRF input was the first child of the form, directly before the
Mark as read button. Theme rules such as `.stick input + .btn` and
`.stick .btn:first-child` therefore treated the button as the second element
of an input + button group: no left border and no rounded left corners.
Move the input back inside the dropdown, as it was before #9205.

Fixes #9359

Changes proposed in this pull request:

- In `app/layout/nav_menu.phtml`, move the hidden `_csrf` input of the "Mark as read" form back inside the `#nav_menu_read` dropdown (where it was before #9205), instead of being the first child of the form right before the `read_all` button.
- Because of that input, many theme rules written for `input + .btn` groups (`.stick input + .btn`, and `.btn:first-child` no longer matching) removed the left border and the rounded left corners of the "Mark as read" button. This affected Alternative Dark, Origine and the themes built on them (Dark, Dark-pink, Origine-compact), Pafat, and gave a stray separator and square corners in Flat, Ansum and Mapco.
M. Önlük 2 дней назад
Родитель
Сommit
9e53bdd223
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 0
      CREDITS.md
  2. 1 2
      app/layout/nav_menu.phtml

+ 1 - 0
CREDITS.md

@@ -37,6 +37,7 @@ People are sorted by name so please keep this order.
 * [Annika Backstrom](https://github.com/abackstrom): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:abackstrom), [Web](https://sixohthree.com/)
 * [Anton Smirnov](https://github.com/arokettu): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:arokettu), [Web](https://sandfox.me/)
 * [Antonio Santos](https://github.com/Otolock): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Otolock), [Web](https://otolock.net/)
+* [Arslan-TR](https://github.com/Arslan-TR): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Arslan-TR)
 * [ArthurHoaro](https://github.com/ArthurHoaro): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:ArthurHoaro)
 * [Artur Weigandt](https://github.com/Art4): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Art4), [Web](https://ruhr.social/@Art4)
 * [ASMfreaK](https://github.com/ASMfreaK): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:ASMfreaK)

+ 1 - 2
app/layout/nav_menu.phtml

@@ -143,13 +143,12 @@
 	<div class="nav_menu_read_all group stick">
 		<form name="mark_read_menu" class="mark-read-menu" method="post">
 		<?php $confirm = FreshRSS_Context::userConf()->reading_confirm ? 'confirm" disabled="disabled' : ''; ?>
-		<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
-
 		<button class="read_all btn <?= $confirm ?>"
 			formaction="<?= Minz_Url::display($mark_read_url) ?>"
 			type="submit"><?= _t('gen.action.mark_read') ?></button>
 
 		<div id="nav_menu_read" class="dropdown">
+			<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
 			<div id="dropdown-read" class="dropdown-target"></div>
 
 			<a class="dropdown-toggle btn" href="#dropdown-read"><?= _i('down') ?></a>