feat: more fonts, more styling
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
/node_modules
|
/node_modules
|
||||||
/public/static
|
/public/static/*.js
|
||||||
|
/public/static/*.js.map
|
||||||
.idea
|
.idea
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ html, body {
|
|||||||
body {
|
body {
|
||||||
color: #333;
|
color: #333;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
font-family: DMSans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@@ -67,3 +67,31 @@ button:focus {
|
|||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
background-color: rgba(0,0,0,0.25);
|
background-color: rgba(0,0,0,0.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'DMSans';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url(/static/DMSans-Regular.ttf) format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'DMSans';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
src: url(/static/DMSans-Bold.ttf) format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'DMSans';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url(/static/DMSans-Italic.ttf) format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'DMSans';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 600;
|
||||||
|
src: url(/static/DMSans-BoldItalic.ttf) format('woff2');
|
||||||
|
}
|
||||||
|
|||||||
BIN
public/static/DMSans-Bold.ttf
Normal file
BIN
public/static/DMSans-Bold.ttf
Normal file
Binary file not shown.
BIN
public/static/DMSans-BoldItalic.ttf
Normal file
BIN
public/static/DMSans-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
public/static/DMSans-Italic.ttf
Normal file
BIN
public/static/DMSans-Italic.ttf
Normal file
Binary file not shown.
BIN
public/static/DMSans-Medium.ttf
Normal file
BIN
public/static/DMSans-Medium.ttf
Normal file
Binary file not shown.
BIN
public/static/DMSans-MediumItalic.ttf
Normal file
BIN
public/static/DMSans-MediumItalic.ttf
Normal file
Binary file not shown.
BIN
public/static/DMSans-Regular.ttf
Normal file
BIN
public/static/DMSans-Regular.ttf
Normal file
Binary file not shown.
@@ -1,11 +1,3 @@
|
|||||||
.beat:first-child {
|
|
||||||
padding-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.beat:last-child {
|
|
||||||
padding-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.beat > * {
|
.beat > * {
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
width: 2em;
|
width: 2em;
|
||||||
height: 2em;
|
height: 2em;
|
||||||
margin-right: 0.2em;
|
margin-right: 0.2em;
|
||||||
background-color: white;
|
background-color: var(--color-ui-neutral-dark);
|
||||||
border-width: 0.1em 0.1em 0.1em 0.1em;
|
border-width: 0.1em 0.1em 0.1em 0.1em;
|
||||||
border-color: black;
|
border-color: var(--color-ui-neutral-dark);
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
transition: background-color 150ms;
|
transition: background-color 150ms;
|
||||||
@@ -12,7 +12,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.beat-unit:hover {
|
.beat-unit:hover {
|
||||||
background-color: #f1c3b6;
|
border-color: var(--color-ui-neutral-dark-hover);
|
||||||
|
background-color: var(--color-ui-neutral-dark-hover);
|
||||||
transition: none;
|
transition: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,7 +22,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.beat-unit.beat-unit-on {
|
.beat-unit.beat-unit-on {
|
||||||
background-color: darksalmon;
|
background-color: var(--color-ui-accent-light);
|
||||||
|
border-color: var(--color-ui-neutral-light);
|
||||||
transition: none;
|
transition: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import UINode, {UINodeOptions} from "../UINode";
|
import UINode, {UINodeOptions} from "../UINode";
|
||||||
import BeatGroup from "../../BeatGroup";
|
import BeatGroup from "../../BeatGroup";
|
||||||
import BeatGroupSettingsView from "../BeatGroupSettings/BeatGroupSettingsView";
|
|
||||||
import BeatView from "./Beat/BeatView";
|
import BeatView from "./Beat/BeatView";
|
||||||
|
|
||||||
export type BeatGroupUINodeOptions = UINodeOptions & {
|
export type BeatGroupUINodeOptions = UINodeOptions & {
|
||||||
@@ -11,7 +10,6 @@ export type BeatGroupUINodeOptions = UINodeOptions & {
|
|||||||
export default class BeatGroupView extends UINode {
|
export default class BeatGroupView extends UINode {
|
||||||
private title: string;
|
private title: string;
|
||||||
private beatGroup: BeatGroup;
|
private beatGroup: BeatGroup;
|
||||||
private beatGroupSettingsView!: BeatGroupSettingsView;
|
|
||||||
private beatViews: BeatView[] = [];
|
private beatViews: BeatView[] = [];
|
||||||
|
|
||||||
constructor(options: BeatGroupUINodeOptions) {
|
constructor(options: BeatGroupUINodeOptions) {
|
||||||
@@ -25,12 +23,9 @@ export default class BeatGroupView extends UINode {
|
|||||||
for (let i = 0; i < this.beatGroup.getBeatCount(); i++) {
|
for (let i = 0; i < this.beatGroup.getBeatCount(); i++) {
|
||||||
this.beatViews.push(new BeatView({beat: this.beatGroup.getBeatByIndex(i)}));
|
this.beatViews.push(new BeatView({beat: this.beatGroup.getBeatByIndex(i)}));
|
||||||
}
|
}
|
||||||
this.beatGroupSettingsView = new BeatGroupSettingsView({beatGroup: this.beatGroup});
|
|
||||||
return UINode.make("div", {
|
return UINode.make("div", {
|
||||||
classes: ["beat-group"],
|
classes: ["beat-group"],
|
||||||
subs: [
|
subs: [
|
||||||
UINode.make("h3", {innerText: this.title}),
|
|
||||||
this.beatGroupSettingsView.render(),
|
|
||||||
...this.beatViews.map(bv => bv.render())
|
...this.beatViews.map(bv => bv.render())
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,13 +3,12 @@
|
|||||||
|
|
||||||
.beat-group-settings-options {
|
.beat-group-settings-options {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
display: inline-flex;
|
display: flex;
|
||||||
width: 40em;
|
flex-direction: column;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
}
|
}
|
||||||
|
|
||||||
.beat-group-settings-option {
|
.beat-group-settings-option {
|
||||||
display: inline-block;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,12 +76,14 @@ export default class BeatGroupSettingsView extends UINode implements ISubscriber
|
|||||||
classes: ["beat-group-settings-option-group"],
|
classes: ["beat-group-settings-option-group"],
|
||||||
subs: [
|
subs: [
|
||||||
UINode.make("div", {
|
UINode.make("div", {
|
||||||
|
classes: ["beat-group-settings-autobeat-option", "beat-group-settings-option"],
|
||||||
subs: [
|
subs: [
|
||||||
UINode.make("label", { innerText: "Auto beat length:"}),
|
UINode.make("label", { innerText: "Auto beat length:"}),
|
||||||
this.autoBeatLengthCheckbox,
|
this.autoBeatLengthCheckbox,
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
UINode.make("div", {
|
UINode.make("div", {
|
||||||
|
classes: ["beat-group-settings-autobeat-option", "beat-group-settings-option"],
|
||||||
subs: [
|
subs: [
|
||||||
UINode.make("label", { innerText: "Force full bars:"}),
|
UINode.make("label", { innerText: "Force full bars:"}),
|
||||||
this.forceFullBarsCheckbox,
|
this.forceFullBarsCheckbox,
|
||||||
@@ -92,7 +94,6 @@ export default class BeatGroupSettingsView extends UINode implements ISubscriber
|
|||||||
this.node = UINode.make("div", {
|
this.node = UINode.make("div", {
|
||||||
classes: ["beat-group-settings"],
|
classes: ["beat-group-settings"],
|
||||||
subs: [
|
subs: [
|
||||||
UINode.make("div", { innerText: "Settings for beat" }),
|
|
||||||
UINode.make("div", {
|
UINode.make("div", {
|
||||||
classes: ["beat-group-settings-options"],
|
classes: ["beat-group-settings-options"],
|
||||||
subs: [
|
subs: [
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
.loop-settings-option-group {
|
.loop-settings {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loop-settings-option-group {
|
||||||
|
}
|
||||||
|
|
||||||
.loop-settings-option > label {
|
.loop-settings-option > label {
|
||||||
width: 5em;
|
width: 5em;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@@ -9,9 +12,11 @@
|
|||||||
|
|
||||||
.loop-settings > p {
|
.loop-settings > p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loop-settings-option {
|
.loop-settings-option {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
@@ -12,22 +12,39 @@
|
|||||||
--color-title-dark: #282828;
|
--color-title-dark: #282828;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: var(--color-bg-dark);
|
|
||||||
color: var(--color-p-light);
|
|
||||||
}
|
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
background-color: var(--color-bg-light);
|
color: var(--color-p-light);
|
||||||
margin-left: 10em;
|
background-color: var(--color-bg-dark);
|
||||||
margin-right: 10em;
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
align-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root-title {
|
.root-settings {
|
||||||
|
background-color: var(--color-bg-light);
|
||||||
|
height: 100%;
|
||||||
|
width: 30em;
|
||||||
|
padding: 3em;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.root-settings .root-title {
|
||||||
color: var(--color-title-light);
|
color: var(--color-title-light);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.root-beat-stage-container {
|
||||||
|
flex: 1;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.root-beat-stage {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
input[type="checkbox"] {
|
input[type="checkbox"] {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 2em;
|
width: 2em;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import UINode, {UINodeOptions} from "../UINode";
|
|||||||
import BeatGroupView from "../BeatGroup/BeatGroupView";
|
import BeatGroupView from "../BeatGroup/BeatGroupView";
|
||||||
import BeatGroup from "../../BeatGroup";
|
import BeatGroup from "../../BeatGroup";
|
||||||
import "./Root.css";
|
import "./Root.css";
|
||||||
|
import BeatGroupSettingsView from "../BeatGroupSettings/BeatGroupSettingsView";
|
||||||
|
|
||||||
export type RootUINodeOptions = UINodeOptions & {
|
export type RootUINodeOptions = UINodeOptions & {
|
||||||
title: string,
|
title: string,
|
||||||
@@ -12,20 +13,39 @@ export default class RootView extends UINode {
|
|||||||
private title: string;
|
private title: string;
|
||||||
private beatGroupView: BeatGroupView;
|
private beatGroupView: BeatGroupView;
|
||||||
private mainBeatGroup: BeatGroup;
|
private mainBeatGroup: BeatGroup;
|
||||||
|
private beatGroupSettingsView!: BeatGroupSettingsView;
|
||||||
|
|
||||||
|
|
||||||
constructor(options: RootUINodeOptions) {
|
constructor(options: RootUINodeOptions) {
|
||||||
super(options);
|
super(options);
|
||||||
this.beatGroupView = new BeatGroupView({title: "THE BEAT", beatGroup: options.mainBeatGroup});
|
|
||||||
this.mainBeatGroup = options.mainBeatGroup;
|
this.mainBeatGroup = options.mainBeatGroup;
|
||||||
|
this.beatGroupView = new BeatGroupView({title: "THE BEAT", beatGroup: this.mainBeatGroup});
|
||||||
this.title = options.title;
|
this.title = options.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
rebuild(): HTMLDivElement {
|
rebuild(): HTMLDivElement {
|
||||||
|
this.beatGroupSettingsView = new BeatGroupSettingsView({beatGroup: this.mainBeatGroup});
|
||||||
return UINode.make("div", {
|
return UINode.make("div", {
|
||||||
classes: ["root"],
|
classes: ["root"],
|
||||||
subs: [
|
subs: [
|
||||||
UINode.make("h1", {innerText: this.title, classes: ["root-title"]}),
|
UINode.make("div", {
|
||||||
this.beatGroupView.render(),
|
classes: ["root-settings"],
|
||||||
|
subs: [
|
||||||
|
UINode.make("h1", {innerText: this.title, classes: ["root-title"]}),
|
||||||
|
this.beatGroupSettingsView.render(),
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
UINode.make("div", {
|
||||||
|
classes: ["root-beat-stage-container"],
|
||||||
|
subs: [
|
||||||
|
UINode.make("div", {
|
||||||
|
classes: ["root-beat-stage"],
|
||||||
|
subs: [
|
||||||
|
this.beatGroupView.render(),
|
||||||
|
],
|
||||||
|
})
|
||||||
|
]
|
||||||
|
})
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
.number-input {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
input[type="number"].number-input-input {
|
input[type="number"].number-input-input {
|
||||||
-webkit-appearance: textfield;
|
-webkit-appearance: textfield;
|
||||||
-moz-appearance: textfield;
|
-moz-appearance: textfield;
|
||||||
|
|||||||
Reference in New Issue
Block a user