-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsidebar.php
59 lines (59 loc) · 3.1 KB
/
sidebar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div class="sidebar-menu toggle-others fixed">
<div class="sidebar-menu-inner">
<header class="logo-env">
<!-- logo -->
<div class="logo">
<a href="<?php $this->options->siteUrl(); ?>" class="logo-expanded" title="<?php $this->options->title(); ?>">
<img src="<?php $this->options->logo_large(); ?>" style="width: 100%; max-height: 60px;"
alt="<?php $this->options->title(); ?>"/>
</a>
<a href="<?php $this->options->siteUrl(); ?>" class="logo-collapsed" title="<?php $this->options->title(); ?>">
<img src="<?php $this->options->logo_small(); ?>" style="max-width: 40px; max-height: 40px;"
alt="<?php $this->options->title(); ?>"/>
</a>
</div>
<div class="mobile-menu-toggle visible-xs">
<a href="#" data-toggle="user-info-menu">
<i class="linecons-cog"></i>
</a>
<a href="#" data-toggle="mobile-menu">
<i class="fa-bars"></i>
</a>
</div>
</header>
<ul id="main-menu" class="main-menu">
<?php $this->widget('Widget_Metas_Category_List')->to($categorys); ?>
<?php while ($categorys->next()): ?>
<?php if ($categorys->levels === 0): ?>
<?php $children = $categorys->getAllChildren($categorys->mid); ?>
<?php if (empty($children)) { ?>
<li>
<a href="<?php if ($this->is('index')): ?><?php else: ?>/<?php endif; ?>#<?php $categorys->name(); ?>"
class="smooth" title="<?php $categorys->name(); ?>">
<i class="fa fa-<?php $categorys->slug(); ?>"></i>
<span class="title"><?php $categorys->name(); ?></span>
</a>
</li>
<?php } else { ?>
<li>
<a>
<i class="fa fa-<?php $categorys->slug(); ?>"></i>
<span class="title"><?php $categorys->name(); ?></span>
</a>
<ul>
<?php foreach ($children as $mid) { ?>
<?php $child = $categorys->getCategory($mid); ?>
<li>
<a href="<?php if ($this->is('index')): ?><?php else: ?>/<?php endif; ?>#<?php echo $child['name']; ?>"
class="smooth" title="<?php echo $child['name']; ?>"><?php echo $child['name']; ?></a>
</li>
<?php } ?>
</ul>
</li>
<?php } ?>
<?php endif; ?>
<?php endwhile; ?>
</ul>
</div>
</div>