diff --git a/src/client/components/RoomSelector.jsx b/src/client/components/RoomSelector.jsx
index feb0c4c..17ea89b 100644
--- a/src/client/components/RoomSelector.jsx
+++ b/src/client/components/RoomSelector.jsx
@@ -39,14 +39,12 @@ const RoomSelector = ({socket, joinRoom}) => {
Public rooms
(click to join)
- {rooms.map(room =>
- {
+ {rooms.map((room, i) => {
joinRoom(room.id);
setCurrentRoomId(null);
}) : () => null}>
{`${room.players}/${room.maxPlayers} ${room.name}${room.id === currentRoomId ? ' ◄' : ''}${!room.isPublic ? ' (private)' : ''}`}
-
-
)}
+ )}
{!currentRoomId ?
diff --git a/src/client/style.scss b/src/client/style.scss
index 5d2077c..aa3f4c9 100644
--- a/src/client/style.scss
+++ b/src/client/style.scss
@@ -6,6 +6,7 @@ body {
color: white;
font-family: sans-serif;
text-shadow: 0 0 2px aqua, 0 0 2px aqua, 0 0 2px aqua;
+ user-select: none;
button {
font-size: 1.5rem;
@@ -20,6 +21,16 @@ body {
text-shadow: 0 0 6px aqua, 0 0 6px aqua;
box-shadow: 0 0 6px 1px aqua, inset 0 0 6px 1px aqua;
cursor: pointer;
+ outline: none;
+
+ &:hover {
+ background-color: #121315;
+ }
+
+ &:active {
+ text-shadow: 0 0 2px aqua, 0 0 2px aqua;
+ box-shadow: 0 0 2px 1px aqua, inset 0 0 2px 1px aqua;
+ }
}
}
@@ -59,12 +70,21 @@ body {
input {
color: white;
background-color: transparent;
+ transition: 0.25s;
+
+ &:hover {
+ background-color: #121315;
+ }
&:focus {
outline: none;
box-shadow: 0 0 6px 2px aqua, inset 0 0 6px 2px aqua;
}
+ &:active {
+ box-shadow: none;
+ }
+
&[type=checkbox] {
vertical-align: middle;
}
@@ -76,10 +96,6 @@ input {
text-shadow: 0 0 6px aqua, 0 0 6px aqua;
}
-input:placeholder-shown + button[type="submit"], button.disabled {
- opacity: 0.3;
-}
-
.room-list {
margin-top: 1rem;
display: flex;
@@ -87,6 +103,18 @@ input:placeholder-shown + button[type="submit"], button.disabled {
span {
cursor: pointer;
+ padding: 0.5rem;
+ border-radius: 0.5rem;
+ transition: 0.25s;
+
+ &:hover {
+ background-color: #121315;
+ }
+
+ &:active, &:focus {
+ outline: none;
+ box-shadow: 0 0 2px 1px aqua, inset 0 0 2px 1px aqua;
+ }
}
}