Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ These rules are **never** overridden by component context, user request, or conv
Agents must treat violations as hard errors.

- **NEVER** use data colors (Okabe-Ito) for buttons, navigation, headings, text links,
input borders, or any UI chrome.
input borders, or any UI chrome. **Exception:** categorical file-type / node-type
icons (`ui/components/file_type_icon.py`, `tree._node_type_props`) may use `--oi-*`
hues -- they are a categorical *encoding* of a file/node category, not chrome.
- **NEVER** use `#F0E442` (yellow) as text color, stroke, or thin line on white or light
backgrounds.
- **NEVER** render numeric data, axis labels, badge text, captions, or code outside
Expand Down Expand Up @@ -59,8 +61,11 @@ for data series.
### Data Colors -- Okabe-Ito -- Visualization Only

Colorblind-safe palette designed by Masataka Okabe and Kei Ito. Safe across
deuteranopia, protanopia, and tritanopia. Used **exclusively** for data visualization:
plot series, progress bars, status badges, and semantic states.
deuteranopia, protanopia, and tritanopia. Used for data visualization (plot
series, progress bars, status badges, and semantic states) and for the
**categorical file-type / node-type icon encoding** (`file_type_icon.py`,
`tree._node_type_props`) -- a categorical encoding of a file/node category,
not UI chrome.

| Token | Name | Hex | CB Safe | Primary Use |
|------------------|----------------|-----------|-------------|-----------------------------|
Expand Down
20 changes: 20 additions & 0 deletions assets/fonts/mdi/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Pictogrammers Free License
--------------------------

This icon collection is released as free, open source, and GPL friendly by
the [Pictogrammers](http://pictogrammers.com/) icon group. You may use it
for commercial projects, open source projects, or anything really.

# Icons: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
Some of the icons are redistributed under the Apache 2.0 license. All other
icons are either redistributed under their respective licenses or are
distributed under the Apache 2.0 license.

# Fonts: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
All web and desktop fonts are distributed under the Apache 2.0 license. Web
and desktop fonts contain some icons that are redistributed under the Apache
2.0 license. All other icons are either redistributed under their respective
licenses or are distributed under the Apache 2.0 license.

# Code: MIT (https://opensource.org/licenses/MIT)
The MIT license applies to all non-font and non-icon files.
39 changes: 39 additions & 0 deletions assets/fonts/mdi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Vendored Material Design Icons (MDI) webfont

The file-type / node-type icons (`ui/components/file_type_icon.py`,
`ui/components/tree.py`) use Material Design Icons. NiceGUI/Quasar know the
`mdi-*` icon names but do **not** bundle the MDI webfont, and this app ships as
an offline PyInstaller desktop binary (no CDN), so the font must be vendored
here. `ui/theme.py:mdi_font_head_html()` injects:

<link rel="stylesheet" href="/assets/fonts/mdi/css/materialdesignicons.min.css">

served by `register_static_assets()` (mounts `assets/` at `/assets`). The whole
`assets/` tree is already bundled by PyInstaller (`exlab_wizard.spec`:
`DATAS.append(("assets", "assets"))`), so no spec change is needed once the
files below are present.

## Required files (place alongside this README)

assets/fonts/mdi/css/materialdesignicons.min.css
assets/fonts/mdi/fonts/materialdesignicons-webfont.woff2
assets/fonts/mdi/LICENSE # Apache-2.0

The `.min.css` references the woff2 via the relative `../fonts/...` URL, which
resolves correctly under `/assets/fonts/mdi/`. Optionally trim the css
`@font-face` `src` to the `woff2` entry to avoid 404s on the unbundled
eot/ttf/woff formats.

## How to fetch (on a networked machine)

npm pack @mdi/font@7
tar -xzf mdi-font-7.*.tgz
mkdir -p assets/fonts/mdi/css assets/fonts/mdi/fonts
cp package/css/materialdesignicons.min.css assets/fonts/mdi/css/
cp package/fonts/materialdesignicons-webfont.woff2 assets/fonts/mdi/fonts/
cp package/LICENSE assets/fonts/mdi/LICENSE

(Or download those three files from the `@mdi/font` v7 GitHub release.)

Until the font is present, the `<link>` 404s and glyphs render as empty boxes;
the unit tests do not require the binary.
3 changes: 3 additions & 0 deletions assets/fonts/mdi/css/materialdesignicons.min.css

Large diffs are not rendered by default.

Binary file not shown.
Loading
Loading