diff --git a/Bootstrap.Admin/Content/css/admin.css b/Bootstrap.Admin/Content/css/admin.css index 79ae8c1e..771a4460 100644 --- a/Bootstrap.Admin/Content/css/admin.css +++ b/Bootstrap.Admin/Content/css/admin.css @@ -153,6 +153,13 @@ position: relative; } +.desktop #sidebar { + top: 94px; + bottom: 40px; + position: absolute; + overflow-y: auto; +} + ul.sidebar-menu { padding: 20px 0 15px 0; margin-bottom: 0; diff --git a/Bootstrap.Admin/Content/css/site.css b/Bootstrap.Admin/Content/css/site.css index c9640bb3..932be73d 100644 --- a/Bootstrap.Admin/Content/css/site.css +++ b/Bootstrap.Admin/Content/css/site.css @@ -83,6 +83,32 @@ a, a:hover, a:focus { padding: 10px 4px; height: 40px; } + +.desktop .header { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 50; +} + +.desktop .site-footer { + position: fixed; + left: 0; + bottom: 0; + right: 0; + z-index: 50; +} + +.desktop #main-content { + margin-top: 0; + position: fixed; + left: 0; + bottom: 40px; + right: 0; + top: 94px; + overflow: auto; +} /*end title*/ .go-top { diff --git a/Bootstrap.Admin/Content/js/Longbow.Common.js b/Bootstrap.Admin/Content/js/Longbow.Common.js index 9cf7647d..bb568fc4 100644 --- a/Bootstrap.Admin/Content/js/Longbow.Common.js +++ b/Bootstrap.Admin/Content/js/Longbow.Common.js @@ -208,4 +208,6 @@ $(function () { return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$/.test(value); }, "请填写正确的IP地址"); } + + if ($.browser.versions.mobile) { $('body').removeClass('desktop'); } }); \ No newline at end of file diff --git a/Bootstrap.Admin/Views/Shared/_Layout.cshtml b/Bootstrap.Admin/Views/Shared/_Layout.cshtml index 6ec49f26..1fd0dfbe 100644 --- a/Bootstrap.Admin/Views/Shared/_Layout.cshtml +++ b/Bootstrap.Admin/Views/Shared/_Layout.cshtml @@ -10,7 +10,7 @@ @RenderSection("css", false) -
+ @RenderBody()