aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar maTh <math-home@web.de> 2022-10-03 18:04:10 +0200
committerGravatar GitHub <noreply@github.com> 2022-10-03 18:04:10 +0200
commit46d0b4140ebc3365618b23b01c094b0860baed9d (patch)
treeee7e1d2e3a2fdf9e4932fc5de515f8a93ee20e53
parent117b9c115d3fb421820fbef44e39ac4328f3c7c1 (diff)
Improved: better semantic HTML for boxes (#4665)
* add h1 title on views * add h2 titles into box-title * thin scrollbar in box-content
-rw-r--r--app/views/configure/queries.phtml6
-rw-r--r--app/views/index/global.phtml5
-rw-r--r--app/views/index/normal.phtml1
-rw-r--r--app/views/index/reader.phtml2
-rw-r--r--app/views/stats/idle.phtml4
-rw-r--r--app/views/subscription/index.phtml6
-rw-r--r--p/themes/base-theme/frss.css8
-rw-r--r--p/themes/base-theme/frss.rtl.css8
8 files changed, 29 insertions, 11 deletions
diff --git a/app/views/configure/queries.phtml b/app/views/configure/queries.phtml
index 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.phtml
index 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">
<?php
foreach ($feeds as $feed) {
$nb_not_read = $feed->nbNotRead();
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml
index 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><?php
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index 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><?php
diff --git a/app/views/stats/idle.phtml b/app/views/stats/idle.phtml
index 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">
<?php
foreach ($feedsInPeriod as $feedInPeriod) {
$feed = $this->feeds[$feedInPeriod['id']] ?? null;
diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml
index 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() ?>">
<?php
if (!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.css
index 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.css
index 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;
}