A free, self-hostable news aggregator…
Improved: better semantic HTML for boxes (#4665)
maTh46d0b4140ebc
diff --git a/app/views/configure/queries.phtml b/app/views/configure/queries.phtmlindex 93ed38e10..bc6d92846 100644--- a/app/views/configure/queries.phtml+++ b/app/views/configure/queries.phtml@@ -10,13 +10,13 @@<form method="post" action="<?= _url('configure', 'queries') ?>" class="draggableList"><input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />- <h2><?= _t('conf.query') ?></h2>+ <h1><?= _t('conf.query') ?></h1><?php foreach ($this->queries as $key => $query) { ?><div class="form-group" id="query-group-<?= $key ?>" draggable="true"><div class="box"><div class="box-title">- <a class="configure open-slider" href="<?= _url('configure', 'query', 'id', '' . $key) ?>"><?= _i('configure') ?></a><?= $query->getName() ?>+ <a class="configure open-slider" href="<?= _url('configure', 'query', 'id', '' . $key) ?>"><?= _i('configure') ?></a><h2><?= $query->getName() ?></h2><input type="hidden" id="queries_<?= $key ?>_name" name="queries[<?= $key ?>][name]" value="<?= $query->getName() ?>"/><input type="hidden" id="queries_<?= $key ?>_url" name="queries[<?= $key ?>][url]" value="<?= $query->getUrl() ?>"/><input type="hidden" id="queries_<?= $key ?>_search" name="queries[<?= $key ?>][search]" value="<?= urlencode($query->getSearch()) ?>"/>@@ -37,7 +37,7 @@</div></div><?php } else { ?>- <ul class="box-content">+ <ul class="box-content scrollbar-thin"><?php if ($query->hasSearch()) { ?><li class="item"><?= _t('conf.query.search', htmlspecialchars($query->getSearch()->getRawInput(), ENT_NOQUOTES, 'UTF-8')) ?></li><?php } ?>diff --git a/app/views/index/global.phtml b/app/views/index/global.phtmlindex 7348c9cd1..09264fb65 100644--- a/app/views/index/global.phtml+++ b/app/views/index/global.phtml@@ -14,6 +14,7 @@?><main id="stream" class="global<?= $class ?>">+ <h1 class="title_hidden"><?= _t('conf.reading.view.global') ?></h1><?php$params = $_GET;unset($params['c']);@@ -35,9 +36,9 @@?><div class="box category" data-unread="<?= $cat->nbNotRead() ?>"><div class="box-title"><a class="title" data-unread="<?= format_number($cat->nbNotRead()) ?>"- href="<?= Minz_Url::display($url_base) ?>"><?= $cat->name() ?></a></div>+ href="<?= Minz_Url::display($url_base) ?>"><h2><?= $cat->name() ?></h2></a></div>- <ul class="box-content">+ <ul class="box-content scrollbar-thin"><?phpforeach ($feeds as $feed) {$nb_not_read = $feed->nbNotRead();diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtmlindex 6a4cb77eb..c1c46e877 100644--- a/app/views/index/normal.phtml+++ b/app/views/index/normal.phtml@@ -19,6 +19,7 @@ $today = @strtotime('today');?><main id="stream" class="normal<?= $hidePosts ? ' hide_posts' : '' ?>">+ <h1 class="title_hidden"><?= _t('conf.reading.view.normal') ?></h1><div id="new-article"><a href="<?= Minz_Url::display(Minz_Request::currentRequest()) ?>"><?= _t('gen.js.new_article'); /* TODO: move string in JS*/ ?></a></div><?phpdiff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtmlindex 334cd4189..5789f229b 100644--- a/app/views/index/reader.phtml+++ b/app/views/index/reader.phtml@@ -12,7 +12,7 @@ $content_width = FreshRSS_Context::$user_conf->content_width;$MAX_TAGS_DISPLAYED = FreshRSS_Context::$user_conf->show_tags_max;?><main id="stream" class="reader">-+ <h1 class="title_hidden"><?= _t('conf.reading.view.reader') ?></h1><div id="new-article"><a href="<?= Minz_Url::display(Minz_Request::currentRequest()) ?>"><?= _t('gen.js.new_article'); /* TODO: move string in JS*/ ?></a></div><?phpdiff --git a/app/views/stats/idle.phtml b/app/views/stats/idle.phtmlindex a88dbeb8a..113bb9d1d 100644--- a/app/views/stats/idle.phtml+++ b/app/views/stats/idle.phtml@@ -21,8 +21,8 @@$nothing = false;?><div class="box">- <div class="box-title"><?= _t('gen.date.' . $period) ?></div>- <ul class="box-content">+ <div class="box-title"><h2><?= _t('gen.date.' . $period) ?></h2></div>+ <ul class="box-content scrollbar-thin"><?phpforeach ($feedsInPeriod as $feedInPeriod) {$feed = $this->feeds[$feedInPeriod['id']] ?? null;diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtmlindex 71bf5b429..3368c5ab0 100644--- a/app/views/subscription/index.phtml+++ b/app/views/subscription/index.phtml@@ -35,10 +35,10 @@<div class="box"><div class="box-title"><a class="configure open-slider" href="<?= _url('subscription', 'category', 'id', $cat->id()) ?>" data-cat-position="<?= $cat->attributes('position') ?>"><?= _i('configure') ?></a>- <?= $cat->name() ?>+ <h2><?= $cat->name() ?></h2><?php if ($cat->kind() == FreshRSS_Category::KIND_DYNAMIC_OPML) { echo _i('opml-dyn'); } ?></div>- <ul class="box-content drop-zone" dropzone="move" data-cat-id="<?= $cat->id() ?>">+ <ul class="box-content drop-zone scrollbar-thin" dropzone="move" data-cat-id="<?= $cat->id() ?>"><?phpif (!empty($feeds)) {foreach ($feeds as $feed) {@@ -82,7 +82,7 @@<div class="box visible-semi"><div class="box-title">- ✚ <a href="<?= _url('subscription', 'add') ?>"><?= _t('sub.category.add') ?></a>+ ✚ <a href="<?= _url('subscription', 'add') ?>"><h2><?= _t('sub.category.add') ?></h2></a></div><div class="box-content"></div>diff --git a/p/themes/base-theme/frss.css b/p/themes/base-theme/frss.cssindex 46fffb826..fdc99e8a7 100644--- a/p/themes/base-theme/frss.css+++ b/p/themes/base-theme/frss.css@@ -102,6 +102,10 @@ h3 {line-height: 1.5;}+.title_hidden {+ display: none;+}+/*=== Paragraphs */p {margin: 1rem 0 0.5rem;@@ -795,6 +799,10 @@ input[type="checkbox"]:focus-visible {.box .box-title {position: relative;+}++.box .box-title h2 {+ display: inline;font-size: 1.2rem;font-weight: bold;}diff --git a/p/themes/base-theme/frss.rtl.css b/p/themes/base-theme/frss.rtl.cssindex 4d731e6f7..5d3b0eab7 100644--- a/p/themes/base-theme/frss.rtl.css+++ b/p/themes/base-theme/frss.rtl.css@@ -102,6 +102,10 @@ h3 {line-height: 1.5;}+.title_hidden {+ display: none;+}+/*=== Paragraphs */p {margin: 1rem 0 0.5rem;@@ -795,6 +799,10 @@ input[type="checkbox"]:focus-visible {.box .box-title {position: relative;+}++.box .box-title h2 {+ display: inline;font-size: 1.2rem;font-weight: bold;}