filestash/public/assets/pages/filespage/thing.css
2025-05-22 22:08:06 +10:00

338 lines
8.7 KiB
CSS

.component_thing:hover, .component_thing .highlight,
.component_thing.hover, .component_thing .highlight {
transition: 0.1s ease-out background;
background: var(--border);
border-color: var(--super-light);
border-radius: 5px;
}
.component_thing:not(.loading):hover .component_datetime {
display: none;
}
.component_thing .component_checkbox {
display: none;
}
.component_thing .file-is-hover {
background: var(--emphasis-primary);
}
.component_thing .file-is-dragging {
opacity: 0.15;
}
.component_thing .file-details {
padding: 0 5px;
line-height: 25px;
white-space: nowrap;
}
.component_thing .file-details > span {
display: inline-block;
width: calc(100% - 130px);
max-width: 750px;
vertical-align: bottom;
color: inherit;
}
.component_thing form {
display: inline-block;
}
.component_thing form input {
font-size: 1em;
border-width: 0px;
padding: 0 2px 0 2px;
background: inherit;
border-bottom: 2px solid var(--emphasis-primary);
color: var(--color);
}
.component_thing.view-grid .component_action {
float: right;
color: #6f6f6f;
line-height: 25px;
margin: 0 -10px;
padding: 0 10px;
position: relative;
}
.component_thing .component_icon {
width: 25px;
height: 25px;
}
.component_thing .component_filesize {
color: var(--light);
font-size: 0.85em;
padding-left: 3px;
}
.component_thing .component_datetime {
float: right;
color: var(--light);
line-height: 25px;
margin: 0 -10px;
padding: 0 10px;
position: relative;
}
.component_thing .component_checkbox {
opacity: 0;
z-index: 2;
position: absolute;
transition: 0.15s ease-out all;
transform: translateX(0px);
padding: 2px;
border-radius: 50px;
}
.component_thing .component_action{
display: none;
float: right;
color: #6f6f6f;
line-height: 25px;
margin: 0 -10px;
padding: 0 10px;
position: relative;
}
.component_thing .component_action .component_icon{
padding: 1px 0;
box-sizing: border-box;
}
.list > .component_thing.view-grid .component_action {
transform: translateX(5px);
transition: 0.15s ease-out all;
z-index: 2;
display: block;
position: absolute;
top: 5px;
right: 5px;
border-radius: 5px;
margin-right: 0px;
padding: 0px;
}
.list > .component_thing.view-grid:hover .component_action {
transition-delay: 0.1s;
transform: translateX(0);
}
.component_thing:hover .component_action { opacity: 1; display: block; }
.component_thing .component_action { opacity: 0; }
.component_thing.selected .component_action { opacity: 0; transition-delay: 0s; }
.component_thing:has(.component_icon[alt="loading"]) .component_action { display: none; }
.touch-yes .component_thing .component_checkbox {
opacity: 1;
}
.component_thing .component_checkbox .indicator {
top: 7px;
left: 6px;
}
.touch-no .component_thing:hover .component_checkbox,
.component_thing.selected .component_checkbox {
transition-delay: 0.1s;
opacity: 1;
}
.component_thing .selectionOverlay {
display: none;
border-radius: 3px;
}
.component_thing.selected .selectionOverlay {
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: var(--primary);
z-index: 1;
opacity: 0.3;
}
/* GRID & LIST VIEW */
.list {
display: grid;
}
.list > .component_thing {
width: 100%;
position: relative;
box-sizing: border-box;
}
.list > .component_thing.view-grid {
border: 2px solid var(--border);
border-radius: 5px;
text-align: center;
height: 160px;
box-sizing: border-box;
}
.list > .component_thing.view-grid > img {
padding: 0;
margin: 0;
display: block;
}
.list > .component_thing.view-grid > img.component_icon.thumbnail {
width: 100%;
height: 100%;
object-fit: cover;
object-position: 50% 50%;
background: var(--dark);
padding: 0;
margin: 0;
display: block;
border-radius: 3px;
}
.list > .component_thing.view-grid > img.component_icon.thumbnail.placeholder {
position: absolute;
top: 0;
}
.list > .component_thing.view-grid > img.component_icon {
padding: 30px;
box-sizing: border-box;
width: 100%;
height: 100%;
object-fit: contain;
margin: 0 auto;
z-index: 0;
}
.list > .component_thing.view-grid .info_extension {
position: absolute;
top: 45%;
text-align: right;
left: 0;
right: 20%;
right: calc(50% - 50px);
margin: 0 auto;
text-transform: uppercase;
font-size: 0.95em;
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.list > .component_thing.view-grid .info_extension span {
background: var(--color);
color: var(--bg-color);
font-weight: bold;
border-radius: 4px;
padding: 2px 10px;
display: inline-block;
text-align: center;
min-width: 20px;
max-width: 65px;
font-size: 0.95em;
}
.list > .component_thing .info_extension span:empty {
display: none;
}
.list > .component_thing.view-grid .component_filename {
letter-spacing: -0.5px;
position: absolute;
bottom: 2px;
left: 2px;
right: 2px;
border-radius: 2px;
padding: 3px 0px;
}
.list > .component_thing.view-grid .component_filename .file-details {
width: calc(100% - 10px);
display: block;
}
.list > .component_thing.view-grid .component_filename .file-details > span {
width: 100%;
}
.list > .component_thing.view-grid .component_filename .file-details > span form input {
letter-spacing: -0.5px;
text-align: center;
width: 100%;
padding: 0;
}
.list > .component_thing.view-grid .image_layer {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1;
background: rgba(0, 0, 0, 0);
transition: 0.2s ease-out background;
}
.list > .component_thing.view-grid .component_filesize,
.list > .component_thing.view-grid .component_datetime {
display: none;
}
.list > .component_thing.view-grid img.thumbnail {
transition: 0.2s ease-out transform;
}
.list > .component_thing.view-grid.not-selected:hover img.thumbnail {
transform: scale(0.6);
}
.list > .component_thing.view-grid.not-selected:hover .image_layer {
background: var(--border);
}
.list > .component_thing.view-grid.not-selected:hover .thumbnail ~ .component_filename {
opacity: 1;
}
.list > .component_thing.view-grid.not-selected .thumbnail ~ .component_filename {
transition: 0.2s ease-out opacity;
opacity: 0;
}
.list > .component_thing.view-grid.selected img.thumbnail {
transform: scale(0.6);
}
.list > .component_thing.view-grid .component_checkbox {
display: block;
top: 3px;
left: 3px;
transform: translateX(-5px);
}
.touch-yes .list > .component_thing.view-grid .component_checkbox {
transform: translateX(0px);
}
.touch-yes .list > .component_thing.view-grid .component_checkbox input[type="checkbox"]:not(:checked) ~ span {
background-color: inherit;
}
.list > .component_thing.view-grid:hover .component_checkbox,
.list > .component_thing.view-grid.selected .component_checkbox {
transform: translateX(0px);
}
.list > .component_thing.view-list {
padding: 10px;
}
.list > .component_thing.view-list .info_extension {
display: none;
}
.list > .component_thing.view-list .component_checkbox {
top: 8px;
left: 8px;
transition: 0.5s ease all;
background: rgba(0, 0, 0, 0);
}
.list > .component_thing.view-list .component_checkbox:hover {
background: rgba(0, 0, 0, 0.1);
}
.list > .component_thing.view-list:hover .component_checkbox,
.list > .component_thing.view-list.selected .component_checkbox {
display: block;
}
.list > .component_thing.view-list:hover .component_checkbox ~ .component_icon,
.list > .component_thing.view-list.selected .component_checkbox ~ .component_icon {
visibility: hidden;
}
.list > .component_thing.view-list:hover .component_checkbox .indicator,
.list > .component_thing.view-list.selected .component_checkbox .indicator {
border-color: #57595A;
}
.list > .component_thing.view-list:hover .component_checkbox input ~ span,
.list > .component_thing.view-list.selected .component_checkbox input ~ span {
background-color: rgba(255, 255, 255, 0.4);
}
.list > .component_thing.view-list:hover .component_checkbox input:checked ~ span,
.list > .component_thing.view-list.selected .component_checkbox input:checked ~ span {
background-color: #57595A;
}
/* Dark Mode */
.dark-mode .component_thing:hover {
background: rgba(255, 255, 255, 0.05);
border-radius: 3px;
}
.dark-mode .component_thing {
background: inherit;
}
.dark-mode .component_thing .component_filename {
color: var(--light);
}
.dark-mode .component_thing.highlight {
background: rgba(255, 255, 255, 0.05);
}
.dark-mode .component_thing form input {
border-color: var(--light);
color: rgba(255, 255, 255, 0.8);
}