summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBigCoke233 <hi@guhub.cn>2020-04-10 09:17:10 +0800
committerBigCoke233 <hi@guhub.cn>2020-04-10 09:17:10 +0800
commitcc6d146981eab5fd389308b9e621503f4719f3df (patch)
treeb923ff11748dd086df8d02d785ec33333f9ba183
parentf5bced134e73cf20da42124f77ab001a38f1739b (diff)
:broom: Fix: 修复导航栏判断问题
-rw-r--r--includes/header.php6
-rw-r--r--libs/Contents.php6
2 files changed, 6 insertions, 6 deletions
diff --git a/includes/header.php b/includes/header.php
index 6b910a1..2d4728b 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -44,7 +44,7 @@
->parse('<div class="col-6"><a href="{permalink}">{title}</a></div>');
}
else {
- echo Contents::paresNav($this->options->customNav,"mobile");
+ echo Contents::paresNav($this->options->customNav, "mobile");
}?>
</div></div></div>
<div class="mobile-menu-footer">
@@ -78,7 +78,7 @@
->parse('<a href="{permalink}">{title}</a>');
}
else {
- echo Contents::paresNav($this->options->customNav,"top-nav");
+ echo Contents::paresNav($this->options->customNav, "top-nav");
}?>
</span>
</p>
@@ -106,7 +106,7 @@
->parse('<a href="{permalink}" onclick="toggleDrawer()">{title}</a>');
}
else {
- echo Contents::paresNav($this->options->customNav,"drawer");
+ echo Contents::paresNav($this->options->customNav, "drawer");
}?>
</div>
</div>
diff --git a/libs/Contents.php b/libs/Contents.php
index da552a5..45b8f03 100644
--- a/libs/Contents.php
+++ b/libs/Contents.php
@@ -224,13 +224,13 @@ class Contents
$title = $de_json[$i]['title'];
$link = $de_json[$i]['link'];
//输出导航
- if($type="top-nav") {
+ if($type=="top-nav") {
echo '<a href="'. $link .'">'. $title .'</a>';
}
- elseif($type="mobile") {
+ elseif($type=="mobile") {
echo '<div class="col-6"><a href="'. $link .'">'. $title .'</a></div>';
}
- elseif($type="drawer") {
+ elseif($type=="drawer") {
echo '<a href="'. $link .'" onclick="toggleDrawer()">'. $title .'</a>';
}
}