- 首页 diff --git a/Bootstrap.Admin/wwwroot/css/blue.css b/Bootstrap.Admin/wwwroot/css/blue.css index 8daada31..a8ff3064 100644 --- a/Bootstrap.Admin/wwwroot/css/blue.css +++ b/Bootstrap.Admin/wwwroot/css/blue.css @@ -51,20 +51,20 @@ border-bottom: solid 1px #307eb6; } -.card { +.main-content:not(.no-card-header) .card { border-top-width: 1px; } - .card:hover { - border-top-color: #84bbe2; - } - .card, .modal-footer, .form-control, .popover, .date .input-group-text, .input-group .btn:not(.btn-secondary):not(.btn-primary):not(.btn-warning):not(.btn-info):not(.btn-danger), .form-select-input:hover { border-color: #84bbe2; } + .card:hover { + border-top-color: #337ab7; + } + .card .card-header, .modal-header { background-image: linear-gradient(to bottom, #5893be 0%, #63a6d7 100%); } diff --git a/Bootstrap.Admin/wwwroot/css/theme.css b/Bootstrap.Admin/wwwroot/css/theme.css index 4e40174d..8aa0595e 100644 --- a/Bootstrap.Admin/wwwroot/css/theme.css +++ b/Bootstrap.Admin/wwwroot/css/theme.css @@ -557,6 +557,10 @@ input.pending { margin-top: -10px; } +.no-card-header .card-header { + display: none; +} + .btn i + span { margin-left: 4px; } @@ -868,4 +872,33 @@ label[for] { .badge-md { font-size: 0.75rem; padding: 4px 6px; -} \ No newline at end of file +} + +.toggle .btn-default, .toggle.btn-default { + text-shadow: 0 1px 0 #fff; + background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); + background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); + background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border-color: #ccc; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); +} + + .toggle .btn-default.active { + background-image: none; + background-color: #e0e0e0; + border-color: #dbdbdb; + } + + .toggle .btn-default.active:hover { + color: #333; + background-color: #d4d4d4; + border-color: #8c8c8c; + } + +.toggle.btn .toggle-handle { + display: inline-block; + margin-left: 0; +} diff --git a/Bootstrap.Admin/wwwroot/js/settings.js b/Bootstrap.Admin/wwwroot/js/settings.js index b7de9cf0..7b953590 100644 --- a/Bootstrap.Admin/wwwroot/js/settings.js +++ b/Bootstrap.Admin/wwwroot/js/settings.js @@ -37,6 +37,21 @@ $(function () { } }); break; + case 'UISettings': + var uiSettings = $('#sider').prop('checked') ? "1" : "0"; + $.bc({ + url: Settings.url, data: { name: '侧边栏状态', code: uiSettings, category: '网站设置' }, method: "post" + }); + var cardTitle = $('#cardTitle').prop('checked') ? "1" : "0"; + $.bc({ + url: Settings.url, data: { name: '卡片标题状态', code: cardTitle, category: '网站设置' }, title: '保存网站设置', method: "post", + callback: function (result) { + if (result) { + window.setTimeout(function () { window.location.reload(true); }, 1000); + } + } + }); + break; } }); diff --git a/Bootstrap.Admin/wwwroot/lib/bootstrap-toggle/css/bootstrap-toggle.css b/Bootstrap.Admin/wwwroot/lib/bootstrap-toggle/css/bootstrap-toggle.css new file mode 100644 index 00000000..057d08b3 --- /dev/null +++ b/Bootstrap.Admin/wwwroot/lib/bootstrap-toggle/css/bootstrap-toggle.css @@ -0,0 +1,83 @@ +/*! ======================================================================== + * Bootstrap Toggle: bootstrap-toggle.css v2.2.0 + * http://www.bootstraptoggle.com + * ======================================================================== + * Copyright 2014 Min Hur, The New York Times Company + * Licensed under MIT + * ======================================================================== */ + + +.checkbox label .toggle, +.checkbox-inline .toggle { + margin-left: -20px; + margin-right: 5px; +} + +.toggle { + position: relative; + overflow: hidden; +} +.toggle input[type="checkbox"] { + display: none; +} +.toggle-group { + position: absolute; + width: 200%; + top: 0; + bottom: 0; + left: 0; + transition: left 0.35s; + -webkit-transition: left 0.35s; + -moz-user-select: none; + -webkit-user-select: none; +} +.toggle.off .toggle-group { + left: -100%; +} +.toggle-on { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 50%; + margin: 0; + border: 0; + border-radius: 0; +} +.toggle-off { + position: absolute; + top: 0; + bottom: 0; + left: 50%; + right: 0; + margin: 0; + border: 0; + border-radius: 0; +} +.toggle-handle { + position: relative; + margin: 0 auto; + padding-top: 0px; + padding-bottom: 0px; + height: 100%; + width: 0px; + border-width: 0 1px; +} + +.toggle.btn { min-width: 59px; min-height: 34px; } +.toggle-on.btn { padding-right: 24px; } +.toggle-off.btn { padding-left: 24px; } + +.toggle.btn-lg { min-width: 79px; min-height: 45px; } +.toggle-on.btn-lg { padding-right: 31px; } +.toggle-off.btn-lg { padding-left: 31px; } +.toggle-handle.btn-lg { width: 40px; } + +.toggle.btn-sm { min-width: 50px; min-height: 30px;} +.toggle-on.btn-sm { padding-right: 20px; } +.toggle-off.btn-sm { padding-left: 20px; } + +.toggle.btn-xs { min-width: 35px; min-height: 22px;} +.toggle-on.btn-xs { padding-right: 12px; } +.toggle-off.btn-xs { padding-left: 12px; } + diff --git a/Bootstrap.Admin/wwwroot/lib/bootstrap-toggle/css/bootstrap-toggle.min.css b/Bootstrap.Admin/wwwroot/lib/bootstrap-toggle/css/bootstrap-toggle.min.css new file mode 100644 index 00000000..0d42ed09 --- /dev/null +++ b/Bootstrap.Admin/wwwroot/lib/bootstrap-toggle/css/bootstrap-toggle.min.css @@ -0,0 +1,28 @@ +/*! ======================================================================== + * Bootstrap Toggle: bootstrap-toggle.css v2.2.0 + * http://www.bootstraptoggle.com + * ======================================================================== + * Copyright 2014 Min Hur, The New York Times Company + * Licensed under MIT + * ======================================================================== */ +.checkbox label .toggle,.checkbox-inline .toggle{margin-left:-20px;margin-right:5px} +.toggle{position:relative;overflow:hidden} +.toggle input[type=checkbox]{display:none} +.toggle-group{position:absolute;width:200%;top:0;bottom:0;left:0;transition:left .35s;-webkit-transition:left .35s;-moz-user-select:none;-webkit-user-select:none} +.toggle.off .toggle-group{left:-100%} +.toggle-on{position:absolute;top:0;bottom:0;left:0;right:50%;margin:0;border:0;border-radius:0} +.toggle-off{position:absolute;top:0;bottom:0;left:50%;right:0;margin:0;border:0;border-radius:0} +.toggle-handle{position:relative;margin:0 auto;padding-top:0;padding-bottom:0;height:100%;width:0;border-width:0 1px} +.toggle.btn{min-width:59px;min-height:34px} +.toggle-on.btn{padding-right:24px} +.toggle-off.btn{padding-left:24px} +.toggle.btn-lg{min-width:79px;min-height:45px} +.toggle-on.btn-lg{padding-right:31px} +.toggle-off.btn-lg{padding-left:31px} +.toggle-handle.btn-lg{width:40px} +.toggle.btn-sm{min-width:50px;min-height:30px} +.toggle-on.btn-sm{padding-right:20px} +.toggle-off.btn-sm{padding-left:20px} +.toggle.btn-xs{min-width:35px;min-height:22px} +.toggle-on.btn-xs{padding-right:12px} +.toggle-off.btn-xs{padding-left:12px} \ No newline at end of file diff --git a/Bootstrap.Admin/wwwroot/lib/bootstrap-toggle/js/bootstrap-toggle.js b/Bootstrap.Admin/wwwroot/lib/bootstrap-toggle/js/bootstrap-toggle.js new file mode 100644 index 00000000..c3ad054d --- /dev/null +++ b/Bootstrap.Admin/wwwroot/lib/bootstrap-toggle/js/bootstrap-toggle.js @@ -0,0 +1,184 @@ +/*! ======================================================================== + * Bootstrap Toggle: bootstrap-toggle.js v2.2.0 + * http://www.bootstraptoggle.com + * ======================================================================== + * Copyright 2014 Min Hur, The New York Times Company + * Licensed under MIT + * ======================================================================== */ + + + +function ($) { + 'use strict'; + + // TOGGLE PUBLIC CLASS DEFINITION + // ============================== + + var Toggle = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, this.defaults(), options) + this.render() + } + + Toggle.VERSION = '2.2.0' + + Toggle.DEFAULTS = { + on: 'On', + off: 'Off', + onstyle: 'primary', + offstyle: 'default', + size: 'normal', + style: '', + width: null, + height: null, + defaultVal: '' + } + + Toggle.prototype.defaults = function() { + return { + on: this.$element.attr('data-on') || Toggle.DEFAULTS.on, + off: this.$element.attr('data-off') || Toggle.DEFAULTS.off, + onstyle: this.$element.attr('data-onstyle') || Toggle.DEFAULTS.onstyle, + offstyle: this.$element.attr('data-offstyle') || Toggle.DEFAULTS.offstyle, + size: this.$element.attr('data-size') || Toggle.DEFAULTS.size, + style: this.$element.attr('data-style') || Toggle.DEFAULTS.style, + width: this.$element.attr('data-width') || Toggle.DEFAULTS.width, + height: this.$element.attr('data-height') || Toggle.DEFAULTS.height, + defaultVal: this.$element.attr('data-default-val') || Toggle.DEFAULTS.defaultVal, + } + } + + Toggle.prototype.render = function () { + if(this.options.defaultVal === '') this.$element.prop('checked', true); + + this._onstyle = 'btn-' + this.options.onstyle + this._offstyle = 'btn-' + this.options.offstyle + var size = this.options.size === 'large' ? 'btn-lg' + : this.options.size === 'small' ? 'btn-sm' + : this.options.size === 'mini' ? 'btn-xs' + : '' + var $toggleOn = $('