Skip to content

Commit

Permalink
lmaooo
Browse files Browse the repository at this point in the history
  • Loading branch information
choptop84 committed Jan 4, 2024
1 parent cdad267 commit e54f0ef
Show file tree
Hide file tree
Showing 4 changed files with 194 additions and 2 deletions.
85 changes: 85 additions & 0 deletions editor/Layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,91 @@ export class Layout {
}
}
`,
"long (AB)": `\
/* focus layout */
@media (min-width: 711px) {
#beepboxEditorContainer {
max-width: initial;
height: 100vh;
}
.beepboxEditor {
width: 100%;
height: 100vh;
grid-template-columns: minmax(0, 1fr) 390px; /* minmax(0, 1fr) min-content; Chrome 80 grid layout regression. https://bugs.chromium.org/p/chromium/issues/detail?id=1050307 */
grid-template-rows: minmax(481px, 1fr) minmax(0, min-content);
grid-template-areas: "pattern-area settings-area" "track-area";
}
.beepboxEditor .pattern-area {
width: 100%;
height: 100%;
}
.beepboxEditor .trackAndMuteContainer {
width: 100%;
min-height: 0;
flex: 1;
overflow: auto;
max-height: 97.5vh;
}
.beepboxEditor .instrument-settings-area {
overflow-y: auto;
position: relative;
}
.beepboxEditor .instrument-settings-area > .editor-controls {
position: absolute;
width: 100%;
}
.beepboxEditor .song-settings-area {
overflow-y: auto;
}
.beepboxEditor .settings-area {
width: 30em;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
grid-template-rows: auto auto auto minmax(0, 1fr);
grid-template-areas:
"instrument-settings-area version-area"
"instrument-settings-area play-pause-area"
"instrument-settings-area menu-area"
"instrument-settings-area song-settings-area";
}
.beepboxEditor .barScrollBar {
display: none;
}
.beepboxEditor.selectRow {
height: 2em;
}
.beepboxEditor .operatorRow {
heiht: 2em;
}
.beepboxEditor .trackAndMuteContainer {
max-height: 446px;
}
.beepboxEditor .trackContainer {
overflow: visible;
}
.beepboxEditor .trackAndMuteContainer {
scrollbar-width: auto;
scrollbar-color: ${ColorConfig.uiWidgetBackground} ${ColorConfig.editorBackground};
}
.beepboxEditor .trackAndMuteContainer::-webkit-scrollbar {
width: 20px;
height: 20px;
}
.beepboxEditor .trackAndMuteContainer::-webkit-scrollbar-track {
background: ${ColorConfig.editorBackground};
}
.beepboxEditor .trackAndMuteContainer::-webkit-scrollbar-thumb {
background-color: ${ColorConfig.uiWidgetBackground};
border: 3px solid ${ColorConfig.editorBackground};
}
.beepboxEditor .trackAndMuteContainer::-webkit-scrollbar-corner {
background-color: ${ColorConfig.editorBackground};
}
}
`,
"focus": `\
/* focus layout */
Expand Down
14 changes: 14 additions & 0 deletions editor/LayoutPrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ export class LayoutPrompt implements Prompt {
`),
div("Focus (AB)"),
),

label({class: "layout-option"},
input({type: "radio", name: "layout", value: "long (AB)"}),
SVG(`\
<svg viewBox="-1 -1 28 22">
<rect x="0" y="0" width="26" height="20" fill="none" stroke="currentColor" stroke-width="1"/>
<rect x="2" y="2" width="12" height="10" fill="currentColor"/>
<rect x="15" y="2" width="4" height="18" fill="currentColor"/>
<rect x="20" y="2" width="4" height="18" fill="currentColor"/>
<rect x="2" y="13" width="12" height="5" fill="currentColor"/>
</svg>
`),
div("Long (AB)"),
),
);

public readonly container: HTMLDivElement = div({class: "prompt noSelection", style: "width: 300px;"},
Expand Down
95 changes: 94 additions & 1 deletion website/beepbox_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -29700,6 +29700,91 @@ You should be redirected to the song at:<br /><br />
max-height: 446px;
}

.beepboxEditor .trackContainer {
overflow: visible;
}
.beepboxEditor .trackAndMuteContainer {
scrollbar-width: auto;
scrollbar-color: ${ColorConfig.uiWidgetBackground} ${ColorConfig.editorBackground};
}
.beepboxEditor .trackAndMuteContainer::-webkit-scrollbar {
width: 20px;
height: 20px;
}
.beepboxEditor .trackAndMuteContainer::-webkit-scrollbar-track {
background: ${ColorConfig.editorBackground};
}
.beepboxEditor .trackAndMuteContainer::-webkit-scrollbar-thumb {
background-color: ${ColorConfig.uiWidgetBackground};
border: 3px solid ${ColorConfig.editorBackground};
}
.beepboxEditor .trackAndMuteContainer::-webkit-scrollbar-corner {
background-color: ${ColorConfig.editorBackground};
}
}
`,
"long (AB)": `\

/* focus layout */
@media (min-width: 711px) {
#beepboxEditorContainer {
max-width: initial;
height: 100vh;
}
.beepboxEditor {
width: 100%;
height: 100vh;
grid-template-columns: minmax(0, 1fr) 390px; /* minmax(0, 1fr) min-content; Chrome 80 grid layout regression. https://bugs.chromium.org/p/chromium/issues/detail?id=1050307 */
grid-template-rows: minmax(481px, 1fr) minmax(0, min-content);
grid-template-areas: "pattern-area settings-area" "track-area";
}
.beepboxEditor .pattern-area {
width: 100%;
height: 100%;
}
.beepboxEditor .trackAndMuteContainer {
width: 100%;
min-height: 0;
flex: 1;
overflow: auto;
max-height: 97.5vh;
}
.beepboxEditor .instrument-settings-area {
overflow-y: auto;
position: relative;
}
.beepboxEditor .instrument-settings-area > .editor-controls {
position: absolute;
width: 100%;
}

.beepboxEditor .song-settings-area {
overflow-y: auto;
}

.beepboxEditor .settings-area {
width: 30em;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
grid-template-rows: auto auto auto minmax(0, 1fr);
grid-template-areas:
"instrument-settings-area version-area"
"instrument-settings-area play-pause-area"
"instrument-settings-area menu-area"
"instrument-settings-area song-settings-area";
}
.beepboxEditor .barScrollBar {
display: none;
}
.beepboxEditor.selectRow {
height: 2em;
}
.beepboxEditor .operatorRow {
heiht: 2em;
}
.beepboxEditor .trackAndMuteContainer {
max-height: 446px;
}

.beepboxEditor .trackContainer {
overflow: visible;
}
Expand Down Expand Up @@ -30957,7 +31042,15 @@ You should be redirected to the song at:<br /><br />
<rect x="20" y="2" width="4" height="16" fill="currentColor"/>
<rect x="2" y="13" width="19" height="5" fill="currentColor"/>
</svg>
`), div$d("Focus (AB)")));
`), div$d("Focus (AB)")), label$1({ class: "layout-option" }, input$a({ type: "radio", name: "layout", value: "long (AB)" }), SVG(`\
<svg viewBox="-1 -1 28 22">
<rect x="0" y="0" width="26" height="20" fill="none" stroke="currentColor" stroke-width="1"/>
<rect x="2" y="2" width="12" height="10" fill="currentColor"/>
<rect x="15" y="2" width="4" height="18" fill="currentColor"/>
<rect x="20" y="2" width="4" height="18" fill="currentColor"/>
<rect x="2" y="13" width="12" height="5" fill="currentColor"/>
</svg>
`), div$d("Long (AB)")));
this.container = div$d({ class: "prompt noSelection", style: "width: 300px;" }, h2$c("Layout"), this._form, div$d({ style: "display: flex; flex-direction: row-reverse; justify-content: space-between;" }, this._okayButton), this._cancelButton);
this._close = () => {
this._doc.undo();
Expand Down
2 changes: 1 addition & 1 deletion website/beepbox_editor.min.js

Large diffs are not rendered by default.

0 comments on commit e54f0ef

Please sign in to comment.