Skip to content

Commit fc516ee

Browse files
authored
Merge pull request #70 from jitendra-ky/65-home-default-view
UX: add welcome page with dragonfly icon and styling.
2 parents 3277aca + eea123f commit fc516ee

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed
68.2 KB
Loading

static/js/home.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ function rerender_contacts_view() {
166166

167167
function onClickContact() {
168168
// on click of a contact, set the selectedContactId and rerender the message view
169+
$('.mainbox .welcome-page').hide()
169170
const contactId = $(this).attr('id')
170171
app_states.setSelectedContactId(contactId)
171172
render_msg_view()

static/styles/home.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,31 @@ body {
192192
overflow: hidden;
193193
display: flex;
194194
flex-direction: column;
195+
position: relative;
196+
197+
.welcome-page {
198+
position: absolute;
199+
top: 0;
200+
left: 0;
201+
width: 100%;
202+
height: 100%;
203+
text-align: center;
204+
background-color: #dddddd;
205+
.img-holder {
206+
height: 200px;
207+
width: 200px;
208+
border-radius: 50%;
209+
display: flex;
210+
justify-content: center;
211+
margin: 20px auto;
212+
align-items: center;
213+
overflow: hidden;
214+
img {
215+
width: 80%;
216+
height: 80%;
217+
}
218+
}
219+
}
195220

196221
.chat-header {
197222
display: flex;

templates/home.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ <h4>Dragonfly</h4>
4444
</div>
4545
</div>
4646
<div class="mainbox">
47+
<div class="welcome-page">
48+
<!-- this would be welcome page with dragonfly icon -->
49+
<div class="img-holder">
50+
<img src="/static/images/dragonfly-icon-200.png" alt="Dragonfly App icon" class="profile-pic">
51+
</div>
52+
<h2>Welcome to Dragonfly</h2>
53+
<p>Chat with your friends and family</p>
54+
</div>
4755
<div class="chat-header">
4856
<div class="chat-header-profile"></div>
4957
<div class="chat-header-details">

0 commit comments

Comments
 (0)