add module menu

This commit is contained in:
ghost 2021-12-30 20:35:36 +02:00
parent 823a6a4616
commit 40afd61367
4 changed files with 22 additions and 18 deletions

View File

@ -0,0 +1,3 @@
<?php
require(PROJECT_DIR . '/application/view/common/module/menu.phtml');

View File

@ -0,0 +1,15 @@
<div class="menu" id="moduleMenu">
<a class="item" href="/" title="<?php echo _('Home') ?>">
<i class="bi bi-house"></i>
</a><a class="item" href="follow" title="<?php echo _('Follow') ?>">
<i class="bi bi-person"></i>
</a><a class="item" href="#todo" title="<?php echo _('Bookmarks') ?>">
<i class="bi bi-bookmarks"></i>
</a><a class="item" href="#todo" title="<?php echo _('Mentions') ?>">
<i class="bi bi-at"></i>
</a><a class="item" href="#todo" title="<?php echo _('Messages') ?>">
<i class="bi bi-envelope"></i>
</a><a class="item" href="#todo" title="<?php echo _('Settings') ?>">
<i class="bi bi-gear"></i>
</a>
</div>

View File

@ -1,24 +1,7 @@
<?php include(PROJECT_DIR . '/application/controller/common/header/user.php') ?>
<div class="container">
<div class="left">
<div class="menu">
<a class="item active" href="<?php echo PROJECT_HOST ?>" title="<?php echo _('Home') ?>">
<i class="bi bi-house"></i>
</a><a class="item" href="following" title="<?php echo _('Following') ?>">
<i class="bi bi-person"></i>
<?php if ($followingUsersTotal) { ?>
<span><?php echo $followingUsersTotal ?></span>
<?php } ?>
</a><a class="item" href="#todo" title="<?php echo _('Bookmarks') ?>">
<i class="bi bi-bookmarks"></i>
</a><a class="item" href="#todo" title="<?php echo _('Mentions') ?>">
<i class="bi bi-at"></i>
</a><a class="item" href="#todo" title="<?php echo _('Messages') ?>">
<i class="bi bi-envelope"></i>
</a><a class="item" href="#todo" title="<?php echo _('Settings') ?>">
<i class="bi bi-gear"></i>
</a>
</div>
<?php include(PROJECT_DIR . '/application/controller/common/module/menu.php') ?>
</div>
<div class="right">
<div class="post">

View File

@ -120,5 +120,8 @@ var Home = {
}
$(document).ready(function() {
Home.post.get('#feed', true);
$('#moduleMenu > a[href="/"]').addClass('active');
});