update code formatting
This commit is contained in:
parent
65735a5775
commit
dcea304d8f
1 changed files with 21 additions and 11 deletions
32
mkht.php
32
mkht.php
|
@ -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'))
|
||||
|
|
Loading…
Reference in a new issue