更新样式:微调缓存列表样式

This commit is contained in:
Argo-MacBookPro 2018-10-05 13:17:41 +08:00
parent 85cd6c5ea1
commit e4c6fc63fa
3 changed files with 21 additions and 22 deletions

View File

@ -26,6 +26,7 @@
}
.cache-item > :nth-child(3) {
flex: 1 1 auto;
display: block;
text-overflow: ellipsis;
overflow: hidden;

View File

@ -381,15 +381,19 @@ a, a:hover, a:focus {
background-size: 100% 100%;
}
.cache-title {
font-weight: bold;
color: #0077de;
background-color: #b5f1b6;
padding: 12px 15px;
border-radius: 4px 4px 0 0;
margin-bottom: 0;
.card-cache {
margin-bottom: 15px;
}
.card-cache h6 {
font-weight: bold;
color: #0077de;
background-color: #b5f1b6;
padding: 12px 15px;
border-radius: 4px 4px 0 0;
margin-bottom: 0;
}
.cache-item {
display: flex;
align-items: center;
@ -398,13 +402,10 @@ a, a:hover, a:focus {
border-width: 0 1px 1px 1px;
}
.cache-item:last-child {
margin-bottom: 15px;
}
.cache-item > :not(:first-child) {
margin-left: 10px;
display: flex;
align-items: center;
}
.cache-item > :nth-child(2) {
@ -415,24 +416,18 @@ a, a:hover, a:focus {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
display: inline-block;
width: 152px;
width: 146px;
padding-right: 6px;
}
.cache-item > :nth-child(3) {
flex: 1 1 auto;
display: none;
}
.cache-item + .cache-title {
margin-top: 12px;
}
.cache-item .badge {
position: relative;
top: -8px;
display: flex;
align-items: center;
height: 17px;
}
.cache-item .btn, td .btn:not(.btn-lg) {

View File

@ -66,8 +66,11 @@
}).map(function (ele) {
return $.format(html, ele.Interval, ele.Key, ele.Desc, ele.Value, $.format(item.Url, ele.Key), item.Self, ele.ElapsedSeconds);
}).join('');
$sortable.append($.format('<h6 class="cache-title">{0}</h6>', item.Desc));
$sortable.append(content);
let cache = $('<div class="card-cache"></div>');
cache.append($.format('<h6>{0}</h6>', item.Desc));
cache.append(content);
$sortable.append(cache);
$sortable.find('[data-toggle="tooltip"]').tooltip();
}
if (index === urls.length - 1) $refresh.removeClass('fa-spin');