Ver código fonte

Fix: double main tags (#4014)

* replace div with main

* include the slider into main

* format source

* add close icon for the extension slider

* replace div with main

* Update shortcut.phtml

* fixed the nits
maTh 4 anos atrás
pai
commit
a54aa19dc7

+ 4 - 4
app/install.php

@@ -678,7 +678,7 @@ if (_t('gen.dir') === 'rtl') {
 	</div>
 </header>
 
-<main id="global">
+<div id="global">
 	<nav class="nav nav-list aside">
 		<div class="nav-header"><?= _t('install.steps') ?></div>
 		<ol>
@@ -716,7 +716,7 @@ if (_t('gen.dir') === 'rtl') {
 		</ol>
 	</nav>
 
-	<div class="post">
+	<main class="post">
 		<h1><?= _t('install.title') ?>: <?= _t('install.step', STEP + 1) ?></h1>
 		<?php
 		switch (STEP) {
@@ -741,8 +741,8 @@ if (_t('gen.dir') === 'rtl') {
 			break;
 		}
 		?>
-	</div>
-</main>
+	</main>
+</div>
 	<script src="../scripts/install.js?<?= @filemtime(PUBLIC_PATH . '/scripts/install.js') ?>"></script>
 	</body>
 </html>

+ 2 - 2
app/layout/layout.phtml

@@ -48,7 +48,7 @@ if (_t('gen.dir') === 'rtl') {
 	$this->partial('header');
 ?>
 
-<main id="global">
+<div id="global">
 	<?php
 		flush();
 		if (isset($this->callbackBeforeFeeds)) {
@@ -56,7 +56,7 @@ if (_t('gen.dir') === 'rtl') {
 		}
 		$this->render();
 	?>
-</main>
+</div>
 
 <?php
 	$msg = '';

+ 2 - 2
app/views/auth/formLogin.phtml

@@ -1,4 +1,4 @@
-<div class="prompt">
+<main class="prompt">
 	<h1><?= _t('gen.auth.login') ?></h1>
 
 	<?php if (!max_registrations_reached()) { ?>
@@ -39,4 +39,4 @@
 	</form>
 
 	<p><a href="<?= _url('index', 'about') ?>"><?= _t('gen.freshrss.about') ?></a></p>
-</div>
+</main>

+ 2 - 2
app/views/auth/index.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -77,4 +77,4 @@
 			</div>
 		</div>
 	</form>
-</div>
+</main>

+ 2 - 2
app/views/auth/register.phtml

@@ -1,4 +1,4 @@
-<div class="prompt">
+<main class="prompt">
 	<h1><?= _t('gen.auth.registration') ?></h1>
 
 	<form method="post" action="<?= _url('user', 'create') ?>">
@@ -66,4 +66,4 @@
 	</form>
 
 	<p><a href="<?= _url('index', 'about') ?>"><?= _t('gen.freshrss.about') ?></a></p>
-</div>
+</main>

+ 2 - 2
app/views/configure/archiving.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -162,4 +162,4 @@
 		</div>
 	</div>
 	<?php endif; ?>
-</div>
+</main>

+ 2 - 2
app/views/configure/display.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -209,4 +209,4 @@
 			</div>
 		</div>
 	</form>
-</div>
+</main>

+ 2 - 2
app/views/configure/integration.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -77,4 +77,4 @@
 			</div>
 		</div>
 	</form>
-</div>
+</main>

+ 14 - 13
app/views/configure/queries.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -56,16 +56,17 @@
 		</div>
 		<?php } ?>
 	</form>
-</div>
 
-<?php $class = $this->displaySlider ? ' class="active"' : ''; ?>
-<a href="#" id="close-slider"<?= $class ?>>
-	<?= _i('close') ?>
-</a>
-<div id="slider"<?= $class ?>>
-<?php
-	if (isset($this->query)) {
-		$this->renderHelper('configure/query');
-	}
-?>
-</div>
+	<?php $class = $this->displaySlider ? ' class="active"' : ''; ?>
+	<a href="#" id="close-slider"<?= $class ?>>
+		<?= _i('close') ?>
+	</a>
+	<div id="slider"<?= $class ?>>
+	<?php
+		if (isset($this->query)) {
+			$this->renderHelper('configure/query');
+		}
+	?>
+	</div>
+
+</main>

+ 2 - 2
app/views/configure/reading.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -256,4 +256,4 @@
 		</div>
 
 	</form>
-</div>
+</main>

+ 2 - 2
app/views/configure/shortcut.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -243,4 +243,4 @@
 			</div>
 		</div>
 	</form>
-</div>
+</main>

+ 2 - 2
app/views/configure/system.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -92,4 +92,4 @@
 			</div>
 		</div>
 	</form>
-</div>
+</main>

+ 2 - 2
app/views/error/index.phtml

@@ -1,4 +1,4 @@
-<div class="post">
+<main class="post">
 	<div class="alert alert-error">
 		<h1 class="alert-head"><?= $this->code ?></h1>
 		<p>
@@ -12,4 +12,4 @@
 			<?php } ?>
 		</p>
 	</div>
-</div>
+</main>

+ 14 - 11
app/views/extension/index.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -66,14 +66,17 @@
 			</table>
 		</div>
 	<?php } ?>
-</div>
 
-<?php $class = isset($this->extension) ? ' class="active"' : ''; ?>
-<a href="#" id="close-slider"<?= $class ?>></a>
-<div id="slider"<?= $class ?>>
-<?php
-	if (isset($this->extension)) {
-		$this->renderHelper('extension/configure');
-	}
-?>
-</div>
+	<?php $class = isset($this->extension) ? ' class="active"' : ''; ?>
+	<a href="#" id="close-slider"<?= $class ?>>
+		<?= _i('close') ?>
+	</a>
+	<div id="slider"<?= $class ?>>
+	<?php
+		if (isset($this->extension)) {
+			$this->renderHelper('extension/configure');
+		}
+	?>
+	</div>
+
+</main>

+ 2 - 2
app/views/feed/add.phtml

@@ -1,5 +1,5 @@
 <?php if ($this->feed) { ?>
-<div class="post">
+<main class="post">
 	<h1><?= _t('sub.feed.add') ?></h1>
 
 	<?php if (!$this->load_ok) { ?>
@@ -88,5 +88,5 @@
 			</div>
 		</div>
 	</form>
-</div>
+</main>
 <?php } ?>

+ 2 - 2
app/views/importExport/index.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_subscription'); ?>
 
-<div class="post ">
+<main class="post ">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -69,4 +69,4 @@
 		</div>
 	</form>
 	<?php } ?>
-</div>
+</main>

+ 2 - 2
app/views/index/about.phtml

@@ -2,7 +2,7 @@
 <?php $this->partial('aside_configure'); ?>
 <?php } ?>
 
-<div class="post content">
+<main class="post content">
 	<?php if (FreshRSS_Auth::hasAccess()) {?>
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
@@ -28,4 +28,4 @@
 
 	<h2><?= _t('index.about.credits') ?></h2>
 	<p><?= _t('index.about.credits_content') ?></p>
-</div>
+</main>

+ 2 - 2
app/views/index/logs.phtml

@@ -1,4 +1,4 @@
-<div class="post content">
+<main class="post content">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -27,4 +27,4 @@
 	<?php } else { ?>
 	<p class="alert alert-warn"><?= _t('index.log.empty') ?></p>
 	<?php } ?>
-</div>
+</main>

+ 2 - 2
app/views/index/tos.phtml

@@ -1,4 +1,4 @@
-<div class="post content">
+<main class="post content">
 	<?php if ($this->can_register) { ?>
 		<a href="<?= _url('auth', 'register') ?>">
 			<?= _t('gen.action.back') ?>
@@ -10,4 +10,4 @@
 	<?php } ?>
 
 	<?= $this->terms_of_service ?>
-</div>
+</main>

+ 2 - 2
app/views/stats/idle.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_subscription'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -50,4 +50,4 @@
 		<span class="alert-head"><?= _t('admin.stats.no_idle') ?></span>
 	</p>
 	<?php } ?>
-</div>
+</main>

+ 2 - 2
app/views/stats/index.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_subscription'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -118,6 +118,6 @@
 			</div>
 		</div>
 	</div>
-</div>
+</main>
 
 <script src="../scripts/statsWithChartjs.js?<?= @filemtime(PUBLIC_PATH . '/scripts/statsWithChartjs.js') ?>"></script>

+ 2 - 2
app/views/stats/repartition.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_subscription'); ?>
 
-<div class="post ">
+<main class="post ">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -102,6 +102,6 @@
 			</div>
 		</div>
 	</div>
-</div>
+</main>
 
 <script src="../scripts/statsWithChartjs.js?<?= @filemtime(PUBLIC_PATH . '/scripts/statsWithChartjs.js') ?>"></script>

+ 2 - 2
app/views/subscription/add.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_subscription'); ?>
 
-<div class="post drop-section">
+<main class="post drop-section">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -123,4 +123,4 @@
 			</div>
 		</div>
 	</form>
-</div>
+</main>

+ 2 - 2
app/views/subscription/bookmarklet.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_subscription'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -15,4 +15,4 @@
 	<h2><?= _t('sub.api.title') ?></h2>
 	<p><?= _t('sub.api.documentation') ?></p>
 	<kbd><?= Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true) ?>&amp;url_rss=%s</kbd>
-</div>
+</main>

+ 15 - 15
app/views/subscription/index.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_subscription'); ?>
 
-<div class="post drop-section">
+<main class="post drop-section">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -73,18 +73,18 @@
 		</ul>
 	</div>
 
-</div>
+	<?php $class = $this->displaySlider ? ' class="active"' : ''; ?>
+	<a href="#" id="close-slider"<?= $class ?>>
+		<?= _i('close') ?>
+	</a>
+	<div id="slider"<?= $class ?>>
+	<?php
+		if (isset($this->feed)) {
+			$this->renderHelper('feed/update');
+		} elseif (isset($this->category)) {
+			$this->renderHelper('category/update');
+		}
+	?>
+	</div>
 
-<?php $class = $this->displaySlider ? ' class="active"' : ''; ?>
-<a href="#" id="close-slider"<?= $class ?>>
-	<?= _i('close') ?>
-</a>
-<div id="slider"<?= $class ?>>
-<?php
-	if (isset($this->feed)) {
-		$this->renderHelper('feed/update');
-	} elseif (isset($this->category)) {
-		$this->renderHelper('category/update');
-	}
-?>
-</div>
+</main>

+ 2 - 2
app/views/tag/index.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_subscription'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -80,4 +80,4 @@
 			</div>
 		</div>
 	</form>
-</div>
+</main>

+ 2 - 2
app/views/update/apply.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -8,4 +8,4 @@
 	<h1><?= _t('admin.update') ?></h1>
 
 	<?php ask_info_update(); ?>
-</div>
+</main>

+ 2 - 2
app/views/update/checkInstall.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -38,4 +38,4 @@
 	<?php } ?>
 	*/ ?>
 
