From 180fd3b926ca85cff2d17bc07727b294fd514901 Mon Sep 17 00:00:00 2001 From: liuyib <1656081615@qq.com> Date: Mon, 30 Dec 2019 13:43:37 +0800 Subject: [PATCH] refactor: Modify the width of nav when the sidebar is not enabled --- source/css/_common/responsive.styl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source/css/_common/responsive.styl b/source/css/_common/responsive.styl index 704b639..b6f9fc3 100644 --- a/source/css/_common/responsive.styl +++ b/source/css/_common/responsive.styl @@ -1,10 +1,12 @@ // $main-width: A calc value. // ----------------------------------------- @media (min-width: $main-width + $content-aside-gap * 2) { - .header-nav-inner { - width: $main-width; + if (hexo-config('sidebar.enable')) { + .header-nav-inner { + width: $main-width; + } } - + .main-inner { width: $main-width; } @@ -13,6 +15,12 @@ // $md-width: 992px - 0.02px // ----------------------------------------- @media (min-width: $md-width) { + if (!hexo-config('sidebar.enable')) { + .header-nav-inner { + width: $md-width; + } + } + .header-nav-menu { display: inline-block !important; opacity: 1 !important; -- GitLab