diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 26b4ca90..b842e7fe 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -77,7 +77,7 @@ jobs: - run: | mk python-release owner=vkottler \ - repo=runtimepy version=5.7.0 + repo=runtimepy version=5.7.1 if: | matrix.python-version == '3.12' && matrix.system == 'ubuntu-latest' diff --git a/README.md b/README.md index 5d961535..853791e3 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ===================================== generator=datazen version=3.1.4 - hash=aa59dcef7f11c767458b14ad97f9de59 + hash=8247340c8c4e6982a54b831c311f2c0b ===================================== --> -# runtimepy ([5.7.0](https://pypi.org/project/runtimepy/)) +# runtimepy ([5.7.1](https://pypi.org/project/runtimepy/)) [![python](https://img.shields.io/pypi/pyversions/runtimepy.svg)](https://pypi.org/project/runtimepy/) ![Build Status](https://github.com/vkottler/runtimepy/workflows/Python%20Package/badge.svg) diff --git a/local/variables/package.yaml b/local/variables/package.yaml index eac174f6..1c564ee1 100644 --- a/local/variables/package.yaml +++ b/local/variables/package.yaml @@ -1,5 +1,5 @@ --- major: 5 minor: 7 -patch: 0 +patch: 1 entry: runtimepy diff --git a/pyproject.toml b/pyproject.toml index 085ef1e7..97d30c6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__" [project] name = "runtimepy" -version = "5.7.0" +version = "5.7.1" description = "A framework for implementing Python services." readme = "README.md" requires-python = ">=3.11" diff --git a/runtimepy/__init__.py b/runtimepy/__init__.py index 9ac1236c..25ce4a06 100644 --- a/runtimepy/__init__.py +++ b/runtimepy/__init__.py @@ -1,7 +1,7 @@ # ===================================== # generator=datazen # version=3.1.4 -# hash=c51f4ac6cf134b3c3fa872a096e83489 +# hash=405585c0fbfcc966ef193f744f21fa59 # ===================================== """ @@ -10,7 +10,7 @@ DESCRIPTION = "A framework for implementing Python services." PKG_NAME = "runtimepy" -VERSION = "5.7.0" +VERSION = "5.7.1" # runtimepy-specific content. METRICS_NAME = "metrics" diff --git a/runtimepy/data/css/bootstrap_extra.css b/runtimepy/data/css/bootstrap_extra.css index 07fe17c3..5347d80d 100644 --- a/runtimepy/data/css/bootstrap_extra.css +++ b/runtimepy/data/css/bootstrap_extra.css @@ -98,13 +98,8 @@ button:hover { width: 6em; } -/* - * Should probably build the bootstrap stuff from source and set custom Sass: - * https://getbootstrap.com/docs/5.3/customize/sass/ - */ - -:root { - /* Prefer 'Arial' and 'Consolas' at the highest priority. */ - --bs-font-sans-serif: Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - --bs-font-monospace: Consolas, "Liberation Mono", "Courier New", monospace; +/* Prefer 'CascadiaCode' and 'CascadiaMono' at the highest priority. */ +:root, [data-bs-theme=dark], [data-bs-theme=light] { + --bs-font-sans-serif: CascadiaCode, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --bs-font-monospace: CascadiaMono, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } diff --git a/runtimepy/data/css/font.css b/runtimepy/data/css/font.css new file mode 100644 index 00000000..c5018327 --- /dev/null +++ b/runtimepy/data/css/font.css @@ -0,0 +1,47 @@ +@font-face { + font-family: CascadiaCode; + src: url("/static/woff2/CascadiaCode-Regular.woff2"); +} + +@font-face { + font-family: CascadiaCode; + src: url("/static/woff2/CascadiaCode-Bold.woff2"); + font-weight: bold; +} + +@font-face { + font-family: CascadiaCode; + src: url("/static/woff2/CascadiaCode-BoldItalic.woff2"); + font-weight: bold; + font-style: italic; +} + +@font-face { + font-family: CascadiaCode; + src: url("/static/woff2/CascadiaCode-Italic.woff2"); + font-style: italic; +} + +@font-face { + font-family: CascadiaMono; + src: url("/static/woff2/CascadiaMono-Regular.woff2"); +} + +@font-face { + font-family: CascadiaMono; + src: url("/static/woff2/CascadiaMono-Bold.woff2"); + font-weight: bold; +} + +@font-face { + font-family: CascadiaMono; + src: url("/static/woff2/CascadiaMono-BoldItalic.woff2"); + font-weight: bold; + font-style: italic; +} + +@font-face { + font-family: CascadiaMono; + src: url("/static/woff2/CascadiaMono-Italic.woff2"); + font-style: italic; +} diff --git a/runtimepy/data/favicon.ico b/runtimepy/data/favicon.ico index 53f55e21..d78b310b 100644 Binary files a/runtimepy/data/favicon.ico and b/runtimepy/data/favicon.ico differ diff --git a/runtimepy/data/static/svg/chip-circle-bootstrap.svg b/runtimepy/data/static/svg/chip-circle-bootstrap.svg new file mode 100644 index 00000000..d4daffaa --- /dev/null +++ b/runtimepy/data/static/svg/chip-circle-bootstrap.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtimepy/data/static/woff2/CascadiaCode-Bold.woff2 b/runtimepy/data/static/woff2/CascadiaCode-Bold.woff2 new file mode 100644 index 00000000..351db2cc Binary files /dev/null and b/runtimepy/data/static/woff2/CascadiaCode-Bold.woff2 differ diff --git a/runtimepy/data/static/woff2/CascadiaCode-BoldItalic.woff2 b/runtimepy/data/static/woff2/CascadiaCode-BoldItalic.woff2 new file mode 100644 index 00000000..3a5aa63d Binary files /dev/null and b/runtimepy/data/static/woff2/CascadiaCode-BoldItalic.woff2 differ diff --git a/runtimepy/data/static/woff2/CascadiaCode-Italic.woff2 b/runtimepy/data/static/woff2/CascadiaCode-Italic.woff2 new file mode 100644 index 00000000..fb7c71f6 Binary files /dev/null and b/runtimepy/data/static/woff2/CascadiaCode-Italic.woff2 differ diff --git a/runtimepy/data/static/woff2/CascadiaCode-Regular.woff2 b/runtimepy/data/static/woff2/CascadiaCode-Regular.woff2 new file mode 100644 index 00000000..734d1a8d Binary files /dev/null and b/runtimepy/data/static/woff2/CascadiaCode-Regular.woff2 differ diff --git a/runtimepy/data/static/woff2/CascadiaMono-Bold.woff2 b/runtimepy/data/static/woff2/CascadiaMono-Bold.woff2 new file mode 100644 index 00000000..083b137d Binary files /dev/null and b/runtimepy/data/static/woff2/CascadiaMono-Bold.woff2 differ diff --git a/runtimepy/data/static/woff2/CascadiaMono-BoldItalic.woff2 b/runtimepy/data/static/woff2/CascadiaMono-BoldItalic.woff2 new file mode 100644 index 00000000..7d318064 Binary files /dev/null and b/runtimepy/data/static/woff2/CascadiaMono-BoldItalic.woff2 differ diff --git a/runtimepy/data/static/woff2/CascadiaMono-Italic.woff2 b/runtimepy/data/static/woff2/CascadiaMono-Italic.woff2 new file mode 100644 index 00000000..ec3f80a3 Binary files /dev/null and b/runtimepy/data/static/woff2/CascadiaMono-Italic.woff2 differ diff --git a/runtimepy/data/static/woff2/CascadiaMono-Regular.woff2 b/runtimepy/data/static/woff2/CascadiaMono-Regular.woff2 new file mode 100644 index 00000000..52bd5436 Binary files /dev/null and b/runtimepy/data/static/woff2/CascadiaMono-Regular.woff2 differ diff --git a/runtimepy/data/static/woff2/README.md b/runtimepy/data/static/woff2/README.md new file mode 100644 index 00000000..5f49df16 --- /dev/null +++ b/runtimepy/data/static/woff2/README.md @@ -0,0 +1,9 @@ +# [Cascadia Code](https://github.com/microsoft/cascadia-code) + +Assets sourced from +[this release](https://github.com/microsoft/cascadia-code/releases/tag/v2404.23). + +See also: +[LICENSE](https://github.com/microsoft/cascadia-code/blob/main/LICENSE). + +**Fonts are used from release as-is.** diff --git a/runtimepy/net/server/app/base.py b/runtimepy/net/server/app/base.py index 1c72cb05..8f9195d3 100644 --- a/runtimepy/net/server/app/base.py +++ b/runtimepy/net/server/app/base.py @@ -52,10 +52,9 @@ def __init__(self, app: AppInfo) -> None: def populate(self, document: Html, app: TabPopulater) -> None: """Populate the body element with the application.""" - # Third-party dependencies. + # CSS. + append_kind(document.head, "font", kind="css", tag="style") add_bootstrap_css(document.head) - - # Internal CSS. append_kind( document.head, "main", "bootstrap_extra", kind="css", tag="style" ) diff --git a/runtimepy/net/server/app/env/tab/html.py b/runtimepy/net/server/app/env/tab/html.py index db2c973a..48b528a8 100644 --- a/runtimepy/net/server/app/env/tab/html.py +++ b/runtimepy/net/server/app/env/tab/html.py @@ -50,6 +50,9 @@ def create_name_td(parent: Element) -> Element: return div(tag="td", parent=parent, class_str="p-0 text-nowrap") +COMMANDABLE = "text-info-emphasis" + + class ChannelEnvironmentTabHtml(ChannelEnvironmentTabControls): """A channel-environment tab interface.""" @@ -67,7 +70,7 @@ def add_channel( name_elem = div(tag="span", text=name, parent=name_td) if chan.commandable: - name_elem.add_class("text-success") + name_elem.add_class(COMMANDABLE) if description: set_tooltip(name_elem, description, placement="left") @@ -105,7 +108,7 @@ def add_field( name_elem = div(tag="span", text=name, parent=name_td) if field.commandable: - name_elem.add_class("text-success") + name_elem.add_class(COMMANDABLE) if field.description: description = field.description diff --git a/tasks/dev.yaml b/tasks/dev.yaml index 7ed0bd28..adb63ed8 100644 --- a/tasks/dev.yaml +++ b/tasks/dev.yaml @@ -7,7 +7,25 @@ includes: factories: - {name: tasks.tlm.LogCapture} tasks: - - {name: root_log, factory: log_capture, period_s: 0.1} + - name: root_log + factory: log_capture + period_s: 0.1 + markdown: | + *something isn't looking right...* + + **why's it looking like that...** + + ***why's it looking like THAT...*** + + `nice mono stuff there` + + *`nice slanted mono yeah`* + + **`nice mono bold type shit there`** + + ***`nice mono bold type slant shit there`*** + + ligature type shit \_\_\_|\_\_\_ ligature type shit port_overrides: runtimepy_https_server: 8443 @@ -15,5 +33,14 @@ port_overrides: # This works. # websocket_hostname: nuc2 +config: + top_markdown: | + # Libre Embedded + + ![logo](/static/svg/chip-circle-bootstrap.svg) + + bottom_markdown: | + `libre-embedded.com` + app: - runtimepy.net.apps.wait_for_stop