-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
beautified chatroom and added different avtars for user
- Loading branch information
Tejas Zambre
committed
Jun 1, 2020
1 parent
e6cce5c
commit 8dc63be
Showing
18 changed files
with
245 additions
and
127 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,190 @@ | ||
@import "semantic-ui"; | ||
|
||
.chatbox{ | ||
height: 1305px; | ||
#h1-tag-index{ | ||
font-size: 50px; | ||
margin: 2% 0 0 5% !important; | ||
padding-top: 10px; | ||
} | ||
|
||
#profile-pic-online{ | ||
margin-left: 20px; | ||
} | ||
|
||
#flash-messages{ | ||
font-size: 40px; | ||
background-color: rgba(240, 240, 240, 1) !important; | ||
border-radius: 65px; | ||
margin-left: 10%; | ||
position: absolute; | ||
top: 10px; | ||
width: 80%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
#search-icon{ | ||
border-radius: 50; | ||
background-color: rgba(240, 240, 240, 0.3); | ||
display: flex; | ||
align-items: flex-end; | ||
padding-bottom: 5px; | ||
justify-content: center; | ||
color: white; | ||
} | ||
|
||
.rounded-text-field{ | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
#message_body{ | ||
border-radius: 80px !important; | ||
background-color: rgba(240, 240, 240, 1); | ||
height: 125px; | ||
position: absolute; | ||
border: white 5px solid; | ||
margin: 0 3% 0 3%; | ||
width: 94%; | ||
font-size: 4rem; | ||
bottom: 30px; | ||
padding-left: 50px; | ||
} | ||
|
||
.cover{ | ||
background-color: black; | ||
width: 100%; | ||
} | ||
|
||
.rounded-top{ | ||
border-top-right-radius: 65px; | ||
border-top-left-radius: 65px; | ||
border-top: rgba(255, 255, 255, 1) 30px solid; | ||
height: 83vh !important; | ||
display: flex; | ||
flex-direction: column; | ||
padding-bottom: 175px; | ||
} | ||
|
||
.user-name-online-list{ | ||
font-size: 30px; | ||
text-align: center; | ||
color: white; | ||
} | ||
|
||
#online-users-container{ | ||
display: flex; | ||
flex: row wrap; | ||
position: absolute; | ||
width: 92%; | ||
margin-left: 7%; | ||
bottom: 84vh; | ||
font-size: 60px; | ||
overflow-x: auto; | ||
} | ||
|
||
#online-users-container::-webkit-scrollbar { | ||
width: 0px; | ||
background: transparent; /* make scrollbar transparent */ | ||
} | ||
|
||
body{ | ||
background-image: linear-gradient(to right, rgb(35, 7, 77), rgb(204, 83, 51)); | ||
background-image: linear-gradient(to bottom, rgba(90, 80, 230, 1), rgba(255, 0, 0, 0.5)); | ||
// background-color: rgba(90, 80, 230, 1); | ||
height: 100vh; | ||
overflow: visible; | ||
} | ||
|
||
.half-chatbox{ | ||
height: 200px; | ||
height: 15vh; | ||
overflow: auto; | ||
} | ||
|
||
.chatbox{ | ||
position: absolute; | ||
width: 100%; | ||
bottom: 1px; | ||
} | ||
|
||
.custom-container{ | ||
margin: 0% 5%; | ||
#navbar{ | ||
background-color: rgba(90, 80, 230, 1); | ||
color: white; | ||
} | ||
|
||
#messages{ | ||
height: 15em; | ||
overflow: auto; | ||
background-image: linear-gradient(to right, rgba(35, 7, 77, 1), rgba(204, 83, 51, 1)); | ||
overflow: scroll; | ||
background-color: white; | ||
// background-image: linear-gradient(to right, rgba(35, 7, 77, 1), rgba(204, 83, 51, 1)); | ||
} | ||
|
||
#time-on-message{ | ||
float: right; | ||
margin-top: 5px; | ||
margin-right: 0px; | ||
#messages::-webkit-scrollbar { | ||
width: 0px; | ||
background: transparent; /* make scrollbar transparent */ | ||
} | ||
|
||
#username-on-message{ | ||
float: left; | ||
margin-left: 0px; | ||
color: smokewhite; | ||
font-size: 15px; | ||
font-size: 25px; | ||
} | ||
|
||
#navbar{ | ||
font-size: 30px; | ||
} | ||
|
||
#users{ | ||
height: 15em; | ||
overflow: auto; | ||
} | ||
|
||
// #h1-tag-index{ | ||
// color: white; | ||
// } | ||
|
||
#my-message-body{ | ||
margin: 2%; | ||
font-size: 25px; | ||
background-image: linear-gradient(to right, rgba(35, 7, 77, 1), rgba(204, 83, 51, 1)); | ||
color: white; | ||
border-bottom-left-radius: 50px; | ||
border-top-left-radius: 50px; | ||
font-size: 35px; | ||
padding-right: 40px; | ||
max-width: 70%; | ||
overflow-wrap: break-word; | ||
word-wrap: break-word; | ||
hyphens: auto; | ||
margin: 2% 0; | ||
// background-image: linear-gradient(to right, rgba(35, 7, 77, 1), rgba(204, 83, 51, 1)); | ||
background-color: rgba(229, 223, 237, 1); | ||
border-bottom-left-radius: 60px; | ||
border-top-left-radius: 60px; | ||
border-top-right-radius: 60px; | ||
} | ||
|
||
#message-box{ | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin: 0 3% 0 3%; | ||
} | ||
|
||
#frnd-message-body{ | ||
margin: 2%; | ||
border-bottom-right-radius: 50px; | ||
border-top-right-radius: 50px; | ||
font-size: 25px; | ||
background-image: linear-gradient(to right, rgba(35, 7, 77, 1), rgba(204, 83, 51, 1)); | ||
color: white; | ||
margin: 2% 0; | ||
padding-left: 40px; | ||
border-bottom-right-radius: 60px; | ||
max-width: 70%; | ||
border-top-right-radius: 60px; | ||
border-top-left-radius: 60px; | ||
overflow-wrap: break-word; | ||
word-wrap: break-word; | ||
hyphens: auto; | ||
font-size: 35px; | ||
background-color: rgba(240, 240, 240, 1); | ||
// background-image: linear-gradient(to right, rgba(35, 7, 77, 1), rgba(204, 83, 51, 1)); | ||
} | ||
|
||
#time-on-message{ | ||
font-size: 30px !important; | ||
} | ||
|
||
#message-submit{ | ||
display: none; | ||
#message-button { | ||
display:none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
class User < ApplicationRecord | ||
has_many :messages | ||
has_secure_password | ||
validates :username, length: { minimum: 5, maximum: 20 }, presence: true | ||
validates :username, length: { minimum: 2, maximum: 20 }, presence: true | ||
validates :password_digest, presence: true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,22 @@ | ||
<%= content_tag "h1", class: "ui center aligned inverted icon header", id: "h1-tag-index", data: {current: current_user.id} do%> | ||
<i class="users icon"></i> | ||
Welcome to Chatroom | ||
<%= content_tag "h1", class: "ui inverted icon header", id: "h1-tag-index", data: {current: current_user.id} do%> | ||
Message Me | ||
<% end %> | ||
<div class="ui stackable two column grid"> | ||
<div class="sixteen wide column"> | ||
<div class="ui fluid raised card half-chatbox"> | ||
<div class="content" id="users"> | ||
<div class="ui celled list" id= "online-users-container"> | ||
<h3>Online Friends:</h3> | ||
<%= render partial: 'users/user', locals: { user: @user } %> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="content" id="users"> | ||
<div class="" id= "online-users-container"> | ||
<div class= "ui avatar image" id= "search-icon"><i class="search icon"></i></div> | ||
<%= render partial: 'users/user', locals: { user: @user } %> | ||
</div> | ||
<div class="sixteen wide column"> | ||
<div class="ui fluid raised green card chatbox"> | ||
<div class="content" id="messages"> | ||
<div class="ui feed" id="message-container"> | ||
<%= render @messages %> | ||
</div> | ||
</div> | ||
<div class="extra content"> | ||
<%= form_for(@message, html: {class: "ui reply form", role: "form"}, url: message_path, remote: true) do |f| %> | ||
<div class="field"> | ||
<div class="ui right massive icon input"> | ||
<%= f.text_field :body, id: "message_body", placeholder: "Enter your message"%> | ||
<i class="rocket icon"></i> | ||
<%= f.button '<i class="rocket icon"></i>'.html_safe, id: "message-submit" %> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
<div class="chatbox"> | ||
<div class="rounded-top" id="messages"> | ||
<div class="ui feed" id="message-container"> | ||
<%= render @messages %> | ||
</div> | ||
</div> | ||
<div class= "cover"> | ||
<%= form_for(@message, html: {class: "rounded-text-field", role: "form"}, url: message_path, remote: true) do |f| %> | ||
<%= f.text_field :body, id: "message_body", placeholder: "Enter your message" %> | ||
<%= f.button '<i class="rocket icon"></i>'.html_safe, id: "message-button"%> | ||
<% end %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
<div class="ui massive inverted menu"> | ||
<div class="ui container"> | ||
<%= link_to "Chatroom", chatroom_path, class: "item"%> | ||
<a class="item"> | ||
Friends | ||
</a> | ||
<div class="right menu"> | ||
<div class="ui dropdown item"> | ||
Account <i class="dropdown icon"></i> | ||
<div class="menu"> | ||
<% if !logged_in? %> | ||
<%= link_to "login", login_path, class: "item"%> | ||
<% else %> | ||
<%= link_to "logout", logout_path, method: :delete, class: "item"%> | ||
<% end %> | ||
</div> | ||
</div> | ||
<div class="ui massive top right attached label" id= "navbar"> | ||
<div class="ui dropdown item"> | ||
<i class="ellipsis vertical icon"></i> | ||
<div class="menu"> | ||
<% if !logged_in? %> | ||
<%= link_to "login", login_path, class: "item"%> | ||
<% else %> | ||
<%= link_to "logout", logout_path, method: :delete, class: "item"%> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.