mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-01-06 23:53:07 +01:00
CSS and layout tweaks
This commit is contained in:
@@ -148,7 +148,7 @@ class AdminController
|
||||
|
||||
$media_list = array();
|
||||
foreach ($page->media()->all() as $name=> $media) {
|
||||
$media_list[$name] = ['url'=>$media->url(),'size'=>$media->get('size')];
|
||||
$media_list[$name] = ['url'=>$media->cropZoom(150,100)->url(),'size'=>$media->get('size')];
|
||||
}
|
||||
$this->admin->media = $media_list;
|
||||
|
||||
|
||||
@@ -1568,26 +1568,42 @@ body.remodal_active .remodal {
|
||||
display: none; }
|
||||
.dropzone .dz-preview:hover.dz-error .dz-error-message {
|
||||
display: block; }
|
||||
.dropzone .dz-preview .dz-remove {
|
||||
display: none; }
|
||||
.dropzone .dz-preview:hover .dz-remove {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 25px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
font-size: 0.8rem; }
|
||||
.dropzone .dz-preview .dz-details {
|
||||
width: 100px;
|
||||
width: 150px;
|
||||
height: 100px;
|
||||
position: relative;
|
||||
background: #ebebeb;
|
||||
background: #f6f6f6;
|
||||
font-size: 0.8rem;
|
||||
padding: 5px;
|
||||
margin-bottom: 22px; }
|
||||
.dropzone .dz-preview .dz-details .dz-filename {
|
||||
line-height: 1.2;
|
||||
overflow: hidden;
|
||||
height: 100%; }
|
||||
.dropzone .dz-preview .dz-details img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100px;
|
||||
width: 150px;
|
||||
height: 100px; }
|
||||
.dropzone .dz-preview .dz-details .dz-size {
|
||||
position: absolute;
|
||||
bottom: -28px;
|
||||
left: 3px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
font-size: 0.8rem;
|
||||
height: 28px;
|
||||
line-height: 28px; }
|
||||
.dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message span {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,8 @@
|
||||
/* The MIT License */
|
||||
|
||||
$preview-width: 150px;
|
||||
$preview-height: 100px;
|
||||
|
||||
.form-uploads-wrapper h3 {
|
||||
font-size: 1rem;
|
||||
margin: 2rem 0 0.5rem 0;
|
||||
@@ -66,7 +69,7 @@
|
||||
|
||||
.dz-progress {
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
top: $preview-height;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
height: 4px;
|
||||
@@ -109,15 +112,32 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dz-remove {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover .dz-remove {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 25px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.dz-details {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
width: $preview-width;
|
||||
height: $preview-height;
|
||||
position: relative;
|
||||
background: #ebebeb;
|
||||
background: lighten($content-bg,3%);
|
||||
font-size: 0.8rem;
|
||||
padding: 5px;
|
||||
margin-bottom: 22px;
|
||||
|
||||
.dz-filename {
|
||||
line-height: 1.2;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -126,14 +146,17 @@
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
width: $preview-width;
|
||||
height: $preview-height;
|
||||
}
|
||||
|
||||
.dz-size {
|
||||
position: absolute;
|
||||
bottom: -28px;
|
||||
left: 3px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
font-size: 0.8rem;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
$("#gravDropzone").dropzone({ url: URI + '/task:addmedia' });
|
||||
$("#gravDropzone").dropzone({ url: URI + '/task:addmedia', createImageThumbnails: { thumbnailWidth: 150} });
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user