mirror of
https://codeberg.org/armin/noiz.git
synced 2026-09-01 05:50:52 +02:00
Merge pull request 'test' (#1) from test into main
Reviewed-on: https://codeberg.org/armin/noiz/pulls/1
This commit is contained in:
commit
a2bc0c5e78
3 changed files with 28 additions and 11 deletions
|
|
@ -23,3 +23,11 @@ There is a live demo available at [bsd.pm/noiz](https://bsd.pm/noiz/).
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Open `index.html` in any modern browser. Click **+Folder**, **+Files**, or drag audio files onto the window.
|
Open `index.html` in any modern browser. Click **+Folder**, **+Files**, or drag audio files onto the window.
|
||||||
|
|
||||||
|
## Native App (noiz.py)
|
||||||
|
|
||||||
|
`noiz.py` is a fully fledged local native application wrapper that runs `noiz://` in its own desktop window using [pywebview](https://pywebview.flowrl.com/). It launches the noiz:// app as a standalone application with native window via Python's webview, rather than running inside a browser tab. noiz.py is (as of now) 8 lines long.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install pywebview && python noiz.py
|
||||||
|
```
|
||||||
|
|
|
||||||
23
index.html
23
index.html
|
|
@ -72,31 +72,32 @@ canvas { width: 100%; height: 100px; border-radius: 6px; display: block; }
|
||||||
.playlist-toolbar select { background: linear-gradient(to bottom, #272c42, #1e2132); border: 1px solid #6b7089; color: #c6c8d1; padding: 4px 8px; border-radius: 4px; font-size: 11px; cursor: pointer; outline: none; box-shadow: 0 2px 0 #161821, 0 3px 4px rgba(0,0,0,0.3); transition: transform .1s, box-shadow .1s; }
|
.playlist-toolbar select { background: linear-gradient(to bottom, #272c42, #1e2132); border: 1px solid #6b7089; color: #c6c8d1; padding: 4px 8px; border-radius: 4px; font-size: 11px; cursor: pointer; outline: none; box-shadow: 0 2px 0 #161821, 0 3px 4px rgba(0,0,0,0.3); transition: transform .1s, box-shadow .1s; }
|
||||||
|
|
||||||
.playlist-header { display: grid; grid-template-columns: 36px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) 60px 60px; gap: 8px; padding: 8px 24px; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: #6b7089; border-bottom: 1px solid #272c42; flex-shrink: 0; background: linear-gradient(to bottom, #1e2132, #161821); }
|
.playlist-header { display: grid; grid-template-columns: 36px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) 60px 60px; gap: 8px; padding: 8px 24px; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: #6b7089; border-bottom: 1px solid #272c42; flex-shrink: 0; background: linear-gradient(to bottom, #1e2132, #161821); }
|
||||||
.playlist-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 2px 0; position: relative; }
|
.playlist-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 2px 0; position: relative; background: #101219; }
|
||||||
#scanning { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(22,24,33,0.85); z-index: 10; font-size: 14px; color: #c6c8d1; flex-direction: column; gap: 10px; }
|
#scanning { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(22,24,33,0.85); z-index: 10; font-size: 14px; color: #c6c8d1; flex-direction: column; gap: 10px; }
|
||||||
#scanning .spinner { width: 20px; height: 20px; border: 2px solid #6b7089; border-top-color: #84a0c6; border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
|
#scanning .spinner { width: 20px; height: 20px; border: 2px solid #6b7089; border-top-color: #84a0c6; border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
|
||||||
.playlist-body::-webkit-scrollbar { width: 6px; }
|
.playlist-body::-webkit-scrollbar { width: 6px; }
|
||||||
.playlist-body::-webkit-scrollbar-track { background: transparent; }
|
.playlist-body::-webkit-scrollbar-track { background: transparent; }
|
||||||
.playlist-body::-webkit-scrollbar-thumb { background: #272c42; border-radius: 3px; }
|
.playlist-body::-webkit-scrollbar-thumb { background: #272c42; border-radius: 3px; }
|
||||||
.track-item { display: grid; grid-template-columns: 36px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) 60px 60px; gap: 8px; padding: 6px 24px; cursor: pointer; font-size: 12px; border-left: 3px solid transparent; transition: background .08s; align-items: center; user-select: none; }
|
.track-item { display: grid; grid-template-columns: 36px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) 60px 60px; gap: 8px; padding: 6px 24px; cursor: pointer; font-size: 12px; border-left: 3px solid transparent; transition: background .08s; align-items: center; user-select: none; }
|
||||||
|
.track-item:nth-child(odd) { background: rgba(0,0,0,0.12); }
|
||||||
.track-item:hover { background: #1e2132; }
|
.track-item:hover { background: #1e2132; }
|
||||||
.track-item.active { background: linear-gradient(to bottom, rgba(180,190,130,0.12), rgba(180,190,130,0.06)); border-left-color: #b4be82; }
|
.track-item.active { background: linear-gradient(to bottom, rgba(135,190,130,0.12), rgba(135,190,130,0.06)); border-left-color: #87be82; }
|
||||||
.track-item.active .col-title { color: #c0ca8e; font-weight: 700; }
|
.track-item.active .col-title { color: #9bbe8e; font-weight: 700; }
|
||||||
.track-item.active .col-artist { color: #b4be82; font-weight: 600; }
|
.track-item.active .col-artist { color: #87be82; font-weight: 600; }
|
||||||
.track-item.active .col-idx { color: #c0ca8e; font-weight: 700; }
|
.track-item.active .col-idx { color: #9bbe8e; font-weight: 700; }
|
||||||
.track-item.active .col-time { color: #b4be82; font-weight: 600; }
|
.track-item.active .col-time { color: #87be82; font-weight: 600; }
|
||||||
.track-item.active .col-genre { color: #b4be82; }
|
.track-item.active .col-genre { color: #87be82; }
|
||||||
.track-item.active .col-file { color: #b4be82; font-weight: 600; }
|
.track-item.active .col-file { color: #87be82; font-weight: 600; }
|
||||||
.track-item.selected { background: linear-gradient(to bottom, rgba(132,160,198,0.15), rgba(132,160,198,0.08)); border-left-color: #84a0c6; }
|
.track-item.selected { background: linear-gradient(to bottom, rgba(132,160,198,0.15), rgba(132,160,198,0.08)); border-left-color: #84a0c6; }
|
||||||
.track-item.selected .col-title { color: #91acd1; font-weight: 600; }
|
.track-item.selected .col-title { color: #91acd1; font-weight: 600; }
|
||||||
.track-item.selected .col-artist { color: #84a0c6; }
|
.track-item.selected .col-artist { color: #84a0c6; }
|
||||||
.track-item.selected .col-idx { color: #84a0c6; }
|
.track-item.selected .col-idx { color: #84a0c6; }
|
||||||
.track-item.selected .col-time { color: #84a0c6; }
|
.track-item.selected .col-time { color: #84a0c6; }
|
||||||
.track-item.selected .col-file { color: #84a0c6; }
|
.track-item.selected .col-file { color: #84a0c6; }
|
||||||
.track-item.active.selected { background: linear-gradient(to bottom, rgba(180,190,130,0.18), rgba(132,160,198,0.12)); border-left-color: #b4be82; }
|
.track-item.active.selected { background: linear-gradient(to bottom, rgba(135,190,130,0.18), rgba(132,160,198,0.12)); border-left-color: #87be82; }
|
||||||
.track-item.active.selected .col-title { color: #c0ca8e; }
|
.track-item.active.selected .col-title { color: #9bbe8e; }
|
||||||
.track-item.dragging { opacity: 0.4; }
|
.track-item.dragging { opacity: 0.4; }
|
||||||
.track-item.drag-over { border-top: 2px solid #b4be82; }
|
.track-item.drag-over { border-top: 2px solid #87be82; }
|
||||||
.track-item .col-idx { color: #6b7089; text-align: right; font-size: 10px; }
|
.track-item .col-idx { color: #6b7089; text-align: right; font-size: 10px; }
|
||||||
.track-item .col-title { color: #c6c8d1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
.track-item .col-title { color: #c6c8d1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||||
.track-item .col-artist { color: #6b7089; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
.track-item .col-artist { color: #6b7089; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||||
|
|
|
||||||
8
noiz.py
Executable file
8
noiz.py
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
import webview
|
||||||
|
webview.create_window(
|
||||||
|
"noiz://",
|
||||||
|
"https://bsd.pm/noiz/"
|
||||||
|
)
|
||||||
|
webview.start()
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue