Skip to content

Commit

Permalink
Handling welcoming and leaving events
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelrahmanNoaman committed Jul 22, 2023
1 parent 967d67f commit de4664c
Show file tree
Hide file tree
Showing 9 changed files with 512 additions and 30 deletions.
174 changes: 174 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"dotenv": "^16.3.1",
"express": "^4.18.2",
"moment": "^2.29.4",
"mysql2": "^3.5.2",
"nodemon": "^3.0.1",
"path": "^0.12.7",
"socket.io": "^4.7.1"
Expand Down
36 changes: 34 additions & 2 deletions public/chat.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,42 @@ <h3 class="room-id"></h3>
</header>
<main class="chat-main">
<div class="chat-sidebar">

<h3><i class="fas fa-comments"></i> Room Name:</h3>
<h2 id="room-name"></h2>
<h3><i class="fas fa-users"></i> Users</h3>
<ul id="users"></ul>

<div>
<div class="add-users">
<h3><i class="fas fa-users"></i> Team One</h3>
<button class="chat-button" id="add-waiting">ADD</button>
</div>
<ul id="team-one"></ul>
</div>

<div>
<div class="add-users">
<h3><i class="fas fa-users"></i> Team Two</h3>
<button class="chat-button" id="add-waiting">ADD</button>
</div>
<ul id="team-two"></ul>
</div>

<div>
<div class="add-users">
<h3><i class="fas fa-user"></i> Referee</h3>
<button class="chat-button" id="add-waiting">ADD</button>
</div>
<ul id="referee"></ul>
</div>

<div>
<div class="add-users">
<h3><i class="fas fa-users"></i> Waiting users</h3>
<button class="chat-button" id="add-waiting">ADD</button>
</div>
<ul id="waiting-users"></ul>
</div>

</div>
<div class="chat-messages"></div>
</main>
Expand Down
39 changes: 36 additions & 3 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ a {
/* Chat Page */

.chat-container {
max-width: 1100px;
max-width: 1200px;
background: #fff;
margin: 100px auto;
margin: 120px auto;
overflow: hidden;
}

Expand Down Expand Up @@ -179,13 +179,46 @@ a {
width: 100%;
}

.main-container{
.main-container {
display: flex;
justify-content: space-around;
align-items: center;
flex-direction: column;
}

.add-users {
display: flex;
flex-direction: row;
justify-content: space-between;
}

.chat-button {
padding: 2px 10px;
border-radius: 15px;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
-ms-border-radius: 15px;
-o-border-radius: 15px;
background-color: #b0bafc;
border-color: transparent;
max-height: 25px;
transition: 0.7s;
-webkit-transition: 0.7s;
-moz-transition: 0.7s;
-ms-transition: 0.7s;
-o-transition: 0.7s;
}

.chat-button:hover {
background-color: #2e3878;
color: white;
transform: scale(1.15);
-webkit-transform: scale(1.15);
-moz-transform: scale(1.15);
-ms-transform: scale(1.15);
-o-transform: scale(1.15);
}

@media (max-width: 700px) {
.chat-main {
display: block;
Expand Down
Loading

0 comments on commit de4664c

Please sign in to comment.