update code formatting

This commit is contained in:
Miraty 2023-10-28 16:02:02 +02:00
parent 65735a5775
commit dcea304d8f

View file

@ -181,17 +181,27 @@ foreach ($pages as $node) {
$page_langs = $pages_langs[$path_parts_src['dirname'] . '/' . $page_names[$src]];
if (count($page_langs) > 1) {
sort($page_langs);
$lang_txt = ['fr' => 'français', 'en' => 'english'];
echo '<aside><nav><ul>';
foreach ($page_langs as $lang) {
echo '<small><li lang="' . $lang . '">';
echo '<a href="' . $page_names[$src] . '.' . $lang . '" rel="alternate" hreflang="' . $lang . '">';
echo $lang_txt[$lang] ?? $lang;
echo '</a>';
echo '</small></li>';
}
echo '</ul></nav></aside>';
$lang_txt = [
'fr' => 'français',
'en' => 'english',
];
?>
<aside>
<nav>
<ul>
<?php foreach ($page_langs as $lang) { ?>
<li lang="<?= $lang ?>">
<small>
<a href="<?= $page_names[$src] ?>.<?= $lang ?>" rel="alternate" hreflang="<?= $lang ?>">
<?= $lang_txt[$lang] ?? $lang ?>
</a>
</small>
</li>
<?php } ?>
</ul>
</nav>
</aside>
<?php
}
if (file_exists(SITE . '/header.inc.php'))