Files
Oxicloud/static/css/components/cards.css
T

822 lines
16 KiB
CSS
Raw Normal View History

/* Files grid */
.files-grid-view {
2026-04-07 22:48:59 +02:00
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 20px;
position: relative;
}
/* header not visible in grid mode */
.files-grid-view .list-header {
display: none;
}
/* Rubber band / lasso selection rectangle */
.selection-rect {
2026-04-07 22:48:59 +02:00
position: fixed;
border: 1.5px solid var(--primary-color, #e67e22);
background-color: rgba(230, 126, 34, 0.08);
pointer-events: none;
z-index: 1000;
border-radius: 3px;
display: none;
}
.files-grid-view .file-item {
2026-04-07 22:48:59 +02:00
background-color: white;
border-radius: 12px;
border: 2px solid #e2e8f0;
padding: 16px;
display: flex;
flex-direction: column;
align-items: center;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
cursor: pointer;
width: 100%;
min-height: 160px;
position: relative;
}
.files-grid-view .file-item:hover {
2026-04-07 22:48:59 +02:00
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
border-color: #cbd5e0;
}
.files-grid-view .file-item.selected {
2026-04-07 22:48:59 +02:00
border-color: #ff5e3a;
background: #fff8f6;
box-shadow:
0 0 0 1px rgba(255, 94, 58, 0.15),
0 4px 12px rgba(255, 94, 58, 0.1);
}
.files-grid-view .file-item.selected:hover {
2026-04-07 22:48:59 +02:00
border-color: #ff5e3a;
box-shadow:
0 0 0 1px rgba(255, 94, 58, 0.2),
0 6px 18px rgba(255, 94, 58, 0.15);
}
/* element hidden on grid view */
.files-grid-view .file-item .date-cell,
.files-grid-view .file-item .size-cell {
display: none;
}
/* Selection checkbox */
.files-grid-view .file-item .checkbox-cell {
2026-04-07 22:48:59 +02:00
position: absolute;
top: 10px;
left: 10px;
width: 22px;
height: 22px;
border-radius: 6px;
background: white;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
z-index: 10;
cursor: pointer;
}
.files-grid-view .file-item:hover .checkbox-cell {
2026-04-07 22:48:59 +02:00
opacity: 1;
}
.files-grid-view .file-item.selected .checkbox-cell {
2026-04-07 22:48:59 +02:00
opacity: 1;
background: #ff5e3a;
border-color: #ff5e3a;
}
.files-grid-view .file-item.selected .checkbox-cell i {
2026-04-07 22:48:59 +02:00
color: white;
font-size: 11px;
}
/* More actions button (three dots) */
.files-grid-view .file-actions {
2026-04-07 22:48:59 +02:00
position: absolute;
top: 8px;
right: 8px;
width: 30px;
height: 30px;
border-radius: 8px;
border: none;
background: transparent;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
z-index: 10;
cursor: pointer;
color: #64748b;
font-size: 16px;
}
.files-grid-view .file-item:hover .file-actions {
2026-04-07 22:48:59 +02:00
opacity: 1;
}
.files-grid-view .file-actions:hover {
2026-04-07 22:48:59 +02:00
background: #f1f5f9;
color: #334155;
}
/* Favorite star (mirrors file-actions button pattern) */
.files-grid-view .file-item button.favorite-star {
2026-04-07 22:48:59 +02:00
position: absolute;
top: 8px;
right: 38px;
width: 30px;
height: 30px;
border-radius: 8px;
border: none;
background: transparent;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
z-index: 12;
cursor: pointer;
color: #cbd5e0;
font-size: 15px;
padding: 0;
line-height: 1;
}
.files-grid-view .file-item:hover button.favorite-star {
2026-04-07 22:48:59 +02:00
opacity: 1;
}
.files-grid-view .file-item button.favorite-star:hover {
2026-04-07 22:48:59 +02:00
color: #fbbf24;
}
.files-grid-view .file-item button.favorite-star.active {
2026-04-07 22:48:59 +02:00
opacity: 1;
color: #f59e0b;
}
.files-grid-view .file-item button.favorite-star.active:hover {
2026-04-07 22:48:59 +02:00
color: #d97706;
}
.files-grid-view .file-item.dragging {
2026-04-07 22:48:59 +02:00
opacity: 0.5;
transform: scale(0.95);
box-shadow: none;
}
.files-grid-view .file-item.drop-target {
2026-04-07 22:48:59 +02:00
background-color: rgba(255, 193, 7, 0.1);
border: 2px dashed #ffc107;
}
/* ensure icon centered */
.files-grid-view .file-item .name-cell .file-icon {
margin: auto;
}
/* Hide FontAwesome / SVG icons inside grid card thumbnails — the decorative
CSS shapes (::before / ::after) already convey the file type visually.
Icons.js replaces <i> with <svg class="oxi-icon">, so we target both.
List-view icons (.file-item .file-icon) are NOT affected. */
.files-grid-view .file-item .file-icon > i,
.files-grid-view .file-item .file-icon > svg {
2026-04-07 22:48:59 +02:00
display: none !important;
}
.file-icon.folder-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #ffeaa7;
border-radius: 8px;
position: relative;
margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: center;
}
.file-icon.folder-icon::before {
2026-04-07 22:48:59 +02:00
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 20px;
background-color: #fdcb6e;
border-radius: 8px 8px 0 0;
}
.file-icon.pdf-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #fee2e2;
border-radius: 4px;
position: relative;
margin-bottom: 10px;
border-top: 3px solid #e53e3e;
display: flex;
align-items: center;
justify-content: center;
}
.file-icon.pdf-icon::after {
2026-04-07 22:48:59 +02:00
content: "PDF";
font-size: 16px;
font-weight: 700;
color: #e53e3e;
opacity: 0.65;
letter-spacing: 1px;
}
.file-icon.doc-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #ebf5fb;
border-radius: 4px;
position: relative;
margin-bottom: 10px;
border-top: 3px solid #2b6cb0;
overflow: hidden;
}
.file-icon.doc-icon::before {
2026-04-07 22:48:59 +02:00
content: "";
position: absolute;
top: 18px;
left: 18px;
right: 18px;
height: 3px;
background-color: #2b6cb0;
opacity: 0.3;
border-radius: 2px;
}
.file-icon.doc-icon::after {
2026-04-07 22:48:59 +02:00
content: "";
position: absolute;
top: 28px;
left: 18px;
right: 28px;
height: 3px;
background-color: #2b6cb0;
opacity: 0.25;
border-radius: 2px;
}
.file-icon.script-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #e8f5e9;
border-radius: 4px;
position: relative;
margin-bottom: 10px;
border-top: 3px solid #4eaa25;
display: flex;
align-items: center;
justify-content: center;
}
.file-icon.script-icon::after {
2026-04-07 22:48:59 +02:00
content: ">_";
font-size: 18px;
font-weight: 700;
font-family: monospace;
color: #4eaa25;
opacity: 0.55;
}
.file-icon.config-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #f1f3f5;
border-radius: 4px;
position: relative;
margin-bottom: 10px;
border-top: 3px solid #718096;
overflow: hidden;
}
.file-icon.config-icon::before {
2026-04-07 22:48:59 +02:00
content: "";
position: absolute;
top: 15px;
left: 16px;
width: 10px;
height: 10px;
border: 2px solid #718096;
border-radius: 50%;
opacity: 0.4;
}
.file-icon.config-icon::after {
2026-04-07 22:48:59 +02:00
content: "";
position: absolute;
top: 19px;
left: 34px;
right: 16px;
height: 3px;
background-color: #718096;
opacity: 0.3;
border-radius: 2px;
}
.file-icon.image-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #74b9ff;
border-radius: 4px;
position: relative;
margin-bottom: 10px;
overflow: hidden;
}
/* Thumbnail image inside file-icon (grid and list views) */
.file-icon .file-thumb {
2026-04-07 22:48:59 +02:00
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 1;
}
/*
.file-icon.image-icon::before {
content: "";
position: absolute;
top: 10px;
left: 15px;
width: 20px;
height: 20px;
background-color: #ffda79;
border-radius: 50%;
}
*/
.file-icon.video-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 50%, #fce7f3 100%);
border-radius: 10px;
position: relative;
margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid rgba(139, 92, 246, 0.15);
}
.file-icon.video-icon::before {
2026-04-07 22:48:59 +02:00
content: "";
width: 36px;
height: 36px;
background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
border-radius: 50%;
position: absolute;
box-shadow: 0 3px 10px rgba(139, 92, 246, 0.35);
}
.file-icon.video-icon::after {
2026-04-07 22:48:59 +02:00
content: "";
width: 0;
height: 0;
border-top: 7px solid transparent;
border-bottom: 7px solid transparent;
border-left: 11px solid white;
position: absolute;
margin-left: 3px;
}
.file-icon.code-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #e2e8f0;
border-radius: 4px;
position: relative;
margin-bottom: 10px;
border-top: 3px solid #556ee6;
overflow: hidden;
}
.file-icon.code-icon::before,
.file-icon.code-icon::after {
2026-04-07 22:48:59 +02:00
content: "";
position: absolute;
left: 10px;
right: 10px;
height: 2px;
background-color: #556ee6;
}
.file-icon.code-icon::before {
2026-04-07 22:48:59 +02:00
top: 15px;
width: 80%;
}
.file-icon.code-icon::after {
2026-04-07 22:48:59 +02:00
top: 25px;
width: 60%;
}
.file-icon.code-icon .code-line-1,
.file-icon.code-icon .code-line-2,
.file-icon.code-icon .code-line-3 {
2026-04-07 22:48:59 +02:00
position: absolute;
left: 10px;
height: 2px;
background-color: #a0aec0;
}
.file-icon.code-icon .code-line-1 {
2026-04-07 22:48:59 +02:00
top: 35px;
width: 70%;
}
.file-icon.code-icon .code-line-2 {
2026-04-07 22:48:59 +02:00
top: 45px;
width: 85%;
}
.file-icon.code-icon .code-line-3 {
2026-04-07 22:48:59 +02:00
top: 55px;
width: 50%;
}
.file-icon.json-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #ffb86c;
}
.file-icon.json-icon::before,
.file-icon.json-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #ffb86c;
}
.file-icon.js-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #ffd43b;
}
.file-icon.js-icon::before,
.file-icon.js-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #ffd43b;
}
.file-icon.html-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #e34c26;
}
.file-icon.html-icon::before,
.file-icon.html-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #e34c26;
}
.file-icon.css-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #2965f1;
}
.file-icon.css-icon::before,
.file-icon.css-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #2965f1;
}
.file-icon.py-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #3776ab;
}
.file-icon.py-icon::before,
.file-icon.py-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #3776ab;
}
.file-icon.ts-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #3178c6;
}
.file-icon.ts-icon::before,
.file-icon.ts-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #3178c6;
}
.file-icon.rust-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #dea584;
}
.file-icon.rust-icon::before,
.file-icon.rust-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #dea584;
}
.file-icon.go-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #00add8;
}
.file-icon.go-icon::before,
.file-icon.go-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #00add8;
}
.file-icon.java-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #e76f00;
}
.file-icon.java-icon::before,
.file-icon.java-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #e76f00;
}
.file-icon.c-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #555;
}
.file-icon.c-icon::before,
.file-icon.c-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #555;
}
.file-icon.cs-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #68217a;
}
.file-icon.cs-icon::before,
.file-icon.cs-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #68217a;
}
.file-icon.php-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #8892be;
}
.file-icon.php-icon::before,
.file-icon.php-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #8892be;
}
.file-icon.ruby-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #cc342d;
}
.file-icon.ruby-icon::before,
.file-icon.ruby-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #cc342d;
}
.file-icon.swift-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #fa7343;
}
.file-icon.swift-icon::before,
.file-icon.swift-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #fa7343;
}
.file-icon.kotlin-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #7f52ff;
}
.file-icon.kotlin-icon::before,
.file-icon.kotlin-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #7f52ff;
}
.file-icon.sql-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #e38c00;
}
.file-icon.sql-icon::before,
.file-icon.sql-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #e38c00;
}
.file-icon.yaml-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #cb171e;
}
.file-icon.yaml-icon::before,
.file-icon.yaml-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #cb171e;
}
.file-icon.toml-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #9c4221;
}
.file-icon.toml-icon::before,
.file-icon.toml-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #9c4221;
}
.file-icon.md-icon {
2026-04-07 22:48:59 +02:00
border-top-color: #083fa1;
}
.file-icon.md-icon::before,
.file-icon.md-icon::after {
2026-04-07 22:48:59 +02:00
background-color: #083fa1;
}
.file-icon.spreadsheet-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #e6f4ea;
border-radius: 4px;
position: relative;
margin-bottom: 10px;
border-top: 3px solid #0d904f;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.file-icon.spreadsheet-icon::before {
2026-04-07 22:48:59 +02:00
content: "";
position: absolute;
top: 12px;
left: 18px;
width: 64px;
height: 44px;
background:
repeating-linear-gradient(to bottom, #0d904f 0px, #0d904f 1px, transparent 1px, transparent 11px),
repeating-linear-gradient(to right, #0d904f 0px, #0d904f 1px, transparent 1px, transparent 22px);
opacity: 0.35;
}
.file-icon.presentation-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #fef3e2;
border-radius: 4px;
position: relative;
margin-bottom: 10px;
border-top: 3px solid #d04423;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.file-icon.presentation-icon::before {
2026-04-07 22:48:59 +02:00
content: "";
position: absolute;
top: 14px;
left: 22px;
width: 56px;
height: 38px;
border: 2px solid #d04423;
border-radius: 4px;
opacity: 0.4;
}
.file-icon.presentation-icon::after {
2026-04-07 22:48:59 +02:00
content: "";
position: absolute;
top: 24px;
left: 38px;
width: 0;
height: 0;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-left: 14px solid #d04423;
opacity: 0.5;
}
.file-icon.audio-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #fff3e0;
border-radius: 4px;
position: relative;
margin-bottom: 10px;
border-top: 3px solid #f57c00;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.file-icon.audio-icon::before {
2026-04-07 22:48:59 +02:00
content: "♪";
font-size: 28px;
color: #f57c00;
opacity: 0.6;
}
.file-icon.archive-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #f5f0eb;
border-radius: 4px;
position: relative;
margin-bottom: 10px;
border-top: 3px solid #8d6e63;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.file-icon.archive-icon::before {
2026-04-07 22:48:59 +02:00
content: "";
position: absolute;
top: 10px;
left: 45px;
width: 10px;
height: 46px;
background: repeating-linear-gradient(to bottom, #8d6e63 0px, #8d6e63 5px, #f5f0eb 5px, #f5f0eb 10px);
opacity: 0.5;
}
.file-icon.installer-icon {
2026-04-07 22:48:59 +02:00
width: 100px;
height: 70px;
background-color: #f3e8ff;
border-radius: 4px;
position: relative;
margin-bottom: 10px;
border-top: 3px solid #7c3aed;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.file-icon.installer-icon::before {
2026-04-07 22:48:59 +02:00
content: "⬇";
font-size: 24px;
color: #7c3aed;
opacity: 0.5;
}
.files-grid-view .file-item .name-cell {
2026-04-07 22:48:59 +02:00
font-size: 14px;
font-weight: 500;
text-align: center;
margin-bottom: 5px;
color: #2d3748;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-top: 8px;
}
.files-grid-view .file-item .name-cell span {
padding-top: 8px;
padding-bottom: 8px;
display: block;
}
.files-grid-view .file-item .name-cell svg.favorite-star-inline {
display: none;
}
.files-grid-view .file-item .type-cell {
2026-04-07 22:48:59 +02:00
font-size: 12px;
color: #718096;
text-align: center;
}
[data-theme="dark"] .files-grid-view .file-item {
2026-04-07 22:48:59 +02:00
background-color: #1e293b;
border-color: #334155;
}
[data-theme="dark"] .files-grid-view .file-item:hover {
2026-04-07 22:48:59 +02:00
border-color: #475569;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .files-grid-view .file-item.selected {
2026-04-07 22:48:59 +02:00
border-color: #ff5e3a;
background: #1a1520;
}
[data-theme="dark"] .files-grid-view .file-item .checkbox-cell {
2026-04-07 22:48:59 +02:00
background: #1e293b;
border-color: #475569;
}
[data-theme="dark"] .files-grid-view .file-actions {
2026-04-07 22:48:59 +02:00
color: #94a3b8;
}
[data-theme="dark"] .files-grid-view .file-actions:hover {
2026-04-07 22:48:59 +02:00
background: #334155;
color: #e2e8f0;
}
[data-theme="dark"] .files-grid-view .file-item .name-cell {
2026-04-07 22:48:59 +02:00
color: #e2e8f0;
}
[data-theme="dark"] .files-grid-view .file-item .type-cell {
2026-04-07 22:48:59 +02:00
color: #94a3b8;
}
[data-theme="dark"] .files-grid-view .file-item.drop-target {
2026-04-07 22:48:59 +02:00
background-color: rgba(255, 193, 7, 0.05);
}