diff options
| author | 2021-07-21 22:42:04 +0200 | |
|---|---|---|
| committer | 2021-07-21 22:42:04 +0200 | |
| commit | ab0285b0aa05574ae864bef590ffd6ea36f0c50a (patch) | |
| tree | 88292a7ba37615a07ebde443d8c69cc75144978d /app | |
| parent | 3c945bee7bc1853ea4bf38b1b04259a465bf08d2 (diff) | |
Add HTML5 tags (#3651)
* use HTML5 tags #3643
added some HTML5 tags: header, main, nav
* <main> into <div>
as dicussed in the PR.
Todo: check side effects (f.e. threepaneview extension)
* fixed whitespace with tabs
* fixed more whitespaces with tabs
it was not my fault, but I fixed it
* added empty lines as wished
* Update app/views/index/global.phtml
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* Update app/views/index/global.phtml
* Update app/views/index/global.phtml
* Update app/views/index/global.phtml
* Update app/views/index/global.phtml
* Update app/views/index/global.phtml
* Update app/views/index/global.phtml
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Diffstat (limited to 'app')
| -rw-r--r-- | app/layout/aside_feed.phtml | 4 | ||||
| -rw-r--r-- | app/layout/header.phtml | 8 | ||||
| -rw-r--r-- | app/layout/nav_entries.phtml | 12 | ||||
| -rw-r--r-- | app/layout/nav_menu.phtml | 4 | ||||
| -rw-r--r-- | app/views/index/global.phtml | 4 | ||||
| -rw-r--r-- | app/views/index/normal.phtml | 8 | ||||
| -rw-r--r-- | app/views/index/reader.phtml | 8 |
7 files changed, 25 insertions, 23 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index c3f066601..51f138e79 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -10,7 +10,7 @@ $state_filter = FreshRSS_Context::$user_conf->show_fav_unread ? '&state=3' : ''; ?> -<div class="aside aside_feed<?= $class ?>" id="aside_feed"> +<nav class="aside aside_feed<?= $class ?>" id="aside_feed"> <a class="toggle_aside" href="#close"><?= _i('close') ?></a> <?php if (FreshRSS_Auth::hasAccess()) { ?> @@ -111,7 +111,7 @@ <li class="tree-bottom"></li> </ul> </form> -</div> +</nav> <div id="first_load" class="loading"></div> <?php flush(); ?> diff --git a/app/layout/header.phtml b/app/layout/header.phtml index 7603cf2e5..cf7e4d20e 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -12,7 +12,7 @@ if (FreshRSS_Auth::accessNeedsAction()) { } ?> -<div class="header"> +<header class="header"> <div class="item title"> <h1> <a href="<?= _url('index', 'index') ?>"> @@ -51,7 +51,7 @@ if (FreshRSS_Auth::accessNeedsAction()) { </div> <?php if (FreshRSS_Auth::hasAccess()) { ?> - <div class="item configure"> + <nav class="item configure"> <div class="dropdown"> <div id="dropdown-configure" class="dropdown-target"></div> <a class="btn dropdown-toggle" href="#dropdown-configure"><?= _i('configure') ?></a> @@ -96,10 +96,10 @@ if (FreshRSS_Auth::accessNeedsAction()) { <?php endif; ?> </ul> </div> - </div> + </nav> <?php } elseif (FreshRSS_Auth::accessNeedsAction()) { ?> <div class="item configure"> <?= _i('login') ?><a class="signin" href="<?= _url('auth', 'login') ?>"><?= _t('gen.auth.login') ?></a> </div> <?php } ?> -</div> +</header> diff --git a/app/layout/nav_entries.phtml b/app/layout/nav_entries.phtml index cbc514737..55e1743dc 100644 --- a/app/layout/nav_entries.phtml +++ b/app/layout/nav_entries.phtml @@ -1,5 +1,7 @@ -<ul id="nav_entries"> - <li class="item"><a class="previous_entry" href="#"><?= _i('prev') ?></a></li> - <li class="item"><a class="up" href="#"><?= _i('up') ?></a></li> - <li class="item"><a class="next_entry" href="#"><?= _i('next') ?></a></li> -</ul>
\ No newline at end of file +<nav> + <ul id="nav_entries"> + <li class="item"><a class="previous_entry" href="#"><?= _i('prev') ?></a></li> + <li class="item"><a class="up" href="#"><?= _i('up') ?></a></li> + <li class="item"><a class="next_entry" href="#"><?= _i('next') ?></a></li> + </ul> +</nav> diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 0724abc16..874a4273a 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -2,7 +2,7 @@ $actual_view = Minz_Request::actionName(); ?> -<div class="nav_menu"> +<nav class="nav_menu"> <?php if ($actual_view === 'normal' || $actual_view === 'reader') { ?> <a class="btn toggle_aside" href="#aside_feed"><?= _i('category') ?></a> <?php } ?> @@ -225,5 +225,5 @@ <?php if (FreshRSS_Auth::hasAccess() || FreshRSS_Context::$system_conf->allow_anonymous_refresh) { ?> <a id="actualize" class="btn" href="<?= _url('feed', 'actualize') ?>" title="<?= _t('gen.action.actualize') ?>"><?= _i('refresh') ?></a> <?php } ?> -</div> +</nav> <?php flush(); ?> diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index e286d0946..4323e3849 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -9,7 +9,7 @@ } ?> -<div id="stream" class="global<?= $class ?>"> +<main id="stream" class="global<?= $class ?>"> <?php $params = Minz_Request::fetchGET(); unset($params['c']); @@ -50,7 +50,7 @@ } } ?> -</div> +</main> <div id="overlay"> <a class="close" href="#"><?= _i('close') ?></a> diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index 3077d79f2..418c44111 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -14,7 +14,7 @@ $content_width = FreshRSS_Context::$user_conf->content_width; $today = @strtotime('today'); ?> -<div id="stream" class="normal<?= $hidePosts ? ' hide_posts' : '' ?>"> +<main id="stream" class="normal<?= $hidePosts ? ' hide_posts' : '' ?>"> <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 @@ -110,14 +110,14 @@ $today = @strtotime('today'); if ($nbEntries > 0): call_user_func($this->callbackBeforePagination, $this, $nbEntries, $lastEntry); $this->renderHelper('pagination'); -?></div><?php +?></main><?php else: ob_end_clean(); //Discard the articles headers, as we have no articles ?> -<div id="stream" class="prompt alert alert-warn normal"> +<main id="stream" class="prompt alert alert-warn normal"> <h2><?= _t('index.feed.empty') ?></h2> <a href="<?= _url('subscription', 'add') ?>"><?= _t('index.feed.add') ?></a><br /><br /> -</div> +</main> <?php endif; ?> <?php if ($nbEntries > 0 && FreshRSS_Context::$user_conf->show_nav_buttons) $this->partial('nav_entries'); ?> diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index 0b1288ae6..8183a67e7 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -7,8 +7,8 @@ call_user_func($this->callbackBeforeEntries, $this); $lazyload = FreshRSS_Context::$user_conf->lazyload; $content_width = FreshRSS_Context::$user_conf->content_width; ?> +<main id="stream" class="reader"> -<div id="stream" class="reader"> <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 @@ -76,12 +76,12 @@ $content_width = FreshRSS_Context::$user_conf->content_width; if ($nbEntries > 0): call_user_func($this->callbackBeforePagination, $this, $nbEntries, $lastEntry); $this->renderHelper('pagination'); -?></div><?php +?></main><?php else: ob_end_clean(); //Discard the articles headers, as we have no articles ?> -<div id="stream" class="prompt alert alert-warn reader"> +<main id="stream" class="prompt alert alert-warn reader"> <h2><?= _t('index.feed.empty') ?></h2> <a href="<?= _url('subscription', 'add') ?>"><?= _t('index.feed.add') ?></a><br /><br /> -</div> +</main> <?php endif; ?> |
