Skip to content

Commit

Permalink
feat: optimize sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
KawaiiZapic committed Sep 5, 2024
1 parent abed0cc commit 2770911
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
/** @var \Widget\Archive $this */
?>

<mdui-navigation-drawer contained class="md:w-240px fixed!" close-on-overlay-click id="matecho-drawer">
<mdui-navigation-drawer close-on-overlay-click id="matecho-drawer" modal>
<nav>
<mdui-list id="matecho-sidebar-list">
<a href="/">
<mdui-list-item <?php Matecho::activePage($this, "index"); ?> >
<mdui-list-item rounded <?php Matecho::activePage($this, "index"); ?> >
<mdui-icon-home slot="icon"></mdui-icon-home>
首页
</mdui-list-item>
Expand All @@ -22,7 +22,7 @@
if ($category->parent != 0) continue;
?>
<a href="<?php $category->permalink() ?>">
<mdui-list-item class="pl-42px" <?php Matecho::activePage($this, "category", $category->mid); ?> >
<mdui-list-item rounded class="pl-42px" <?php Matecho::activePage($this, "category", $category->mid); ?> >
<?php echo $category->name ?>
<span class="text-xs opacity-60" slot="description"><?php echo $category->description ?></span>
</mdui-list-item>
Expand All @@ -35,7 +35,7 @@
while ($page->next()) {
?>
<a href="<?php $page->permalink() ?>">
<mdui-list-item <?php Matecho::activePage($this, "page", $page->cid); ?> >
<mdui-list-item rounded <?php Matecho::activePage($this, "page", $page->cid); ?> >
<?php
$icon = Matecho::pageIcon($page);
echo "<mdui-icon-$icon slot=\"icon\"></mdui-icon-$icon>" ;
Expand Down
7 changes: 0 additions & 7 deletions src/style/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ body {
min-height: calc(100vh - 184px);
}

@media (width >= 840px) {
#matecho-drawer {
height: calc(100vh - 64px);
top: 64px;
}
}

@media (width < 840px) {
#matecho-main {
padding-left: 0 !important;
Expand Down

0 comments on commit 2770911

Please sign in to comment.