diff --git a/app/client/index.html b/app/client/index.html index 07590b65..088dfcbb 100644 --- a/app/client/index.html +++ b/app/client/index.html @@ -11,7 +11,7 @@ - + diff --git a/app/launcher/index.html b/app/launcher/index.html index 9bd540f4..ef044391 100644 --- a/app/launcher/index.html +++ b/app/launcher/index.html @@ -2,12 +2,10 @@ - - - + diff --git a/package.json b/package.json index 25186367..49126351 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "watch-css": "nodemon --watch src/scss -e scss -x \"npm run build-css -- --reload\"", "watch-server": "nodemon --watch src/server/ -e js -x \"npm run build-server-js\"", "watch-launcher": "nodemon --watch src/launcher/ -e js -x \"npm run build-launcher-js\"", - "build-docs": "node scripts/build-widgets-reference.js > resources/docs/docs/widgets-reference.md && cd resources && npm run build", + "build-docs": "node scripts/build-widgets-reference.js > resources/docs/docs/widgets/properties-reference.md && cd resources && npm run build", "test": "eslint src && npm run build && node tests/test.js" }, "engines": { diff --git a/resources/.gitignore b/resources/.gitignore index 4c7cb9f5..913aeb2b 100644 --- a/resources/.gitignore +++ b/resources/.gitignore @@ -1,3 +1 @@ -theme/styles.css site/* -!site/.htaccess diff --git a/resources/docs/docs/getting-started/running-with-node.md b/resources/docs/docs/getting-started/running-with-node.md index 0ad4098f..d8d7fbb1 100644 --- a/resources/docs/docs/getting-started/running-with-node.md +++ b/resources/docs/docs/getting-started/running-with-node.md @@ -1,4 +1,4 @@ -It is possible to run the server in headless mode using [Node.js](https://nodejs.org/en/download/package-manager/). This allows running OSC on systems that +It is possible to run the server in headless mode using [Node.js](https://nodejs.org/en/download/package-manager/). 1. Install [Node.js](https://nodejs.org/en/download/package-manager/) diff --git a/resources/docs/docs/getting-started/server-setup.md b/resources/docs/docs/getting-started/server-setup.md index 143930ef..386de6a5 100644 --- a/resources/docs/docs/getting-started/server-setup.md +++ b/resources/docs/docs/getting-started/server-setup.md @@ -1,5 +1,3 @@ -# Server options - Below are the available command-line options. Note that when running without any command-line switch (ie from a file browser), a launcher window will spawn to help setting them.
diff --git a/resources/docs/docs/user-interface/client.md b/resources/docs/docs/user-interface/client.md new file mode 100644 index 00000000..95e7390a --- /dev/null +++ b/resources/docs/docs/user-interface/client.md @@ -0,0 +1,21 @@ +!!! warning "Incomplete documentation" + +## Layout + +## Menu + +## Keyboard shortcuts + +The following shortcuts are always available: + +
+| Shortcut | Description | +|---|---| +| `mod + e` | enable/disable editor | +| `mod + s` | save session | +| `mod + shift s` | save session as... | +| `mod + o` | open a session file | +| `mod + w` | close client | + +!!! info "" + `mod` refers to the `ctrl` key except on MacOs (`command`) diff --git a/resources/docs/docs/user-interface/editor.md b/resources/docs/docs/user-interface/editor.md index f0c5cbc0..6ad77713 100644 --- a/resources/docs/docs/user-interface/editor.md +++ b/resources/docs/docs/user-interface/editor.md @@ -56,3 +56,31 @@ Selected widget can be resized using its south, south-east and east handles. It - selection can only contain sibling widgets (same direct parent) - context-menu actions and properties changes apply to all selected widgets - resizing / dragging will affect all selected widgets, relatively to the first selected widget + + +## Keyboard shortcuts + +The following shortcuts are available only when the editor is enabled: + +| Shortcut | Description | +|---|---| +| `mod + click`* | Multi-widget selection. Widgets can be toggled from selection by clicking on them individually.| +| `shift + click + drag`* | Draw a selection rectangle and attempt to select widgets in it (starts by selecting the widget under the cursor). If `mod` is pressed too, current selection is kept and will be merged with the new one if possible. | +| `mod + z` | Undo | +| `mod + y / mod + shift + z` | Redo | +| `delete` (`backspace` on Mac) | Delete selected widgets | +| `mod + c` | Copy selected widgets | +| `mod + x` | Cut selected widgets | +| `mod + v` | Paste clipboard in selected widget | +| `mod + shift + v` | Paste and increment id | +| `up, down, left, right` | Move selected widgets (1 grid unit, hold `shift` for 5 grid units) | +| `alt + [up, down, left, right]` | Resize selected widgets (1 grid unit, hold `shift` for 5 grid units) | +| `mod + a` | Select current widget's siblings and itself | +| `mod + shift + a` | Cancel current widget selection | +| `mod + up` | Select current widget's parent | +| `mod + down` | Select current widget's first child | +| `mod + right` | Select current widget's next sibling | +| `mod + left` | Select current widget's previous sibling | + +!!! info "" + `mod` refers to the `ctrl` key except on MacOs (`command`) diff --git a/resources/docs/docs/user-interface/keyboard-shortcuts.md b/resources/docs/docs/user-interface/keyboard-shortcuts.md index 475c259f..8b137891 100644 --- a/resources/docs/docs/user-interface/keyboard-shortcuts.md +++ b/resources/docs/docs/user-interface/keyboard-shortcuts.md @@ -1,38 +1 @@ -!!! info - `mod` refers to the `ctrl` key except on MacOs (`command`) -## General - -The following shortcuts are always available: - -
-| Shortcut | Description | -|---|---| -| `mod + e` | enable/disable editor | -| `mod + s` | save session | -| `mod + shift s` | save session as... | -| `mod + o` | open a session file | - -## Editor - -The following shortcuts are available only when the editor is enabled: - -| Shortcut | Description | -|---|---| -| `mod + click`* | Multi-widget selection. Widgets can be toggled from selection by clicking on them individually.| -| `shift + click + drag`* | Draw a selection rectangle and attempt to select widgets in it (starts by selecting the widget under the cursor). If `mod` is pressed too, current selection is kept and will be merged with the new one if possible. | -| `mod + z` | Undo | -| `mod + y / mod + shift + z` | Redo | -| `delete` (`backspace` on Mac) | Delete selected widgets | -| `mod + c` | Copy selected widgets | -| `mod + x` | Cut selected widgets | -| `mod + v` | Paste clipboard in selected widget | -| `mod + shift + v` | Paste and increment id | -| `up, down, left, right` | Move selected widgets (1 grid unit, hold `shift` for 5 grid units) | -| `alt + [up, down, left, right]` | Resize selected widgets (1 grid unit, hold `shift` for 5 grid units) | -| `mod + a` | Select current widget's siblings and itself | -| `mod + shift + a` | Cancel current widget selection | -| `mod + up` | Select current widget's parent | -| `mod + down` | Select current widget's first child | -| `mod + right` | Select current widget's next sibling | -| `mod + left` | Select current widget's previous sibling | diff --git a/resources/docs/docs/user-interface/launcher.md b/resources/docs/docs/user-interface/launcher.md new file mode 100644 index 00000000..05acabcc --- /dev/null +++ b/resources/docs/docs/user-interface/launcher.md @@ -0,0 +1,19 @@ +!!! warning "Incomplete documentation" + +## Keyboard shortcuts + +The following shortcuts are always available: + +
+| Shortcut | Description | +|---|---| +| `mod + w` | close window | + + + +!!! info "" + `mod` refers to the `ctrl` key except on MacOs (`command`) diff --git a/resources/docs/docs/user-interface/user-interface.md b/resources/docs/docs/user-interface/user-interface.md deleted file mode 100644 index 0d75f665..00000000 --- a/resources/docs/docs/user-interface/user-interface.md +++ /dev/null @@ -1,5 +0,0 @@ -!!! warning "Incomplete documentation" - -## Layout - -## Menu diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index 1629fe50..04f6ed63 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -1,4 +1,6 @@ -# Properties reference + + +# Widget reference
@@ -687,3 +689,4 @@ item.click() }) } + diff --git a/resources/docs/fonts b/resources/docs/fonts new file mode 120000 index 00000000..35bed8b8 --- /dev/null +++ b/resources/docs/fonts @@ -0,0 +1 @@ +../fonts \ No newline at end of file diff --git a/resources/docs/support.md b/resources/docs/support.md deleted file mode 100644 index 5ec86fd5..00000000 --- a/resources/docs/support.md +++ /dev/null @@ -1,39 +0,0 @@ -## Support Open Stage Control - -If you would like to show your appreciation, drop a line on the forums, it's always appreciated ! - -Donations are not possible per see, but you may buy some music made by [AMMD](http://ammd.bandcamp.com), a french nonprofit organization and independent music label that promotes free arts and free softwares. - -If you wish to sponsor the project or hire me to build something with Open Stage Control, feel free to [contact me](mailto:jean-emmanuel@ammd.net) but please note that: - -- Sponsoring is only possible in an "altruistic" way, that is with no guarantee whatsoever of prioritizing anyone's interests -- I'm not interested in developing dedicated features for proprietary softwares -- I'm not interested in developing closed-source contents - -## Infrastructure Sponsors - ----- - - - -AMMD hosts this website and made this project possible by funding its first 2 years of development. - ----- - - - -Discourse provides the community forum. - ----- - - - -BrowserStack provides a complete suite of browser emulators for Android, iOS and Windows. - ----- diff --git a/resources/fonts/Roboto-Bold.woff2 b/resources/fonts/Roboto-Bold.woff2 new file mode 100644 index 00000000..76817cc7 Binary files /dev/null and b/resources/fonts/Roboto-Bold.woff2 differ diff --git a/resources/fonts/Roboto-Light.woff2 b/resources/fonts/Roboto-Light.woff2 new file mode 100644 index 00000000..ddbf4a92 Binary files /dev/null and b/resources/fonts/Roboto-Light.woff2 differ diff --git a/resources/fonts/Roboto-Medium.woff2 b/resources/fonts/Roboto-Medium.woff2 new file mode 100644 index 00000000..6a88805f Binary files /dev/null and b/resources/fonts/Roboto-Medium.woff2 differ diff --git a/resources/fonts/Roboto-Regular.woff2 b/resources/fonts/Roboto-Regular.woff2 new file mode 100644 index 00000000..9a0064ec Binary files /dev/null and b/resources/fonts/Roboto-Regular.woff2 differ diff --git a/resources/fonts/fonts b/resources/fonts/fonts deleted file mode 120000 index 6dafdaff..00000000 --- a/resources/fonts/fonts +++ /dev/null @@ -1 +0,0 @@ -fonts \ No newline at end of file diff --git a/resources/fonts/roboto-medium.css b/resources/fonts/roboto-medium.css deleted file mode 100644 index bd223e5b..00000000 --- a/resources/fonts/roboto-medium.css +++ /dev/null @@ -1,13 +0,0 @@ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - src: url('roboto-medium.woff') format('woff'); -} - -@font-face { - font-family: 'RobotoMono'; - font-style: normal; - font-weight: 500; - src: url('roboto-mono.woff') format('woff'); -} diff --git a/resources/fonts/roboto-medium.woff b/resources/fonts/roboto-medium.woff deleted file mode 100644 index ced7907e..00000000 Binary files a/resources/fonts/roboto-medium.woff and /dev/null differ diff --git a/resources/fonts/roboto.css b/resources/fonts/roboto.css new file mode 100644 index 00000000..956730a3 --- /dev/null +++ b/resources/fonts/roboto.css @@ -0,0 +1,35 @@ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + src: url('Roboto-Bold.woff2') format('woff2'); +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: url('Roboto-Medium.woff2') format('woff2'); +} + + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: url('Roboto-Regular.woff2') format('woff2'); +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 100; + src: url('Roboto-Light.woff2') format('woff2'); +} + +@font-face { + font-family: 'Roboto Mono'; + font-style: normal; + font-weight: 500; + src: url('roboto-mono.woff') format('woff'); +} diff --git a/resources/mkdocs.yml b/resources/mkdocs.yml index e9baf071..fc886230 100644 --- a/resources/mkdocs.yml +++ b/resources/mkdocs.yml @@ -8,7 +8,6 @@ site_description: "Libre and modular OSC / MIDI controller" theme: name: 'material' custom_dir: 'theme' - # font: false features: - tabs - instant @@ -17,23 +16,10 @@ theme: accent: 'Indigo' logo: 'img/logo.png' favicon: 'img/logo_nobadge.png?6' - # static_templates: - # - 404.html extra_css: - 'extra/styles.css' -extra: - screenshot: img/ardour-osc.png - links: - - - title: Download - url: https://github.com/jean-emmanuel/open-stage-control/releases - primary: true - - - title: Try online (requires chromium 50+) - url : http://openstagecontrol.herokuapp.com - nav: - Home: index.md - Download: @@ -45,9 +31,9 @@ nav: - docs/getting-started/running-from-sources.md - docs/getting-started/running-with-node.md - User interface: - - docs/user-interface/user-interface.md + - docs/user-interface/launcher.md + - docs/user-interface/client.md - docs/user-interface/editor.md - - docs/user-interface/keyboard-shortcuts.md - Widgets: - docs/widgets/general-mechanics.md - docs/widgets/properties-reference.md diff --git a/resources/package.json b/resources/package.json index 1e0dcc51..09322824 100644 --- a/resources/package.json +++ b/resources/package.json @@ -9,9 +9,6 @@ "scripts": { "build": "mkdocs build" }, - "author": "", - "license": "ISC", - "dependencies": { - "spectre.css": "^0.5.8" - } + "author": "Jean-Emmanuel Doucet", + "license": "GPLv3", } diff --git a/resources/src/scss/admonition.scss b/resources/src/scss/admonition.scss deleted file mode 100644 index ba08edf4..00000000 --- a/resources/src/scss/admonition.scss +++ /dev/null @@ -1,57 +0,0 @@ -div.admonition { - font-size: 0.9em; - border: 1px solid #cccccc; - background-color: #fafafa; - padding: 0; - border-radius: 3px; - margin: 0 0 1.2rem; -} - -div.admonition p { - margin: 0.5em 1em 0.5em 1em; - padding: 0; -} - -div.admonition li p { - margin-left: 0; -} - -div.admonition pre, div.warning pre { - margin: 0; -} - -div.admonition p.admonition-title { - margin: 0; - padding: 0.5em; - color: white; - font-weight: bold; - background-color: #165e83; -} - -div.danger { border: 1px solid $error-color;} -div.error { border: 1px solid $error-color;} -div.warning { border: 1px solid $warning-color;} -div.caution { border: 1px solid $warning-color;} -div.attention { border: 1px solid $warning-color;} -div.important { border: 1px solid #f8b862;} -div.note { border: 1px solid #f8b862;} -div.hint { border: 1px solid #7ebea5;} -div.tip { border: 1px solid #7ebea5;} - -div.danger p.admonition-title, div.error p.admonition-title { - background-color: $error-color; -} - -div.caution p.admonition-title, -div.warning p.admonition-title, -div.attention p.admonition-title { - background-color: $warning-color; -} - -div.note p.admonition-title, div.important p.admonition-title { - background-color: #f8b862; -} - -div.hint p.admonition-title, div.tip p.admonition-title { - background-color: #7ebea5; -} diff --git a/resources/src/scss/codehilite.scss b/resources/src/scss/codehilite.scss deleted file mode 100644 index 1f4925f6..00000000 --- a/resources/src/scss/codehilite.scss +++ /dev/null @@ -1,315 +0,0 @@ -/* https://raw.githubusercontent.com/simonsmith/syntax.css */ - -.codehilite { - background: #ffffff; -} - -.codehilite .c { - color: #999988; - font-style: italic -} - -/* Comment */ -.codehilite .err { - color: #a61717; - background-color: #e3d2d2 -} - -/* Error */ -.codehilite .k { - font-weight: bold -} - -/* Keyword */ -.codehilite .o { - font-weight: bold -} - -/* Operator */ -.codehilite .cm { - color: #999988; - font-style: italic -} - -/* Comment.Multiline */ -.codehilite .cp { - color: #999999; - font-weight: bold -} - -/* Comment.Preproc */ -.codehilite .c1 { - color: #999988; - font-style: italic -} - -/* Comment.Single */ -.codehilite .cs { - color: #999999; - font-weight: bold; - font-style: italic -} - -/* Comment.Special */ -.codehilite .gd { - color: #000000; - background-color: #ffdddd -} - -/* Generic.Deleted */ -.codehilite .gd .x { - color: #000000; - background-color: #ffaaaa -} - -/* Generic.Deleted.Specific */ -.codehilite .ge { - font-style: italic -} - -/* Generic.Emph */ -.codehilite .gr { - color: #aa0000 -} - -/* Generic.Error */ -.codehilite .gh { - color: #999999 -} - -/* Generic.Heading */ -.codehilite .gi { - color: #000000; - background-color: #ddffdd -} - -/* Generic.Inserted */ -.codehilite .gi .x { - color: #000000; - background-color: #aaffaa -} - -/* Generic.Inserted.Specific */ -.codehilite .go { - color: #888888 -} - -/* Generic.Output */ -.codehilite .gp { - color: #555555 -} - -/* Generic.Prompt */ -.codehilite .gs { - font-weight: bold -} - -/* Generic.Strong */ -.codehilite .gu { - color: #aaaaaa -} - -/* Generic.Subheading */ -.codehilite .gt { - color: #aa0000 -} - -/* Generic.Traceback */ -.codehilite .kc { - font-weight: bold -} - -/* Keyword.Constant */ -.codehilite .kd { - font-weight: bold; - -} - -/* Keyword.Declaration */ -.codehilite .kp { - font-weight: bold -} - -/* Keyword.Pseudo */ -.codehilite .kr { - font-weight: bold -} - -/* Keyword.Reserved */ -.codehilite .kt { - color: #445588; - font-weight: bold -} - -/* Keyword.Type */ -.codehilite .m { - color: #009999 -} - -/* Literal.Number */ -.codehilite .s { - color: #d14 -} - -/* Literal.String */ -.codehilite .na { - color: #008080 -} - -/* Name.Attribute */ -.codehilite .nb { - color: #0086B3 -} - -/* Name.Builtin */ -.codehilite .nc { - color: #445588; - font-weight: bold -} - -/* Name.Class */ -.codehilite .no { - color: #008080 -} - -/* Name.Constant */ -.codehilite .ni { - color: #800080 -} - -/* Name.Entity */ -.codehilite .ne { - color: #990000; - font-weight: bold -} - -/* Name.Exception */ -.codehilite .nf { - color: #990000; - font-weight: bold -} - -/* Name.Function */ -.codehilite .nn { - color: #555555 -} - -/* Name.Namespace */ -.codehilite .nt { - color: #000080 -} - -/* Name.Tag */ -.codehilite .nv { - color: #008080 -} - -/* Name.Variable */ -.codehilite .ow { - font-weight: bold -} - -/* Operator.Word */ -.codehilite .w { - color: #bbbbbb -} - -/* Text.Whitespace */ -.codehilite .mf { - color: #009999 -} - -/* Literal.Number.Float */ -.codehilite .mh { - color: #009999 -} - -/* Literal.Number.Hex */ -.codehilite .mi { - color: #009999 -} - -/* Literal.Number.Integer */ -.codehilite .mo { - color: #009999 -} - -/* Literal.Number.Oct */ -.codehilite .sb { - color: #d14 -} - -/* Literal.String.Backtick */ -.codehilite .sc { - color: #d14 -} - -/* Literal.String.Char */ -.codehilite .sd { - color: #d14 -} - -/* Literal.String.Doc */ -.codehilite .s2 { - color: #d14 -} - -/* Literal.String.Double */ -.codehilite .se { - color: #d14 -} - -/* Literal.String.Escape */ -.codehilite .sh { - color: #d14 -} - -/* Literal.String.Heredoc */ -.codehilite .si { - color: #d14 -} - -/* Literal.String.Interpol */ -.codehilite .sx { - color: #d14 -} - -/* Literal.String.Other */ -.codehilite .sr { - color: #009926 -} - -/* Literal.String.Regex */ -.codehilite .s1 { - color: #d14 -} - -/* Literal.String.Single */ -.codehilite .ss { - color: #990073 -} - -/* Literal.String.Symbol */ -.codehilite .bp { - color: #999999 -} - -/* Name.Builtin.Pseudo */ -.codehilite .vc { - color: #008080 -} - -/* Name.Variable.Class */ -.codehilite .vg { - color: #008080 -} - -/* Name.Variable.Global */ -.codehilite .vi { - color: #008080 -} - -/* Name.Variable.Instance */ -.codehilite .il { - color: #009999 -} diff --git a/resources/src/scss/discourse.scss b/resources/src/scss/discourse.scss deleted file mode 100644 index f4c4a874..00000000 --- a/resources/src/scss/discourse.scss +++ /dev/null @@ -1,94 +0,0 @@ - -.wrap { - max-width: 1110px; -} -@media (max-width: 570px){ - .wrap, .full-width { - min-width: 0; - } -} - -.wrap { - margin-right: auto; - margin-left: auto; - padding: 0 8px; -} -.d-header>.wrap { - width: calc(100% - 16px); - height: 100%; - padding: 0; -} - - -.d-header { - left: 0; - height: 4em; - margin-bottom: 15px; - font-family: Helvetica,Arial,sans-serif; - font-size: 15px; - line-height: 1.4; -} - -.d-header { - display: flex; - align-items: center; - width: 100%; - position: fixed; - top: 0; - z-index: 1000; - background-color: $osc-color; - box-shadow: 0 2px 4px -1px rgba(0,0,0,0.25); -} - -.d-header>.wrap .contents { - display: flex; - align-items: center; - height: 100%; -} - -.wrap .contents { - position: relative; -} - -.d-header .title { - display: flex; - align-items: center; - height: 100%; -} - -.d-header .title img { - height: 2.57em; - vertical-align: middle; -} - - -.d-header .header-buttons-panel { - position: relative; - display: flex; - flex: 0 0 auto; - margin-left: auto; - align-items: center; -} -.d-header .header-buttons { - display: flex; - align-items: center; - margin-top: 0.2em; -} - -.d-header .header-buttons a { - padding: 6px 10px; - color: #fff; - font-size: 1.1487em; -} - -.d-header .header-buttons a { - opacity: 0.5; - transition: opacity .25s; - text-decoration: none; -} -.d-header .header-buttons a:hover { - opacity: 0.75; -} -.d-header .header-buttons a.active { - opacity: 1; -} diff --git a/resources/src/scss/highlight.min.scss b/resources/src/scss/highlight.min.scss deleted file mode 100644 index 2b8ac2cf..00000000 --- a/resources/src/scss/highlight.min.scss +++ /dev/null @@ -1 +0,0 @@ -.hljs{display:block;overflow-x:auto;padding:.5em;background:#F0F0F0}.hljs,.hljs-subst{color:#444}.hljs-comment{color:#888888}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta-keyword,.hljs-doctag,.hljs-name{font-weight:bold}.hljs-type,.hljs-string,.hljs-number,.hljs-selector-id,.hljs-selector-class,.hljs-quote,.hljs-template-tag,.hljs-deletion{color:#880000}.hljs-title,.hljs-section{color:#880000;font-weight:bold}.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr,.hljs-selector-pseudo{color:#BC6060}.hljs-literal{color:#78A960}.hljs-built_in,.hljs-bullet,.hljs-code,.hljs-addition{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold} \ No newline at end of file diff --git a/resources/src/scss/mobile.scss b/resources/src/scss/mobile.scss deleted file mode 100644 index fbea2d0c..00000000 --- a/resources/src/scss/mobile.scss +++ /dev/null @@ -1,29 +0,0 @@ -@media (max-width:840px) { - #mobile-menu { - flex-direction: column; - position: fixed; - align-items: center; - justify-content: center; - top: 4em; - right: 0; - margin: 0; - background: $osc-color; - border-bottom-left-radius: 3px; - box-shadow: 0 2px 4px -1px rgba(0,0,0,0.25); - - > * { - flex:1; - padding: 8px; - display: block; - width: 100%; - text-align: center; - } - input { - text-align: center; - margin: 0; - } - &.show { - display: flex!important; - } - } -} diff --git a/resources/src/scss/styles.scss b/resources/src/scss/styles.scss deleted file mode 100644 index 608e1142..00000000 --- a/resources/src/scss/styles.scss +++ /dev/null @@ -1,296 +0,0 @@ -$osc-color: #3c4c68; - -$primary-color: rgb(75, 143, 210); -$font-size: 0.6rem; -@import "node_modules/spectre.css/src/spectre"; -@import "node_modules/spectre.css/src/icons"; - -@import "admonition"; -@import "codehilite"; -@import "discourse"; -@import "highlight.min.scss"; - - -body { - color: #333; - font-family: Roboto,Helvetica,Arial,sans-serif; - font-weight: normal; - background-color: #fff; - overflow-y: scroll; - direction: ltr; -} -h1,h2,h3,h4,h5 { - font-weight: 100; -} -h2 { - // font-weight: 400; -} -h4 { - font-size: .8rem; - font-weight: 800; -} -h1 + h2 { - // position: relative; - margin-top: 2rem; -} - -pre, code { - font-size: 0.7rem; - font-family: $mono-font-family; -} - -hr { - border: 0; - border-top: 2px solid rgba(black, 0.15); -} - -.dynamic-prop-icon { - width:12px; - height:12px; - background-image: url(img/icon-bolt.svg); - background-size: cover; - display: inline-block; - margin-left: 4px; -} - -#jumbotron { - text-align: center; - position: relative; - padding: 10em 0 8em; - ul { - list-style: none; - margin: 0; - li { - display:inline-block; - margin: 0 2px; - } - } -} -#jumbotron-showcase { - margin: -4em auto 1em; - box-shadow: 0 4px 8px 0 rgba(0,0,0,0.5); - z-index: 1; - border-radius: 3px; - overflow: hidden; - position: relative; - - #jumbotron-img { - display: block; - z-index: 2; - position: relative; - width: 100%; - } - -} - -#jumbotron + #main { - padding-top: 2em; - padding-bottom: 0; -} - -#logo { - flex-shrink: 0; -} - -#main { - padding-top: 6.5em; - padding-bottom: 4em; - display: flex; -} - -.nav .nav li { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} - -.col-left { - width:240px; - flex-shrink: 0; -} -.col-left > ul { - top: 6.5em; - width: 230px; - position: fixed; - overflow-y: auto; - bottom: 0; - padding-left: 2px; - margin: 0; -} -.col-left > ul ul { - line-height: 1 - li { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } -} -.col-right { - flex: 1; - min-width: 0; -} - -.codehilite { - background-color: #fafafa; - color: #37474f; - line-height: 1em; - overflow-x: auto; - border-radius: 3px; - margin-bottom: 1.2rem; - padding: 12px; -} - -.codehilite pre { - white-space: pre; - font-feature-settings: "kern"; - font-family: $mono-font-family; - /* font-family: "Roboto Mono","Courier New",Courier,monospace; */ - direction: ltr; - line-height: 1.1; -} - -table { - border: 1px solid #eee; - border-collapse: collapse; - border-spacing: 0; - font-size: 100%; - font: inherit; - margin: 0 0 1.2rem; -} - -table tr:nth-child(2n +1) { - background-color: #f8f8f8; -} - -table td { - padding: 10px; -} -table h4 { - margin: 0; - font-size: 14px; - font-weight: normal; -} - -table th { - font-weight: bold; - background-color: #888; - color: #fff; - vertical-align: top; - text-align: left; - padding: 10px; -} - -code, tt { - padding: 0 5px; - white-space: nowrap; - border: 1px solid #eaeaea; - border-radius: 3px; - background-color: #f8f8f8; - color: #333333; - font-family: $mono-font-family; - } - - -code { - background-color: #fafafa; - padding: 2px!important; -} - -h1,h2,h3 { - code { - vertical-align: middle; - font-size: 70%; - } -} -h4,h5 { - code { - vertical-align: middle; - font-size: inherit; - } -} - - -table code { - white-space: nowrap; -} - -img { - max-width: 100%; -} - -table .thead2 { - background: #ddd!important; - color: #666; - white-space: nowrap; -} - - -.headerlink { - opacity: 0; - position: relative; - margin-left: 4px; -} -:hover > .headerlink { - opacity: 0.5; -} - - -h1:first-child { - margin-top:0; -} - -#mkdocs-search-query { - /* border: 1px solid rgba(255,255,255,.1); */ - border:0; - box-shadow: 0 -2px 10px 0 rgba(0,0,0,0.1) inset; - background:rgba(0,0,0,0.15); - border-radius: 15px; - color: #eee; - outline: none; - padding:3px 12px; - margin-right: 10px; - transition: background-color .25s, color .25s; - &:focus { - background: white; - color:#333; - } -} - -.sp-logo { - display:inline-block; - margin-top:20px; -} - - -.accordion { - background: rgba(black, 0.05); - padding: 8px; - margin-bottom: 1rem; -} -.accordion h4 { - cursor: pointer; -} - -.accordion table { - display: none; -} -.accordion.show table { - display: table; -} -.accordionlink > .headerlink { - opacity: 1!important; - color: $primary-color!important; - text-decoration: none; - display: block; - outline: none; - box-shadow: none; - margin-left: 0; -} -.accordion-description { - opacity: 0.8; -} -.accordion.show .accordion-description { - margin-bottom: 8px; -} - -@import 'mobile'; diff --git a/resources/theme/main.html b/resources/theme/main.html index 904cb547..301e20bc 100644 --- a/resources/theme/main.html +++ b/resources/theme/main.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% block fonts %} + {% endblock %} diff --git a/scripts/build-widgets-reference.js b/scripts/build-widgets-reference.js index e1b45bed..46fec69f 100644 --- a/scripts/build-widgets-reference.js +++ b/scripts/build-widgets-reference.js @@ -135,3 +135,5 @@ doc.push(`\n\n `) console.log(doc.join('').replace(/^ +/gm,'')) + +process.exit(0) // avoid setTimeout errors in required modules diff --git a/src/client/ui/ui-colorpicker.js b/src/client/ui/ui-colorpicker.js index eaf0638d..a21a7b79 100644 --- a/src/client/ui/ui-colorpicker.js +++ b/src/client/ui/ui-colorpicker.js @@ -33,6 +33,7 @@ class ColorPicker extends UiWidget { closable: true, title: '', hide: true, + html: true, content: html`
${this.rgb.container} diff --git a/src/scss/index.scss b/src/scss/index.scss index 94370b9f..20879b32 100644 --- a/src/scss/index.scss +++ b/src/scss/index.scss @@ -1,11 +1,10 @@ @import 'reset'; - @import 'mixins'; - +@import 'themes/default'; @import 'ui'; - @import 'widgets'; + input, textarea, { @@ -53,7 +52,7 @@ body { white-space:nowrap; opacity:1; cursor: default; - font-family: 'Roboto', sans-serif; + font-family: $font, sans-serif; font-size:11rem; line-height:100%; font-weight: 500; @@ -62,29 +61,6 @@ body { } - - - - - - - - - - - - - - - - - - - - - - - .error-stack { > span { background: none!important; @@ -99,7 +75,7 @@ body { } overflow:auto; white-space:pre; - font-family: monospace; + font-family: $font-mono; font-weight:bold; } @@ -114,5 +90,3 @@ body { background-size: contain; background-repeat: no-repeat; } - -@import 'themes/default'; diff --git a/src/scss/themes/default.scss b/src/scss/themes/default.scss index e4968f38..0109ecb2 100644 --- a/src/scss/themes/default.scss +++ b/src/scss/themes/default.scss @@ -1,3 +1,6 @@ +$font: 'Roboto'; +$font-mono: 'Roboto Mono'; + $base: rgb(25, 31, 42)!default; $accent: rgb(82, 168, 255)!default; diff --git a/src/scss/ui/inspector.scss b/src/scss/ui/inspector.scss index ba95fd52..83966b31 100644 --- a/src/scss/ui/inspector.scss +++ b/src/scss/ui/inspector.scss @@ -25,10 +25,10 @@ osc-inspector-field { } textarea, input { - font-family: mono; + font-family: $font-mono; line-height: $field-height - 8rem; - padding: 5rem 6rem 3rem; + padding: 4rem 6rem; flex: 1; overflow-x: auto; overflow-y: hidden; @@ -164,7 +164,7 @@ osc-inspector-checkbox { osc-inspector-select { position: relative; - font-family: mono; + font-family: $font-mono; line-height: inherit; padding: 0; overflow: hidden; @@ -216,7 +216,7 @@ osc-inspector-color { box-shadow: 0; outline: 0; position: relative; - font-family: mono; + font-family: $font-mono; line-height: inherit; overflow: hidden; height: $field-height; diff --git a/src/scss/widgets.old.scss b/src/scss/widgets.old.scss deleted file mode 100644 index 14177e44..00000000 --- a/src/scss/widgets.old.scss +++ /dev/null @@ -1,107 +0,0 @@ - -.widget { - height:auto; - overflow: hidden; - position:relative; - vertical-align:top; - box-shadow: 1rem 0 0 0 var(--color-border), - 0 1rem 0 0 var(--color-border), - 1rem 1rem 0 0 var(--color-border), - 0 0 0 1rem var(--color-light) inset; - border-left:1rem solid var(--color-border); - border-top:1rem solid var(--color-border); - -webkit-tap-highlight-color:transparent; - display: inline-flex; - flex-direction: column; - --default-bg: var(--color-fg); - background: var(--default-bg); - max-width: 100%; - max-height: 100%; - text-transform: uppercase; - contain: style size layout; - color: var(--color-text); - --color-glass-1: var(--color-custom); - --color-glass-2: var(--color-track); - - &.absolute-position { - position: absolute; - z-index: 10; - } - - &.no-label { - > .label { - display:none; - } - } - - > .label ~ div { - border-top-left-radius:0; - border-top-right-radius:0; - border-bottom-right-radius:inherit; - border-bottom-left-radius:inherit; - min-height: 0; - } - &.no-label > .label ~ div { - border-radius: inherit; - } - - .label { - text-overflow:ellipsis; - overflow:hidden; - text-align:center; - height:30rem; - max-height:30rem; - padding:0 6rem; - width: 100%; - flex-shrink: 0; - display: flex; - justify-content: center; - white-space: pre; - // justify-content: space-around; - align-items: center; - &.accent { - color:var(--color-accent); - } - } -} - -.glass-effect { - position: relative; - &:after { - content:""; - position: absolute; - pointer-events: none; - top:0; - left:0; - right:0; - bottom:0; - background: radial-gradient(ellipse farthest-side at center top, var(--color-glass-1), var(--color-glass-2)); - background-size: 150% 150%; - background-repeat: no-repeat; - background-position: center top; - opacity: var(--glass-opacity); - z-index: 3; - } -} - - -@import 'widgets/fader'; -@import 'widgets/knob'; - -@import 'widgets/matrices'; -@import 'widgets/patchbay'; -@import 'widgets/pads'; - -@import 'widgets/plots'; - - -@import 'widgets/toggle'; -@import 'widgets/push'; -@import 'widgets/switch'; -@import 'widgets/menu'; - -@import 'widgets/panel'; - -@import 'widgets/inputs'; - -@import 'widgets/maths';