diff --git a/Bootstrap.Admin/Models/ModelBase.cs b/Bootstrap.Admin/Models/ModelBase.cs index cf3f08a7..f7568fec 100644 --- a/Bootstrap.Admin/Models/ModelBase.cs +++ b/Bootstrap.Admin/Models/ModelBase.cs @@ -17,6 +17,7 @@ namespace Bootstrap.Admin.Models Theme = DictHelper.RetrieveActiveTheme(); IsDemo = DictHelper.RetrieveSystemModel(); ShowCardTitle = DictHelper.RetrieveCardTitleStatus() ? "" : "no-card-header"; + ShowSideBar = DictHelper.RetrieveSidebarStatus() ? "" : "sidebar-open"; } /// @@ -43,5 +44,10 @@ namespace Bootstrap.Admin.Models /// 是否显示卡片标题 /// public string ShowCardTitle { get; protected set; } + + /// + /// 是否收缩侧边栏 + /// + public string ShowSideBar { get; protected set; } } } diff --git a/Bootstrap.Admin/Views/Admin/Settings.cshtml b/Bootstrap.Admin/Views/Admin/Settings.cshtml index df265ebc..c45cacb4 100644 --- a/Bootstrap.Admin/Views/Admin/Settings.cshtml +++ b/Bootstrap.Admin/Views/Admin/Settings.cshtml @@ -87,7 +87,7 @@
- +
diff --git a/Bootstrap.Admin/Views/Home/Index.cshtml b/Bootstrap.Admin/Views/Home/Index.cshtml index 40b5cfb4..d82231f6 100644 --- a/Bootstrap.Admin/Views/Home/Index.cshtml +++ b/Bootstrap.Admin/Views/Home/Index.cshtml @@ -28,6 +28,10 @@ .breadcrumb { border-top: solid 1px #ddd !important; } + + .sidebar-open .sidebar-toggle-box .fa-bars { + transform: rotate(0); + } }
diff --git a/Bootstrap.Admin/Views/Shared/_Layout.cshtml b/Bootstrap.Admin/Views/Shared/_Layout.cshtml index 9e830cd2..f893ecfb 100644 --- a/Bootstrap.Admin/Views/Shared/_Layout.cshtml +++ b/Bootstrap.Admin/Views/Shared/_Layout.cshtml @@ -1,4 +1,5 @@ - +@model ModelBase + @@ -13,7 +14,7 @@ - +