From 98d199b6d1023bcb15d8bac566155be965b824af Mon Sep 17 00:00:00 2001 From: Overlord Date: Tue, 25 Nov 2025 20:39:48 +0100 Subject: [PATCH] updated styling pt.1 --- app/src/assets/style/style.css | 269 +++++++++++++++++---------------- 1 file changed, 135 insertions(+), 134 deletions(-) diff --git a/app/src/assets/style/style.css b/app/src/assets/style/style.css index 7f06512..582e3c9 100644 --- a/app/src/assets/style/style.css +++ b/app/src/assets/style/style.css @@ -52,8 +52,7 @@ body { } .container { - max-width: 1200px; - margin: 2vh auto; + margin: 4vh; padding: 0; min-height: 100vh; display: flex; @@ -222,118 +221,163 @@ body { overflow-x: auto; } -/* Table Layout */ -.file-table { +.file-list { + display: flex; + flex-direction: column; + gap: 0; 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 { - position: sticky; - top: 0; - background-color: var(--bg-secondary); - z-index: 5; - transition: background-color 0.3s ease, border-color 0.3s ease; -} - -.file-table th { - text-align: left; +/* Each row uses grid to emulate columns */ +.file-row { + display: grid; + grid-template-columns: 2.5rem 1fr 10.5rem 14rem; /* icon | name | size | modified */ + align-items: center; + gap: 0.75rem; padding: 0.75rem; border-bottom: 1px solid var(--border-color); - color: var(--text-secondary); - 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; + transition: background-color 0.15s ease, transform 0.08s ease; cursor: pointer; + background: transparent; } -.file-table tbody tr:hover { - background-color: var(--file-hover); +/* last row - optional: remove border */ +.file-list .file-row:last-child { + border-bottom: none; } -.file-table td { - padding: 0.75rem; - color: var(--text-primary); -} - -.file-table td.icon { +/* icon cell (keeps the look from your table td.icon) */ +.file-row > div:first-child { width: 2.5rem; - font-size: 1.25rem; - text-align: center; + height: 2rem; + display: flex; + align-items: center; + justify-content: center; + font-size: 1.125rem; } -.file-table td.name { +/* name cell */ +.file-row .name { font-weight: 500; -} - -.file-table tr.directory td.name { - color: var(--accent); - font-weight: 600; -} - -.file-table td.size, -.file-table td.date { - color: var(--text-secondary); - font-size: 0.875rem; + color: var(--text-primary); + overflow: hidden; + text-overflow: ellipsis; white-space: nowrap; } -/* Grid Layout */ -.grid { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); - gap: 1rem; +/* name link */ +.file-row .name a { + color: inherit; + text-decoration: none; + display: inline-block; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } -.grid-item { - display: flex; - 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 { +/* directory emphasis */ +.file-row.directory .name { color: var(--accent); font-weight: 600; } -.grid-size { - font-size: 0.75rem; +/* size and date cells */ +.file-row .size, +.file-row .date { 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 { @@ -355,6 +399,7 @@ body { } .listing { + width: 100%; padding: 1rem; } @@ -364,23 +409,6 @@ body { 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 { font-size: 0.9rem; margin-bottom: 0.75rem; @@ -437,33 +465,6 @@ body { font-size: 0.75rem; 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 */