refactor(css): trim app.css and unify pointer cursors

- Apply link cursor to buttons, clickable labels, and enabled .win98-button
- Reformat selector blocks for readability/consistency
- Remove upload window CSS from app.css to reduce bloat and keep styles scopedrefactor(css): trim app.css and unify pointer cursors

- Apply link cursor to buttons, clickable labels, and enabled .win98-button
- Reformat selector blocks for readability/consistency
- Remove upload window CSS from app.css to reduce bloat and keep styles scoped
This commit is contained in:
2026-04-27 16:49:44 +03:00
parent f06a2c544f
commit 9e6e48e68f
4 changed files with 434 additions and 416 deletions

View File

@@ -51,35 +51,40 @@
scroll-behavior: smooth;
}
a, .window-roach-message, .window-buttons .wbtn:not(.disabled_button) {
a,
button,
label[for],
.win98-button:not(:disabled) {
cursor: url('/static/cursors/vaporwave-hotline-white-plus/Link\ Select.cur'), auto;
}
input[type="text"], input[type="file"], textarea, [contenteditable="true"] {
input[type="text"],
input[type="file"],
textarea,
[contenteditable="true"] {
cursor: url('/static/cursors/vaporwave-hotline-white-plus/Hotline\ Black\ Handwriting.cur'), text;
}
html {
font-size: var(--base-font-size);
color: white;
background-color: #000;
}
html, body {
html,
body {
margin: 0;
padding: 0;
overflow-x: hidden;
}
body {
background-color: #000000;
background-image: url('/static/img/bg/stars1.gif');
background-repeat: repeat;
width: 100vw;
min-height: 100vh;
height: auto;
background-color: #000000;
background-image: url('/static/img/bg/stars1.gif');
background-repeat: repeat;
}
main {
@@ -88,402 +93,3 @@ main {
width: 100vw;
min-height: 100vh;
}
.upload-window {
width: 520px;
height: 420px;
box-sizing: border-box;
display: flex;
flex-direction: column;
color: #000;
background: var(--w98-gray);
border-top: 2px solid #ffffff;
border-left: 2px solid #ffffff;
border-right: 2px solid #000000;
border-bottom: 2px solid #000000;
box-shadow:
inset -1px -1px 0 #808080,
inset 1px 1px 0 #dfdfdf;
}
.upload-titlebar {
display: flex;
align-items: center;
justify-content: space-between;
height: 22px;
box-sizing: border-box;
margin: 2px;
padding: 2px 3px 2px 6px;
color: #ffffff;
background: var(--w98-blue-gradient);
}
.upload-titlebar h1 {
margin: 0;
font-size: 14px;
line-height: 14px;
font-weight: bold;
}
.upload-window-controls {
display: flex;
gap: 2px;
}
.upload-control {
width: 16px;
height: 14px;
box-sizing: border-box;
display: grid;
place-items: center;
color: #000000;
background: var(--w98-gray);
border-top: 1px solid #ffffff;
border-left: 1px solid #ffffff;
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
box-shadow:
inset -1px -1px 0 #808080,
inset 1px 1px 0 #dfdfdf;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 12px;
}
.upload-form {
display: flex;
flex: 1;
flex-direction: column;
min-height: 0;
}
.upload-menu {
display: flex;
align-items: center;
gap: 18px;
height: 22px;
box-sizing: border-box;
padding: 0 8px;
font-size: 13px;
line-height: 13px;
}
.upload-panel {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
margin: 0 8px 8px;
padding: 12px;
box-sizing: border-box;
background: #ffffff;
border-top: 2px solid #808080;
border-left: 2px solid #808080;
border-right: 2px solid #ffffff;
border-bottom: 2px solid #ffffff;
}
.upload-dropzone {
flex: 0 0 auto;
height: 118px;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
padding: 14px;
text-align: center;
background: #dfdfdf;
border: 1px dotted #000000;
}
.upload-dropzone.is-dragging {
background: #c7d8f2;
outline: 2px solid #000078;
outline-offset: -4px;
}
.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;
align-items: center;
height: 28px;
margin-top: 12px;
padding: 0 8px;
box-sizing: border-box;
background: #ffffff;
border-top: 1px solid #808080;
border-left: 1px solid #808080;
border-right: 1px solid #dfdfdf;
border-bottom: 1px solid #dfdfdf;
font-size: 13px;
line-height: 13px;
}
.upload-detail-label {
flex: 0 0 auto;
margin-right: 6px;
font-weight: bold;
}
.upload-file-count {
margin-left: auto;
}
.upload-file-list {
flex: 1 1 auto;
min-height: 0;
margin-top: 8px;
overflow-y: auto;
background: #ffffff;
border-top: 2px solid #808080;
border-left: 2px solid #808080;
border-right: 2px solid #ffffff;
border-bottom: 2px solid #ffffff;
}
.upload-empty-state {
margin: 0;
padding: 9px 8px;
color: #555555;
font-size: 13px;
line-height: 13px;
}
.upload-file-row {
display: grid;
grid-template-columns: 22px minmax(0, 1fr) 82px;
grid-template-rows: 20px 8px;
align-items: center;
height: 36px;
box-sizing: border-box;
padding: 4px 8px;
border-bottom: 1px solid #dfdfdf;
font-size: 13px;
line-height: 13px;
}
.upload-file-row:nth-child(even) {
background: #f7f7f7;
}
.upload-file-icon {
grid-row: 1 / 3;
width: 16px;
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;
}
.upload-file-name,
.upload-file-size {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.upload-file-size {
text-align: right;
}
.upload-progress {
grid-column: 2 / 4;
grid-row: 2;
display: block;
height: 8px;
box-sizing: border-box;
overflow: hidden;
background: #ffffff;
border-top: 1px solid #808080;
border-left: 1px solid #808080;
border-right: 1px solid #dfdfdf;
border-bottom: 1px solid #dfdfdf;
}
.upload-progress-bar {
display: block;
width: 0%;
height: 100%;
background: #000078;
}
.upload-file-row.is-uploaded .upload-progress-bar {
background: #008000;
}
.upload-file-row.is-failed .upload-progress-bar {
width: 100%;
background: #800000;
}
.upload-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
height: 40px;
box-sizing: border-box;
padding: 0 8px 8px;
}
.win98-button {
width: 92px;
height: 28px;
box-sizing: border-box;
display: grid;
place-items: center;
margin: 0;
padding: 0 10px;
color: #000000;
background: var(--w98-gray);
border-top: 2px solid #ffffff;
border-left: 2px solid #ffffff;
border-right: 2px solid #000000;
border-bottom: 2px solid #000000;
box-shadow:
inset -1px -1px 0 #808080,
inset 1px 1px 0 #dfdfdf;
font-family: inherit;
font-size: 13px;
line-height: 13px;
text-align: center;
appearance: none;
}
.win98-button:active {
border-top-color: #000000;
border-left-color: #000000;
border-right-color: #ffffff;
border-bottom-color: #ffffff;
box-shadow:
inset -1px -1px 0 #dfdfdf,
inset 1px 1px 0 #808080;
padding: 1px 9px 0 11px;
}
.win98-button:focus-visible,
.upload-dropzone:focus-visible {
outline: 1px dotted #000000;
outline-offset: -5px;
}
.upload-statusbar {
display: grid;
grid-template-columns: 1fr 96px;
gap: 4px;
height: 22px;
box-sizing: border-box;
padding: 0 4px 4px;
font-size: 12px;
line-height: 12px;
}
.upload-statusbar span {
display: flex;
align-items: center;
min-width: 0;
padding: 0 5px;
box-sizing: border-box;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border-top: 1px solid #808080;
border-left: 1px solid #808080;
border-right: 1px solid #ffffff;
border-bottom: 1px solid #ffffff;
}
@media (max-width: 600px) {
main {
display: block;
min-height: 100dvh;
}
.upload-window {
width: 100vw;
height: 100dvh;
border: 0;
box-shadow: none;
}
.upload-titlebar {
height: 24px;
margin: 0;
}
.upload-menu {
height: 26px;
}
.upload-panel {
margin: 0 6px 8px;
padding: 14px;
}
.upload-dropzone {
height: 126px;
min-height: 126px;
}
.upload-file-list {
min-height: 160px;
}
}

267
static/css/upload.css Normal file
View File

@@ -0,0 +1,267 @@
.upload-window {
width: 520px;
height: 420px;
}
.upload-form {
display: flex;
flex: 1;
flex-direction: column;
min-height: 0;
}
.upload-panel {
display: flex;
flex: 1;
flex-direction: column;
min-height: 0;
margin: 0 8px 8px;
padding: 12px;
}
.upload-dropzone {
flex: 0 0 auto;
height: 118px;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
padding: 14px;
text-align: center;
background: #dfdfdf;
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-details {
flex: 0 0 auto;
display: flex;
align-items: center;
height: 28px;
margin-top: 12px;
padding: 0 8px;
box-sizing: border-box;
background: #ffffff;
border-top: 1px solid #808080;
border-left: 1px solid #808080;
border-right: 1px solid #dfdfdf;
border-bottom: 1px solid #dfdfdf;
font-size: 13px;
line-height: 13px;
}
.upload-detail-label {
flex: 0 0 auto;
margin-right: 6px;
font-weight: bold;
}
.upload-file-count {
margin-left: auto;
}
.upload-file-list {
flex: 1 1 auto;
min-height: 0;
margin-top: 8px;
overflow-y: auto;
background: #ffffff;
border-top: 2px solid #808080;
border-left: 2px solid #808080;
border-right: 2px solid #ffffff;
border-bottom: 2px solid #ffffff;
}
.upload-empty-state {
margin: 0;
padding: 9px 8px;
color: #555555;
font-size: 13px;
line-height: 13px;
}
.upload-file-row {
display: grid;
grid-template-columns: 22px minmax(0, 1fr) 82px;
grid-template-rows: 20px 8px;
align-items: center;
height: 36px;
box-sizing: border-box;
padding: 4px 8px;
border-bottom: 1px solid #dfdfdf;
font-size: 13px;
line-height: 13px;
}
.upload-file-row:nth-child(even) {
background: #f7f7f7;
}
.upload-file-icon {
grid-row: 1 / 3;
width: 16px;
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;
}
.upload-file-name,
.upload-file-size {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.upload-file-size {
text-align: right;
}
.upload-progress {
grid-column: 2 / 4;
grid-row: 2;
display: block;
height: 8px;
box-sizing: border-box;
overflow: hidden;
background: #ffffff;
border-top: 1px solid #808080;
border-left: 1px solid #808080;
border-right: 1px solid #dfdfdf;
border-bottom: 1px solid #dfdfdf;
}
.upload-progress-bar {
display: block;
width: 0%;
height: 100%;
background: #000078;
}
.upload-file-row.is-uploaded .upload-progress-bar {
background: #008000;
}
.upload-file-row.is-failed .upload-progress-bar {
width: 100%;
background: #800000;
}
.upload-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
height: 40px;
box-sizing: border-box;
padding: 0 8px 8px;
}
.upload-statusbar {
grid-template-columns: 1fr 96px;
}
@media (max-width: 600px) {
main {
display: block;
min-height: 100dvh;
}
.upload-window {
width: 100vw;
height: 100dvh;
border: 0;
box-shadow: none;
}
.upload-titlebar {
height: 24px;
margin: 0;
}
.upload-menu {
height: 26px;
}
.upload-panel {
margin: 0 6px 8px;
padding: 14px;
}
.upload-dropzone {
height: 126px;
min-height: 126px;
}
.upload-file-list {
min-height: 160px;
}
}

143
static/css/window.css Normal file
View File

@@ -0,0 +1,143 @@
.win98-window {
box-sizing: border-box;
display: flex;
flex-direction: column;
color: #000000;
background: var(--w98-gray);
border-top: 2px solid #ffffff;
border-left: 2px solid #ffffff;
border-right: 2px solid #000000;
border-bottom: 2px solid #000000;
box-shadow:
inset -1px -1px 0 #808080,
inset 1px 1px 0 #dfdfdf;
}
.win98-titlebar {
display: flex;
align-items: center;
justify-content: space-between;
height: 22px;
box-sizing: border-box;
margin: 2px;
padding: 2px 3px 2px 6px;
color: #ffffff;
background: var(--w98-blue-gradient);
}
.win98-titlebar h1 {
margin: 0;
font-size: 14px;
line-height: 14px;
font-weight: bold;
}
.win98-window-controls {
display: flex;
gap: 2px;
}
.win98-control {
width: 16px;
height: 14px;
box-sizing: border-box;
display: grid;
place-items: center;
color: #000000;
background: var(--w98-gray);
border-top: 1px solid #ffffff;
border-left: 1px solid #ffffff;
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
box-shadow:
inset -1px -1px 0 #808080,
inset 1px 1px 0 #dfdfdf;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 12px;
}
.win98-menu {
display: flex;
align-items: center;
gap: 18px;
height: 22px;
box-sizing: border-box;
padding: 0 8px;
font-size: 13px;
line-height: 13px;
}
.win98-panel {
box-sizing: border-box;
background: #ffffff;
border-top: 2px solid #808080;
border-left: 2px solid #808080;
border-right: 2px solid #ffffff;
border-bottom: 2px solid #ffffff;
}
.win98-button {
width: 92px;
height: 28px;
box-sizing: border-box;
display: grid;
place-items: center;
margin: 0;
padding: 0 10px;
color: #000000;
background: var(--w98-gray);
border-top: 2px solid #ffffff;
border-left: 2px solid #ffffff;
border-right: 2px solid #000000;
border-bottom: 2px solid #000000;
box-shadow:
inset -1px -1px 0 #808080,
inset 1px 1px 0 #dfdfdf;
font-family: inherit;
font-size: 13px;
line-height: 13px;
text-align: center;
appearance: none;
}
.win98-button:active {
border-top-color: #000000;
border-left-color: #000000;
border-right-color: #ffffff;
border-bottom-color: #ffffff;
box-shadow:
inset -1px -1px 0 #dfdfdf,
inset 1px 1px 0 #808080;
padding: 1px 9px 0 11px;
}
.win98-button:focus-visible {
outline: 1px dotted #000000;
outline-offset: -5px;
}
.win98-statusbar {
display: grid;
gap: 4px;
height: 22px;
box-sizing: border-box;
padding: 0 4px 4px;
font-size: 12px;
line-height: 12px;
}
.win98-statusbar span {
display: flex;
align-items: center;
min-width: 0;
padding: 0 5px;
box-sizing: border-box;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border-top: 1px solid #808080;
border-left: 1px solid #808080;
border-right: 1px solid #ffffff;
border-bottom: 1px solid #ffffff;
}

View File

@@ -6,29 +6,31 @@
<title>Warpbox</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/static/css/app.css">
<link rel="stylesheet" href="/static/css/window.css">
<link rel="stylesheet" href="/static/css/upload.css">
</head>
<body>
<main>
<section class="upload-window" aria-labelledby="upload-window-title">
<header class="upload-titlebar">
<section class="win98-window upload-window" aria-labelledby="upload-window-title">
<header class="win98-titlebar upload-titlebar">
<h1 id="upload-window-title">WarpBox Upload</h1>
<div class="upload-window-controls" aria-hidden="true">
<span class="upload-control">_</span>
<span class="upload-control"></span>
<span class="upload-control">×</span>
<div class="win98-window-controls" aria-hidden="true">
<span class="win98-control">_</span>
<span class="win98-control"></span>
<span class="win98-control">×</span>
</div>
</header>
<form class="upload-form" action="/upload" method="post" enctype="multipart/form-data">
<div class="upload-menu" aria-hidden="true">
<div class="win98-menu upload-menu" aria-hidden="true">
<span>File</span>
<span>Edit</span>
<span>View</span>
<span>Help</span>
</div>
<div class="upload-panel">
<div class="win98-panel upload-panel">
<label class="upload-dropzone" for="file-upload">
<span class="upload-icon" aria-hidden="true"></span>
<span class="upload-primary">Drop file here</span>
@@ -52,7 +54,7 @@
<button class="win98-button" type="submit">Upload</button>
</footer>
<div class="upload-statusbar" aria-live="polite">
<div class="win98-statusbar upload-statusbar" aria-live="polite">
<span>Ready</span>
<span>WarpBox</span>
</div>