Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs11-async
chat-client
Commits
4dd05c9e
Commit
4dd05c9e
authored
5 years ago
by
Caleb C. Sander
Browse files
Options
Download
Email Patches
Plain Diff
Initial commit
parents
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+3
-0
README.md
client.js
+0
-0
client.js
index.html
+58
-0
index.html
style.css
+18
-0
style.css
with
79 additions
and
0 deletions
+79
-0
README.md
0 → 100644
View file @
4dd05c9e
# Project 5 - Chat client
The spec for this project can be found at
[
`specs/chat/client.md`
](
https://gitlab.caltech.edu/cs11-async/documents/blob/master/specs/chat/client.md
)
.
This diff is collapsed.
Click to expand it.
client.js
0 → 100644
View file @
4dd05c9e
This diff is collapsed.
Click to expand it.
index.html
0 → 100644
View file @
4dd05c9e
<html>
<head>
<link
rel=
'stylesheet'
href=
'https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css'
/>
<link
rel=
'stylesheet'
href=
'style.css'
/>
<script
src=
'client.js'
></script>
</head>
<body>
<!-- This div is shown at startup and asks the user to enter their username -->
<div
class=
'container'
id=
'login-page'
>
<div
class=
'row no-gutters'
>
<div
class=
'col-12'
>
<div
class=
'card'
>
<h3
class=
'card-header'
>
Login
</h3>
<div
class=
'card-body'
>
<div
class=
'input-group'
>
<input
class=
'form-control'
id=
'user'
placeholder=
'Username'
autofocus
/>
<div
class=
'input-group-append'
>
<button
class=
'btn btn-primary'
id=
'login'
>
Join
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Once the user logs in, this div should be shown instead -->
<div
class=
'container hidden'
id=
'chat-page'
>
<div
class=
'row no-gutters'
>
<!-- The column on the left shows the users available to chat with -->
<div
class=
'col-3'
>
<div
class=
'card'
>
<h3
class=
'card-header'
>
Users
</h3>
<ul
class=
'list-group list-group-flush'
id=
'users'
></ul>
</div>
</div>
<!-- The column on the right shows the messages to and from the selected user -->
<div
class=
'col-9'
>
<div
class=
'card'
>
<h3
class=
'card-header'
>
Messages
</h3>
<div
class=
'card-body'
>
<h5
class=
'card-title'
id=
'chat-title'
></h5>
</div>
<ul
class=
'list-group list-group-flush'
id=
'messages'
></ul>
<div
class=
'card-footer'
>
<div
class=
'input-group'
>
<input
class=
'form-control'
id=
'message'
placeholder=
'Message'
/>
<div
class=
'input-group-append'
>
<button
class=
'btn btn-primary'
id=
'send'
>
Send
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
This diff is collapsed.
Click to expand it.
style.css
0 → 100644
View file @
4dd05c9e
/* If the "Users" or "Messages" panes get too tall, make them scrollable */
.card
{
max-height
:
100vh
;
overflow-y
:
auto
;
}
.card
.list-group
{
overflow-y
:
auto
;
}
/* Add spacing between usernames and unread bubbles */
.badge
{
margin-left
:
5px
;
}
/* A class used to hide an element */
.hidden
{
display
:
none
;
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment