aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Inverle <inverle@proton.me> 2025-12-04 08:48:03 +0100
committerGravatar GitHub <noreply@github.com> 2025-12-04 08:48:03 +0100
commitd55f017ccd941c135055d7c3a85007b8e7e02449 (patch)
treead893132bae1c1e44ba49e7f28ed551aa3e48654 /app/views
parent60cf5ea297a17db861e73cd65d7b7862bd6bcc24 (diff)
Implement button for toggling sidebar on all views (#8201)
* Implement button for toggling sidebar on all views Closes https://github.com/FreshRSS/FreshRSS/issues/7673, https://github.com/FreshRSS/FreshRSS/issues/7100, https://github.com/FreshRSS/FreshRSS/issues/6119, https://github.com/FreshRSS/FreshRSS/issues/5338, https://github.com/FreshRSS/FreshRSS/issues/2792, https://github.com/FreshRSS/FreshRSS/issues/4224, https://github.com/FreshRSS/FreshRSS/issues/4136 https://github.com/user-attachments/assets/0629e465-6450-440e-b38b-430e9ff73ef9 Keyboard shortcut for doing the same: <kbd>t</kbd> * Partially fix other views Repartition page looks broken on Swage * Correction `close-aside` wasn't meant to be removed * i18n(conf): fr Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * make fix-all * Fix settings slider not opening in reader view * make readme --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/shortcut.phtml7
-rw-r--r--app/views/helpers/javascript_vars.phtml1
-rw-r--r--app/views/index/reader.phtml10
-rw-r--r--app/views/stats/repartition.phtml7
4 files changed, 24 insertions, 1 deletions
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml
index 3f7f84759..37847e39a 100644
--- a/app/views/configure/shortcut.phtml
+++ b/app/views/configure/shortcut.phtml
@@ -170,6 +170,13 @@
<legend><?= _t('conf.shortcut.other_action') ?></legend>
<div class="form-group">
+ <label class="group-name" for="toggle_aside"><?= _t('conf.shortcut.toggle_aside') ?></label>
+ <div class="group-controls">
+ <input type="text" id="toggle_aside" name="shortcuts[toggle_aside]" list="keys" value="<?= $s['toggle_aside'] ?>" />
+ </div>
+ </div>
+
+ <div class="form-group">
<label class="group-name" for="actualize"><?= _t('gen.action.actualize') ?></label>
<div class="group-controls">
<input type="text" id="actualize" name="shortcuts[actualize]" list="keys" value="<?= $s['actualize'] ?>" />
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 96275d51b..73e047e11 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -65,6 +65,7 @@ echo json_encode([
'reading_view' => $s['reading_view'] ?? '',
'rss_view' => $s['rss_view'] ?? '',
'toggle_media' => $s['toggle_media'] ?? '',
+ 'toggle_aside' => $s['toggle_aside'] ?? '',
],
'urls' => [
'index' => _url('index', 'index'),
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index d76af2dc7..648b046ed 100644
--- a/app/views/index/reader.phtml
+++ b/app/views/index/reader.phtml
@@ -59,3 +59,13 @@ $useKeepUnreadImportant = !FreshRSS_Context::isImportant() && !FreshRSS_Context:
</div>
</main>
<?php endif; ?>
+
+<?php $class = $this->displaySlider ? ' active' : ''; ?>
+<aside id="slider" class="<?= $class ?>">
+ <a class="toggle_aside" href="#close"><?= _i('close') ?></a>
+ <div id="slider-content">
+ </div>
+</aside>
+<a href="#" id="close-slider" class="<?= $class ?>">
+ <?= _i('close') ?>
+</a>
diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml
index d7515a789..34edd1ab1 100644
--- a/app/views/stats/repartition.phtml
+++ b/app/views/stats/repartition.phtml
@@ -6,7 +6,12 @@
?>
<nav class="nav_menu">
- <a class="btn toggle_aside" href="#aside_feed"><?= _i('category') ?></a>
+ <div id="nav_menu_toggle_aside" class="nav_mobile">
+ <button class="btn">
+ <?= _i('category') ?>
+ </button>
+ </div>
+
<select id="feed_select" class="select-change">
<option data-url="<?= _url('stats', 'repartition') ?>"><?= _t('admin.stats.all_feeds') ?></option>