caelum-bludit-theme/php/sidebar.php

47 lines
1.4 KiB
PHP
Raw Permalink Normal View History

2024-08-17 17:30:35 +02:00
<section class="card c-secondary" id="sidebar-about">
<h2 class="card-header">À propos</h2>
<?php foreach ($staticContent as $tmp) : ?>
<?php if ($tmp->position() == 1) : ?>
<img alt="" src="<?php echo $page->user('profilePicture');?>" class="avatar avatar-120 photo" height="120" width="120" decoding="async">
<?php echo $tmp->content(); ?>
<?php endif ?>
<?php endforeach ?>
<div>
<a href="/rss.xml" class="button">Suivre</a>
</div>
</section>
<section class="card c-secondary">
<h2 class="card-header">Catégories</h2>
<div class="menu fg-dark">
<ul>
<?php
$items = getCategories();
foreach ($items as $category) {
if (count($category->pages())>0) {
?>
<li><a class="menu-element" href="<?php echo $category->permalink(); ?>"><?php echo $category->name(); ?> <span class="badge bg-primary m0"><?php echo count($category->pages()); ?></span></a></li>
<?php }
}
?>
</ul>
</div>
</section>
<section class="card c-secondary">
<h2 class="card-header">Pages</h2>
<div class="menu fg-dark">
<ul>
<?php foreach ($staticContent as $tmp) : ?>
<?php if ($tmp->position() > 10) : ?>
<li><a href="<?php echo $tmp->permalink(); ?>"><?php echo $tmp->title(); ?></a></li>
<?php endif ?>
<?php endforeach ?>
</ul>
</div>
</section>
<div class="fakebutton">
© 2024 <?php echo $site->title() ?>
</div>