feat(ui): add file-type icons and clamp window titles
Add a file-to-icon resolver for common MIME types/extensions so uploads display appropriate Win98-style icons. Update upload and window CSS to use image-based, pixelated icons, and prevent long window titles from overflowing by adding a flex label with ellipsis handling.feat(ui): add file-type icons and clamp window titles Add a file-to-icon resolver for common MIME types/extensions so uploads display appropriate Win98-style icons. Update upload and window CSS to use image-based, pixelated icons, and prevent long window titles from overflowing by adding a flex label with ellipsis handling.
This commit is contained in:
@@ -34,6 +34,59 @@
|
||||
border: 1px dotted #000000;
|
||||
}
|
||||
|
||||
.upload-dropzone.is-dragging {
|
||||
background: #c7d8f2;
|
||||
outline: 2px solid #000078;
|
||||
outline-offset: -4px;
|
||||
}
|
||||
|
||||
.upload-dropzone:focus-visible {
|
||||
outline: 1px dotted #000000;
|
||||
outline-offset: -5px;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
width: 34px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
border: 2px solid #000000;
|
||||
box-shadow: inset -3px -3px 0 #dfdfdf;
|
||||
}
|
||||
|
||||
.upload-icon::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: -2px;
|
||||
top: -2px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
box-sizing: border-box;
|
||||
background: #dfdfdf;
|
||||
border-left: 2px solid #000000;
|
||||
border-bottom: 2px solid #000000;
|
||||
}
|
||||
|
||||
.upload-primary {
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.upload-secondary {
|
||||
font-size: 13px;
|
||||
line-height: 15px;
|
||||
}
|
||||
|
||||
.upload-input {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.upload-options {
|
||||
flex: 0 0 auto;
|
||||
display: grid;
|
||||
@@ -104,59 +157,6 @@
|
||||
background: #c0c0c0;
|
||||
}
|
||||
|
||||
.upload-dropzone.is-dragging {
|
||||
background: #c7d8f2;
|
||||
outline: 2px solid #000078;
|
||||
outline-offset: -4px;
|
||||
}
|
||||
|
||||
.upload-dropzone:focus-visible {
|
||||
outline: 1px dotted #000000;
|
||||
outline-offset: -5px;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
width: 34px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
border: 2px solid #000000;
|
||||
box-shadow: inset -3px -3px 0 #dfdfdf;
|
||||
}
|
||||
|
||||
.upload-icon::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: -2px;
|
||||
top: -2px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
box-sizing: border-box;
|
||||
background: #dfdfdf;
|
||||
border-left: 2px solid #000000;
|
||||
border-bottom: 2px solid #000000;
|
||||
}
|
||||
|
||||
.upload-primary {
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.upload-secondary {
|
||||
font-size: 13px;
|
||||
line-height: 15px;
|
||||
}
|
||||
|
||||
.upload-input {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.upload-details {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
@@ -280,25 +280,10 @@
|
||||
|
||||
.upload-file-icon {
|
||||
grid-row: 1 / 3;
|
||||
width: 16px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
border: 1px solid #000000;
|
||||
box-shadow: inset -2px -2px 0 #dfdfdf;
|
||||
}
|
||||
|
||||
.upload-file-icon::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
right: -1px;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background: #dfdfdf;
|
||||
border-left: 1px solid #000000;
|
||||
border-bottom: 1px solid #000000;
|
||||
object-fit: contain;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
.upload-file-name,
|
||||
|
||||
@@ -26,14 +26,34 @@
|
||||
}
|
||||
|
||||
.win98-titlebar h1 {
|
||||
min-width: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
line-height: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.win98-titlebar-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.win98-titlebar-icon {
|
||||
flex: 0 0 auto;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
object-fit: contain;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
.win98-window-controls {
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user