From 0e6e926caa068a647e080fc53aa080c0babb1dd2 Mon Sep 17 00:00:00 2001 From: Eugene Serb <46799701+eugene-serb@users.noreply.github.com> Date: Fri, 17 Jun 2022 18:10:41 +0300 Subject: [PATCH] Made program using single gamepad and like a mediaplayer look --- css/styles.css | 86 ++++++++++++++++++++++++++------------------------ index.html | 18 +++++------ js/scripts.js | 63 ++++++++++++++++++------------------ 3 files changed, 85 insertions(+), 82 deletions(-) diff --git a/css/styles.css b/css/styles.css index dfa32e7..b2b1d64 100644 --- a/css/styles.css +++ b/css/styles.css @@ -42,6 +42,7 @@ --color-table-item: transparent; --color-anotation: var(--color-coal); --color-pattern-button: var(--color-c); + --color-pattern-text: var(--color-white); } } @@ -61,6 +62,7 @@ --color-table-item: transparent; --color-anotation: var(--color-milk); --color-pattern-button: var(--color-milk); + --color-pattern-text: var(--color-black); } } @@ -377,15 +379,9 @@ legend { gap: 16px; } -.controls-box { - display: flex; - flex-direction: row; - justify-content: space-between; -} - .message { text-align: center; - font-size: 18px; + font-size: 24px; } .device-box { @@ -411,13 +407,6 @@ legend { display: flex; flex-direction: column; justify-content: space-between; - gap: 16px; - } - - @media only screen and (min-width: 540px) { - .list-item { - max-width: 50%; - } } .list-item_selected { @@ -430,17 +419,22 @@ legend { } .list-item__info { - padding: 16px; display: flex; flex-direction: column; gap: 16px; } .list-item__info > div { - display: grid; - grid-template-columns: repeat(3, 1fr); + display: flex; + flex-direction: row; + justify-content: space-between; } + .list-item_selected .list-item__info span, + .list-item_selected .list-item__info h4 { + color: var(--color-white); + } + .pattern-box { display: flex; flex-direction: column; @@ -480,20 +474,30 @@ legend { } .pattern-item__name { - font-size: 16px; + font-size: 18px; white-space: nowrap; overflow: hidden; + color: var(--color-pattern-text); } -.controls-box__item { +.controls-box { display: flex; - flex-direction: column; - text-align: center; + flex-direction: row; + justify-content: space-around; + flex-wrap: wrap; + gap: 32px; } -.controls-box__item > span { - font-size: 24px; -} + .controls-box__item { + display: flex; + flex-direction: column; + text-align: center; + gap: 8px; + } + + .controls-box__item > span { + font-size: 24px; + } .gamepad-button-container { display: flex; @@ -503,23 +507,23 @@ legend { gap: 8px; } -.gamepad-button { - width: 4ch; - height: 4ch; - border: 1px solid black; - border-radius: 100%; - display: flex; - justify-content: center; - align-items: center; - background: grey; - color: white; - text-align: center; -} + .gamepad-button { + width: 4ch; + height: 4ch; + border: 1px solid black; + border-radius: 100%; + display: flex; + justify-content: center; + align-items: center; + background: grey; + color: white; + text-align: center; + } - .gamepad-button > span { color: var(--color-white); } + .gamepad-button > span { color: var(--color-white); } - .gamepad-button_a { background: green; } - .gamepad-button_b { background: red; } - .gamepad-button_x { background: blue; } - .gamepad-button_y { background: orange; } + .gamepad-button_a { background: green; } + .gamepad-button_b { background: red; } + .gamepad-button_x { background: blue; } + .gamepad-button_y { background: orange; } diff --git a/index.html b/index.html index 698811a..cbda70e 100644 --- a/index.html +++ b/index.html @@ -99,12 +99,9 @@

Wavelovers

-
-
-
-
+