-
-
+
+
diff --git a/.github/workflows/autoformat.yml b/.github/workflows/autoformat.yml new file mode 100644 index 0000000..1d33393 --- /dev/null +++ b/.github/workflows/autoformat.yml @@ -0,0 +1,19 @@ +name: Prettier Autoformatting +on: + pull_request: + push: + branches: + - main +jobs: + prettier: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + - name: Prettify + uses: creyD/prettier_action@v4.2 + with: + prettier_options: --write **/*.{js,html,css,md} diff --git a/css/colors.css b/css/colors.css new file mode 100644 index 0000000..1dba78a --- /dev/null +++ b/css/colors.css @@ -0,0 +1,8 @@ +:root { + --c-primary: #2c3333; + --c-hover: hsl(180, 7%, 30%); + --c-active: hsl(180, 7%, 25%); + --c-secondary: #395b64; + --c-accent: #a5c9ca; + --c-text: #e7f6f2; +} diff --git a/css/index.css b/css/index.css index b0485fe..d32ed36 100644 --- a/css/index.css +++ b/css/index.css @@ -14,44 +14,6 @@ body { background-color: #ccc; } -#historyContainer > .info { - padding: 0; -} - -#history.history { - height: 200px; - overflow: scroll; -} - -#history.history > .history-item { - cursor: pointer; - - padding: 5px; - padding-top: 2px; - padding-bottom: 2px; -} - -#history.history > .history-item { - background-color: #0000; -} -#history.history > .history-item:hover { - background-color: #fff5; -} - -#history.history > .history-item.current { - background-color: #66f5; -} -#history.history > .history-item.current:hover { - background-color: #66f5; -} - -#history.history > .history-item.future { - background-color: #4445; -} -#history.history > .history-item.future:hover { - background-color: #ddd5; -} - .mainHSplit { display: grid; grid-template-columns: 1fr; @@ -68,40 +30,6 @@ body { grid-row-gap: 5px; } -.uiContainer { - position: fixed; - width: 250px; - height: auto; - z-index: 999; -} - -.uiTitleBar { - z-index: 999; - cursor: move; - background-color: rgba(104, 104, 104, 0.75); - z-index: 999; - - user-select: none; - - padding-left: 5px; - padding-right: 5px; - padding-top: 5px; - padding-bottom: 5px; - margin-bottom: auto; - font-size: 1.5em; - color: black; - text-align: center; - border-top-left-radius: 10px; - border-top-right-radius: 10px; - border: solid; - border-bottom: none; - border-color: black; -} - -.draggable { - cursor: move; -} - .toolbar { display: flex; justify-content: space-between; @@ -158,7 +86,7 @@ button.tool:hover { transition: max-height 0.2s ease-out; } -.info { +.menu-container { background-color: rgba(255, 255, 255, 0.5); padding-left: 10px; padding-right: 10px; diff --git a/css/ui/generic.css b/css/ui/generic.css new file mode 100644 index 0000000..b8c4556 --- /dev/null +++ b/css/ui/generic.css @@ -0,0 +1,32 @@ +/* UI Floating Windows */ +.floating-window { + position: fixed; + width: 250px; + height: auto; + z-index: 999; +} + +.floating-window-title { + cursor: move; + background-color: rgba(104, 104, 104, 0.75); + + user-select: none; + + padding-left: 5px; + padding-right: 5px; + padding-top: 5px; + padding-bottom: 5px; + margin-bottom: auto; + font-size: 1.5em; + color: black; + text-align: center; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + border: solid; + border-bottom: none; + border-color: black; +} + +.draggable { + cursor: move; +} diff --git a/css/ui/history.css b/css/ui/history.css new file mode 100644 index 0000000..0c1834f --- /dev/null +++ b/css/ui/history.css @@ -0,0 +1,38 @@ +#historyContainer > .info { + padding: 0; +} + +#history.history { + height: 200px; + overflow-y: scroll; + overflow-x: hidden; +} + +#history.history > .history-item { + cursor: pointer; + + padding: 5px; + padding-top: 2px; + padding-bottom: 2px; +} + +#history.history > .history-item { + background-color: #0000; +} +#history.history > .history-item:hover { + background-color: #fff5; +} + +#history.history > .history-item.current { + background-color: #66f5; +} +#history.history > .history-item.current:hover { + background-color: #66f5; +} + +#history.history > .history-item.future { + background-color: #4445; +} +#history.history > .history-item.future:hover { + background-color: #ddd5; +} diff --git a/css/ui/toolbar.css b/css/ui/toolbar.css new file mode 100644 index 0000000..631a3ed --- /dev/null +++ b/css/ui/toolbar.css @@ -0,0 +1,62 @@ +#ui-toolbar { + align-content: center; + + width: 60px; + + border-radius: 5px; + + color: var(--c-text); + background-color: var(--c-primary); +} + +#ui-toolbar .handle { + display: flex; + align-items: center; + justify-content: center; + + height: 10px; +} + +#ui-toolbar .handle > .line { + width: 80%; + border-top: 2px #777 dotted; +} + +#ui-toolbar .tool .tool-icon { + filter: invert(60%); +} +#ui-toolbar .tool.using .tool-icon { + filter: invert(80%); +} +#ui-toolbar .tool:hover .tool-icon { + filter: invert(90%); +} + +/* The separator */ +#ui-toolbar .separator { + width: 80%; + margin: auto; + align-self: center; + border-top: 1px var(--c-hover) solid; +} + +/* Styles for the tool buttons */ +#ui-toolbar .tool { + display: flex; + align-items: center; + justify-content: center; + + aspect-ratio: 1; + margin: 5px; + border-radius: 5px; + + cursor: pointer; +} + +#ui-toolbar .tool.using { + background-color: var(--c-active); +} + +#ui-toolbar .tool:hover { + background-color: var(--c-hover); +} diff --git a/index.html b/index.html index 70cb933..40cd321 100644 --- a/index.html +++ b/index.html @@ -1,199 +1,341 @@ +
+ +