diff --git a/Bootstrap.Admin/Bootstrap.Admin.csproj b/Bootstrap.Admin/Bootstrap.Admin.csproj index 0a10d9e9..84af083d 100644 --- a/Bootstrap.Admin/Bootstrap.Admin.csproj +++ b/Bootstrap.Admin/Bootstrap.Admin.csproj @@ -112,6 +112,7 @@ + diff --git a/Bootstrap.Admin/Content/css/admin.css b/Bootstrap.Admin/Content/css/admin.css index 91bab8bf..5a013855 100644 --- a/Bootstrap.Admin/Content/css/admin.css +++ b/Bootstrap.Admin/Content/css/admin.css @@ -1,11 +1,27 @@ -#sidebar { +.wrapper { + display: inline-block; + padding: 15px; + width: 100%; +} + +.sidebar-closed > #sidebar > ul { + display: none; +} + +.sidebar-closed #main-content { + margin-left: 0px; +} + +.sidebar-closed #sidebar { + margin-left: -210px; +} + +#sidebar { width: 210px; - position: absolute; - top: 0; - bottom: 40px; + height: 100%; + position: fixed; background: #2a3542; overflow-y: scroll; - outline: none; margin-top: 94px; } @@ -131,7 +147,3 @@ ul.sidebar-menu { transition: all 0.3s ease; color: #aeb2b7; } - -.row { - margin-left: 210px; -} diff --git a/Bootstrap.Admin/Content/css/fix.css b/Bootstrap.Admin/Content/css/fix.css index b69668af..baddb404 100644 --- a/Bootstrap.Admin/Content/css/fix.css +++ b/Bootstrap.Admin/Content/css/fix.css @@ -3,14 +3,14 @@ overflow: hidden; } -.row { +#main-content { + margin-left: 210px; position: fixed; - overflow: auto; - top: 0; left: 0; - right: 0; bottom: 40px; - padding-top: 16px; + right: 0; + top: 94px; + overflow: auto; } .site-footer { diff --git a/Bootstrap.Admin/Content/css/site-responsive.css b/Bootstrap.Admin/Content/css/site-responsive.css new file mode 100644 index 00000000..43c96772 --- /dev/null +++ b/Bootstrap.Admin/Content/css/site-responsive.css @@ -0,0 +1,62 @@ +@media screen and (-webkit-min-device-pixel-ratio:0) { + /* Safari and Chrome */ + .dropdown-menu.extended { + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.176) !important; + } +} + +@media (min-width: 980px) { + .modal-dialog { + width: 800px; + } +} + +@media (max-width: 979px) { + .panel-body { + padding-top: 0px; + } + + .panel-body .form-inline .form-group { + margin-top: 15px; + margin-bottom: 0; + } +} + +@media (max-width: 768px) { + .sidebar-close #sidebar { + height: auto; + overflow: hidden; + overflow-y: auto; + position: absolute; + z-index: 1001; + display: block; + } + + #sidebar { + display: none; + } + + #main-content { + margin: 0px !important; + position: none !important; + } + + .top-nav { + position: absolute; + right: 10px; + top: 0px; + } +} + +@media (max-width: 480px) { + .top-nav ul.top-menu > li { + float: right; + } + + .top-nav .search { + display: none; + } +} + +@media (max-width:320px) { +} diff --git a/Bootstrap.Admin/Content/css/site.css b/Bootstrap.Admin/Content/css/site.css index 105c0943..0e504120 100644 --- a/Bootstrap.Admin/Content/css/site.css +++ b/Bootstrap.Admin/Content/css/site.css @@ -35,12 +35,6 @@ div button span { margin-top: 108px; } -.row { - margin-left: 0; - margin-right: 0; - margin-top: 92px; -} - .header, .footer { min-height: 60px; padding: 0 15px; @@ -308,13 +302,6 @@ a.logo { display: block; } -@media screen and (-webkit-min-device-pixel-ratio:0) { - /* Safari and Chrome */ - .dropdown-menu.extended { - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.176) !important; - } -} - /*Login*/ .form-signin { width: 330px; @@ -387,41 +374,18 @@ a.logo { /*end login*/ -/*bootstrap table 下边距*/ -.table-body { - padding: 0px 8px; -} - .form-inline .form-group label.control-label { margin-right: 10px; -} - -@media (min-width: 768px) { - .form-inline .form-group { - margin-bottom: 15px; - } - - .panel-body { - padding-bottom: 0; - } -} - -@media (max-width: 768px) { - .panel-body { - padding-bottom: 0; - } + width: 80px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; } .modal-body { padding-bottom: 0; } -@media (min-width: 992px) { - .modal-dialog { - width: 800px; - } -} - .modal-header { background-color: #f5f5f5; border-top-left-radius: 6px; diff --git a/Bootstrap.Admin/Content/js/_references.js b/Bootstrap.Admin/Content/js/_references.js index 1921e1f9..3bef2533 100644 Binary files a/Bootstrap.Admin/Content/js/_references.js and b/Bootstrap.Admin/Content/js/_references.js differ diff --git a/Bootstrap.Admin/Views/Shared/_Admin.cshtml b/Bootstrap.Admin/Views/Shared/_Admin.cshtml index 2b4b99e0..8f24745c 100644 --- a/Bootstrap.Admin/Views/Shared/_Admin.cshtml +++ b/Bootstrap.Admin/Views/Shared/_Admin.cshtml @@ -7,6 +7,7 @@ + @RenderSection("css", false) @@ -19,15 +20,17 @@ @RenderSection("Javascript", false) } -@RenderSection("header", false) -@RenderSection("navigator", false)
-
-
-
- @RenderBody() + @RenderSection("header", false) + @RenderSection("navigator", false) +
+
+
+
+ @RenderBody() +
-
+
diff --git a/Bootstrap.Admin/Views/Shared/_Default.cshtml b/Bootstrap.Admin/Views/Shared/_Default.cshtml index cef2bfbf..d71c39ad 100644 --- a/Bootstrap.Admin/Views/Shared/_Default.cshtml +++ b/Bootstrap.Admin/Views/Shared/_Default.cshtml @@ -60,7 +60,7 @@
查询结果
-
+
\ No newline at end of file