-</div>
+</main>

+ 2 - 2
app/views/update/index.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -47,4 +47,4 @@
 	<?php if ($this->update_to_apply) { ?>
 	<a class="btn btn-important" href="<?= _url('update', 'apply') ?>"><?= _t('admin.update.apply') ?></a>
 	<?php } ?>
-</div>
+</main>

+ 2 - 2
app/views/user/details.phtml

@@ -4,7 +4,7 @@
 <?php $isAdmin = $this->details['is_admin']; ?>
 <?php $enabled = $this->details['enabled']; ?>
 
-<div class="post">
+<main class="post">
 	<a href="<?= _url('user', 'manage'); ?>"><?= _t('admin.user.back_to_manage'); ?></a>
 
 	<h1><?= $this->username ?><?php if ($isAdmin) echo ' ― ', _t('admin.user.admin'); ?></h1>
@@ -84,4 +84,4 @@
 			<div>
 		</div>
 	</form>
-</div>
+</main>

+ 2 - 2
app/views/user/manage.phtml

@@ -1,6 +1,6 @@
 <?php $this->partial('aside_configure'); ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -108,4 +108,4 @@
 			</tbody>
 		</table>
 	</div>
-</div>
+</main>

+ 2 - 2
app/views/user/profile.phtml

@@ -4,7 +4,7 @@
 	}
 ?>
 
-<div class="post">
+<main class="post">
 	<div class="link-back-wrapper">
 		<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
 	</div>
@@ -133,4 +133,4 @@
 		</div>
 	</form>
 	<?php } ?>
-</div>
+</main>

+ 2 - 2
app/views/user/validateEmail.phtml

@@ -1,4 +1,4 @@
-<div class="post">
+<main class="post">
 	<p>
 		<?= _t('user.email.validation.need_to', FreshRSS_Context::$system_conf->title) ?>
 	</p>
@@ -19,4 +19,4 @@
 			<?= _t('user.email.validation.change_email', _url('user', 'profile')) ?>
 		</small>
 	</p>
-</div>
+</main>