updated styling pt.1

This commit is contained in:
2025-11-25 20:39:48 +01:00
parent 1eeeb59fc7
commit 98d199b6d1

View File

@@ -52,8 +52,7 @@ body {
} }
.container { .container {
max-width: 1200px; margin: 4vh;
margin: 2vh auto;
padding: 0; padding: 0;
min-height: 100vh; min-height: 100vh;
display: flex; display: flex;
@@ -222,118 +221,163 @@ body {
overflow-x: auto; overflow-x: auto;
} }
/* Table Layout */ .file-list {
.file-table { display: flex;
flex-direction: column;
gap: 0;
width: 100%; width: 100%;
border-collapse: collapse; background: transparent;
border-radius: 0.25rem;
overflow: hidden;
/* if you want a border around the whole list: */
/* border: 1px solid var(--border-color); */
} }
.file-table thead { /* Each row uses grid to emulate columns */
position: sticky; .file-row {
top: 0; display: grid;
background-color: var(--bg-secondary); grid-template-columns: 2.5rem 1fr 10.5rem 14rem; /* icon | name | size | modified */
z-index: 5; align-items: center;
transition: background-color 0.3s ease, border-color 0.3s ease; gap: 0.75rem;
}
.file-table th {
text-align: left;
padding: 0.75rem; padding: 0.75rem;
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
color: var(--text-secondary); transition: background-color 0.15s ease, transform 0.08s ease;
font-size: 0.875rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.file-table tbody tr {
border-bottom: 1px solid var(--border-color);
transition: all 0.2s ease;
cursor: pointer; cursor: pointer;
background: transparent;
} }
.file-table tbody tr:hover { /* last row - optional: remove border */
background-color: var(--file-hover); .file-list .file-row:last-child {
border-bottom: none;
} }
.file-table td { /* icon cell (keeps the look from your table td.icon) */
padding: 0.75rem; .file-row > div:first-child {
color: var(--text-primary);
}
.file-table td.icon {
width: 2.5rem; width: 2.5rem;
font-size: 1.25rem; height: 2rem;
text-align: center; display: flex;
align-items: center;
justify-content: center;
font-size: 1.125rem;
} }
.file-table td.name { /* name cell */
.file-row .name {
font-weight: 500; font-weight: 500;
} color: var(--text-primary);
overflow: hidden;
.file-table tr.directory td.name { text-overflow: ellipsis;
color: var(--accent);
font-weight: 600;
}
.file-table td.size,
.file-table td.date {
color: var(--text-secondary);
font-size: 0.875rem;
white-space: nowrap; white-space: nowrap;
} }
/* Grid Layout */ /* name link */
.grid { .file-row .name a {
display: grid; color: inherit;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); text-decoration: none;
gap: 1rem; display: inline-block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.grid-item { /* directory emphasis */
display: flex; .file-row.directory .name {
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding: 1rem;
background-color: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 0.5rem;
cursor: pointer;
transition: all 0.2s ease;
text-align: center;
}
.grid-item:hover {
background-color: var(--file-hover);
border-color: var(--accent);
transform: translateY(-2px);
}
.grid-icon {
font-size: 2.5rem;
margin-bottom: 0.75rem;
}
.grid-name {
font-weight: 500;
color: var(--text-primary);
word-break: break-word;
overflow-wrap: break-word;
font-size: 0.875rem;
margin-bottom: 0.5rem;
}
.grid-item:has(.grid-name) .grid-name {
color: var(--accent); color: var(--accent);
font-weight: 600; font-weight: 600;
} }
.grid-size { /* size and date cells */
font-size: 0.75rem; .file-row .size,
.file-row .date {
color: var(--text-secondary); color: var(--text-secondary);
margin-top: auto; font-size: 0.875rem;
white-space: nowrap;
justify-self: end;
}
/* smaller size column alignment */
.file-row .size {
justify-self: end;
}
/* hover / focus */
.file-row:hover,
.file-row:focus-within {
background-color: var(--file-hover);
}
.file-row:active {
transform: translateY(0.5px);
}
.file-row a:focus {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.file-list.compact .file-row {
padding: 0.5rem;
grid-template-columns: 2rem 1fr 8.5rem 12rem;
}
@media (max-width: 992px) {
.file-row {
grid-template-columns: 2.5rem 1fr 9rem 12rem;
}
}
@media (max-width: 768px) {
.file-row {
grid-template-columns: 2.5rem 1fr 9rem; /* icon | name | size */
}
.file-row .date {
display: none;
}
.file-row .size {
justify-self: end;
color: var(--text-secondary);
}
}
@media (max-width: 480px) {
.file-row {
grid-template-columns: 2.5rem 1fr;
grid-template-rows: auto auto;
gap: 0.25rem 0.5rem;
align-items: start;
padding: 0.6rem;
}
.file-row > div:first-child {
grid-row: 1 / span 2;
align-self: start;
}
.file-row .name {
grid-column: 2;
grid-row: 1;
white-space: normal;
overflow: visible;
}
.file-row .size {
grid-column: 2;
grid-row: 2;
justify-self: start;
color: var(--text-secondary);
font-size: 0.85rem;
}
.file-row .date {
display: none;
}
}
.view-list .file-list {
display: block;
} }
.empty-state { .empty-state {
@@ -355,6 +399,7 @@ body {
} }
.listing { .listing {
width: 100%;
padding: 1rem; padding: 1rem;
} }
@@ -364,23 +409,6 @@ body {
align-items: flex-start; align-items: flex-start;
} }
.file-table td.date {
display: none;
}
.file-table th:last-child {
display: none;
}
.grid {
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 0.75rem;
}
.grid-item {
padding: 0.75rem;
}
.path-container { .path-container {
font-size: 0.9rem; font-size: 0.9rem;
margin-bottom: 0.75rem; margin-bottom: 0.75rem;
@@ -437,33 +465,6 @@ body {
font-size: 0.75rem; font-size: 0.75rem;
flex-direction: column; flex-direction: column;
} }
.file-table th,
.file-table td {
padding: 0.5rem 0.25rem;
}
.file-table td.size {
display: none;
}
.grid {
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
gap: 0.5rem;
}
.grid-item {
padding: 0.5rem;
}
.grid-icon {
font-size: 2rem;
margin-bottom: 0.5rem;
}
.grid-name {
font-size: 0.7rem;
}
} }
/* Scrollbar Styling */ /* Scrollbar Styling */