-
Kaeps
{
disabled={!username || !password ||password.indexOf(" ") !== -1|| username.indexOf(" ") !== -1}
width="75%"
onClick={() => doRegister()}
- style={{ color: "black"}}
>
register
diff --git a/src/styles/ui/BaseContainer.scss b/src/styles/ui/BaseContainer.scss
index f236b5b..b27c25f 100644
--- a/src/styles/ui/BaseContainer.scss
+++ b/src/styles/ui/BaseContainer.scss
@@ -7,4 +7,5 @@
padding-right: 15px;
max-width: $DESKTOP_WIDTH;
color: $textColor;
+ background-color: aqua;
}
\ No newline at end of file
diff --git a/src/styles/ui/Popup.scss b/src/styles/ui/Popup.scss
deleted file mode 100644
index 0732e27..0000000
--- a/src/styles/ui/Popup.scss
+++ /dev/null
@@ -1,32 +0,0 @@
-@import "../theme";
-
-.popup {
- background-color: $whiteYellow;
- outline: none;
- border: none;
- border-radius: 10px;
- box-shadow: 0 0 0 10px $classicYellow;
- min-height: auto;
-}
-.popup::-webkit-scrollbar {
- width: 10px;
- height: 10px;
- &-track {
- background: $whiteYellow;
- border-radius: 5px;
- }
-
- &-thumb {
- background: $greyBlue;
- -webkit-border-radius: 10px;
- border-radius: 10px;
- }
-}
-.popup-content {
- height: 100%;
- padding: 20px;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
-}
diff --git a/src/styles/views/Lobby.scss b/src/styles/views/Lobby.scss
index b3cf60d..92c1af2 100644
--- a/src/styles/views/Lobby.scss
+++ b/src/styles/views/Lobby.scss
@@ -17,22 +17,7 @@
align-items: center;
box-shadow: $dropShadow;
}
- &.room-list::-webkit-scrollbar{
- width: 10px;
- height: 10px;
-
- &-track{
- background: $whiteYellow;
- border-radius: 5px;
- }
-
- &-thumb{
- background: $greyBlue;
- -webkit-border-radius: 10px;
- border-radius: 10px;
- }
- }
- &.room-list-wrapper{
+ &.room-list{
position: absolute; // 使用绝对定位
right: 3%; // 定位到右边
top: 10%; // 从顶部留下10%的空间以居中显示
@@ -40,50 +25,11 @@
height: 80%; // 高度为视口高度的80%
display: flex;
flex-direction: column;
- background-color: $classicYellow;
+ background-color: #ffcc66;
padding: 10px;
border-radius: 1.5em;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
- overflow-y: hidden;
- }
- &.room-list{
- display: flex;
- flex-direction: column;
- flex-grow: 1;
overflow-y: auto;
- &.btn-container{
- all: initial; // avoid the inherited styles
- position: relative; // absolute pos relative to the parent
- background-color: transparent; // use Btn's color
- display: flex;
- flex-direction: row;
- align-items: flex-end;
- justify-content: center;
- height: auto;
- width: 100%;
- bottom: 3%;
- left: 0%;
- margin-top: 2%;
- flex-grow: 1;
- .create-room-btn{
- bottom: 0%;
- min-width: fit-content;
- width: 20%;
- min-height: 50px;
- display: flex;
- justify-items: center;
- align-items: center;
- justify-content: center;
- align-content: center;
- font-size: 1.3em;
- background-color: $darkBlue;
- color: white;
- // dont capitalize the text
- text-transform: none;
- // make the text bold
- font-weight: bolder;
- }
- }
}
&.user-list {
list-style: none;
@@ -102,13 +48,10 @@
.room-container{
display: flex;
margin-bottom: 20px;
- background: white;
- box-shadow: 0 0 0 4px $whiteYellow;
+ background: #fff6e5;
border-radius: 10px;
padding: 10px;
- margin-inline: 5%;
justify-content: space-between;
- flex-direction: row;
}
.room {
background-color: #fff;
@@ -116,7 +59,7 @@
border-radius: 8px;
//overflow: hidden;
- .room-header{
+ .room-header, .room-players {
flex: 1; // Allow both children to grow and take up equal space
display: flex;
flex-direction: column; // Stack the children of these containers vertically
@@ -127,19 +70,27 @@
.room-players {
align-items: flex-start; // Align the players to the start of the flex container
- flex: 1; // Allow both children to grow and take up equal space
- display: flex;
- flex-direction: row; // Stack the children of these containers vertically
- //align-items: center; // Center the items horizontally
- justify-content: center; // Center the items vertically
- padding: 10px;
}
.room-header {
align-items: flex-end; // Align the room details to the end of the flex container
}
+ .player {
+ margin-right: 10px;
+ text-align: center;
+ .player-avatar {
+ width: 40px;
+ height: 40px;
+ border-radius: 50%;
+ background-color: #D9D9D9; // 默认背景色
+ }
+
+ .player-username {
+ font-size: 0.8em;
+ }
+ }
.room-footer {
display: flex;
@@ -153,50 +104,6 @@
}
}
-.avatar-list {
- display: flex;
- flex-wrap: wrap; // 允许头像列表换行
- justify-content: flex-start; // 头像左对齐
- margin: 0 -10px; // 用于抵消每个头像的外边距,可以根据实际需求调整
-
- .player {
- width: 20%; // 四个头像一行,每个占总宽的25%
- padding-left: 10%; // 每个头像周围的间距,可以根据实际需求调整
- box-sizing: border-box; // 包括padding在内的宽度计算方式
-
- i {
- display: block; // 确保图标块状显示
- font-size: 3.8rem; // 图标大小
- cursor: pointer; // 鼠标悬停时显示指针
- margin: 10px 0; // 上下间距,可以根据需要调整
- }
- }
-}
-.player {
- margin-right: 10px;
- margin-left: 10px;
- text-align: center;
-
- .player-avatar {
- width: 40px;
- height: 40px;
- border-radius: 50%;
- background-color: #D9D9D9; // 默认背景色
- }
-
- .player-username {
- font-size: 0.8em;
- }
-}
-.room-players {
- align-items: flex-end; // Align the players to the start of the flex container
- flex: 1; // Allow both children to grow and take up equal space
- display: flex;
- flex-direction: row; // Stack the children of these containers vertically
- //align-items: center; // Center the items horizontally
- justify-content: left; // Center the items vertically
- padding: 10px;
-}
.status-container {
width: 18%; /* 或者任何固定宽度 */
display: inline-block; /* 或者 block,取决于你的布局需求 */
@@ -265,7 +172,7 @@
left: 15%; // 定位到zuo边
top: 25%; // 从顶部留下10%的空间以居中显示
font-size: 250px;
- color: $classicYellow;
+ color: #ffcc66;
font-family: "Acme", sans-serif;
}
@@ -278,137 +185,6 @@
text-align: center;
color: white;
font-family: "Acme", sans-serif;
- background: $classicYellow;
+ background: #ffcc66;
border-radius: $borderRadius;
-}
-
-.profile-popup{
- height:50%;
- &.content{
- display: flex;
- flex-direction: column;
- flex-grow: 1;
- font-size: 2em;
- .title{
- font-size: 1.5em;
- margin-bottom: 20px;
- display: inline;
- text-align: center;
- }
- .avatar-container {
- display: flex;
- justify-content: center; /* 水平居中 */
- margin-bottom: 3rem;
- }
- }
-
- &.header-cnt{
- display: flex;
- flex-direction: row;
- flex-grow: 1;
- font-size: 2em;
- .title{
- font-size: 1.5em;
- margin-bottom: 20px;
- display: inline;
- text-align: center;
- }
- }
- &.btn-container{
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: flex-end;
- margin-top: 10%;
- Button{
- height: auto;
- font-size: 1em;
- padding: 0.6em;
- margin: 0 10px;
- color: white;
- background-color: $classicYellow;
- }
- }
- &.label {
- display: flex;
- font-size: 32px;
- }
- &.field {
- display: flex;
- flex-direction: row;
- justify-content: center;
- }
- &.input {
- height: 35px;
- padding-left: 15px;
- margin-left: 4px;
- border: none;
- border-radius: 0.75em;
- margin-top: 5px;
- background: #FFF3CF;
- color: $textColor;
- }
-
-}
-.room-creation-popup{
- height: 50%;
- &.content{
- display: flex;
- flex-direction: column;
- flex-grow: 1;
- font-size: 2em;
- .title{
- font-size: 1.5em;
- margin-bottom: 20px;
- display: inline;
- text-align: center;
- }
- input {
- height: 100px;
- width: 800px;
- padding-left: 1px;
- margin-left: 4px;
- border: 1px solid black;
- border-radius: 0.75em;
- margin-bottom: 20px;
- background: transparentize(white, 0.4);
- color: $textColor;
- }
- }
- .theme-dropdown{
- position: relative;
- display: flex;
- align-items: center;
- justify-items: center;
- width: 800px;
- height: 100px;
- margin-bottom: 20px;
- select{
- appearance: none;
- -webkit-appearance: none;
- -moz-appearance: none;
- background-color: $classicYellow;
- text-align: center;
- border-radius: 0.75em;
- option{
- background-color: $classicYellow; //TODO: firefox not supporting this
- outline: none;
- text-align: center;
- }
- }
- }
- &.btn-container{
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: flex-end;
- Button{
- height: auto;
- font-size: 1em;
- padding: 0.6em;
- margin: 0 10px;
- color: white;
- background-color: $classicYellow;
- }
- }
-}
+}
\ No newline at end of file
diff --git a/src/styles/views/Login.scss b/src/styles/views/Login.scss
index 4dca06f..933be87 100644
--- a/src/styles/views/Login.scss
+++ b/src/styles/views/Login.scss
@@ -20,7 +20,7 @@
padding-top: 30px;
padding-left: 37px;
padding-right: 37px;
- background-color: #C9D7DD;
+ background-color: $background;
transition: opacity 0.5s ease, transform 0.5s ease;
box-shadow: $dropShadow;
border-radius: 1.5em;
@@ -57,13 +57,4 @@
justify-content: center;
margin-top: -1em;
}
-}
-
-.kaeps-title{
-
- top: 5%; // 从顶部留下10%的空间以居中显示
- font-size: 150px;
- padding-bottom: 5%;
- color: $classicYellow;
- font-family: "Acme", sans-serif;
}
\ No newline at end of file
diff --git a/src/styles/views/Register.scss b/src/styles/views/Register.scss
index e24ac68..c5dba0e 100644
--- a/src/styles/views/Register.scss
+++ b/src/styles/views/Register.scss
@@ -20,7 +20,7 @@
padding-top: 30px;
padding-left: 37px;
padding-right: 37px;
- background-color: #C9D7DD;
+ background-color: $background;
transition: opacity 0.5s ease, transform 0.5s ease;
box-shadow: $dropShadow;
border-radius: 1.5em;
@@ -57,13 +57,4 @@
justify-content: center;
margin-top: 0em;
}
-}
-
-.kaeps-title{
-
- top: 5%; // 从顶部留下10%的空间以居中显示
- font-size: 150px;
- padding-bottom: 5%;
- color: $classicYellow;
- font-family: "Acme", sans-serif;
}
\ No newline at end of file