Merge branch 'marijn-chat' into 'master'

Marijn chat

See merge request !11
This commit was merged in pull request #15.
This commit is contained in:
Marijn Jansen
2017-01-11 15:37:16 +01:00
10 changed files with 159 additions and 57 deletions

10
.idea/WebDB.iml generated
View File

@@ -14,5 +14,15 @@
</SOURCES> </SOURCES>
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="module-library">
<library name="PHP" type="php">
<CLASSES>
<root url="file:///usr/share/php" />
</CLASSES>
<SOURCES>
<root url="file:///usr/share/php" />
</SOURCES>
</library>
</orderEntry>
</component> </component>
</module> </module>

View File

@@ -0,0 +1,22 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myValues">
<value>
<list size="8">
<item index="0" class="java.lang.String" itemvalue="nobr" />
<item index="1" class="java.lang.String" itemvalue="noembed" />
<item index="2" class="java.lang.String" itemvalue="comment" />
<item index="3" class="java.lang.String" itemvalue="noscript" />
<item index="4" class="java.lang.String" itemvalue="embed" />
<item index="5" class="java.lang.String" itemvalue="script" />
<item index="6" class="java.lang.String" itemvalue="li" />
<item index="7" class="java.lang.String" itemvalue="a" />
</list>
</value>
</option>
<option name="myCustomValuesEnabled" value="true" />
</inspection_tool>
</profile>
</component>

Binary file not shown.

View File

@@ -12,7 +12,7 @@
include("views/main.php"); include("views/main.php");
/* Add your view files here. */ /* Add your view files here. */
include("views/chat.php"); include("views/chat-view.php");
/* This adds the footer. */ /* This adds the footer. */
include("views/footer.php"); include("views/footer.php");

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -1,44 +1,70 @@
/* Overall chat-screen */
.chat { .chat {
position: fixed;
top: 80px;
left: 256px;
text-align: center; text-align: center;
padding: 15px 0;
width: calc(100% - 256px);
height: calc(100% - 120px);
display: inline-flex;
} }
.chat-history { .chat-left {
/*border: solid #845663;*/ width: 256px;
width: 80%; height: 100%;
height: 500px; margin-left: 10px;
margin: 20px auto; margin-right: 10px;
display: inline-flex;
}
.chat-recent, .chat-history {
border-radius: 20px;
width: 100%;
background-color: white; background-color: white;
}
/* List of chats. */
.chat-recent {
height: 600px;
overflow-y: auto;
padding: 10px;
text-align: left;
}
.chat-conversation {
margin: 5px;
}
.chat-right {
width: calc(100% - 256px - 40px);
height: calc(100% - 80px);
vertical-align: bottom; vertical-align: bottom;
margin-right: 10px;
} }
.chat-field input { /* Chat history. */
border-radius: 8px; .chat-history {
overflow-y: auto;
height: 100%;
padding-bottom: 10px;
} }
.chat-field input[type="text"] {
width: calc(75% - 60px);
}
.chat-field input[type="submit"] {
width: 60px;
}
.chat-message { .chat-message {
width: 100%; width: 100%;
height: 40px; min-height: 40px;
padding-top: 10px; padding-top: 10px;
clear: both;
} }
.chat-message-self, .chat-message-other { .chat-message-self, .chat-message-other {
text-align: left;
border-radius: 20px; border-radius: 20px;
padding: 10px 12px; padding: 10px 12px;
min-width: 10%;
max-width: 45%; max-width: 45%;
} }
.chat-message-self { .chat-message-self {
text-align: right;
float: right; float: right;
margin-right: 10px; margin-right: 10px;
background-color: darkgreen; background-color: darkgreen;
@@ -46,8 +72,28 @@
} }
.chat-message-other { .chat-message-other {
text-align: left;
float: left; float: left;
margin-left: 10px; margin-left: 10px;
background-color: aquamarine; background-color: aquamarine;
}
/* Chat reply field */
.chat-field {
padding: 15px;
}
.chat-field input {
border-radius: 8px;
}
.chat-field input[type="text"] {
width: calc(100% - 80px);
}
.chat-field input[type="submit"] {
width: 60px;
background-color: #845663;
color: white;
padding: 5px;
} }

View File

@@ -58,11 +58,6 @@ body {
border: 0; border: 0;
} }
input[type="submit"], button {
background-color: #845663;
color: white;
padding: 5px;
}
input[type="text"] { input[type="text"] {
padding: 5px; padding: 5px;

View File

@@ -0,0 +1,58 @@
<div class="content">
<div class="chat">
<div class="chat-left">
<nav class="chat-recent">
<h5>Chats</h5>
<a href="#"><div class="chat-conversation">
<img class="profile-picture" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTDnuRSeeyPve7KwDvJJ6OBzj3gyghwLcE2z9kZeYBOyZavh3mw">
Rudolf Leslo
</div></a>
<a href="#"><div class="chat-conversation">
<img class="profile-picture" src=http://www.kpop-map.com/wp-content/uploads/2016/01/sm-rookies-kun-profile.jpg">
Henk de Boer
</div></a>
</nav>
</div>
<div class="chat-right">
<div class="chat-history">
<div class="chat-message">
<div class="chat-message-self">Hi!</div>
</div>
<div class="chat-message">
<div class="chat-message-other">Hi!</div>
</div>
<div class="chat-message">
<div class="chat-message-self">How it's going?</div>
</div>
<div class="chat-message">
<div class="chat-message-self">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
</div>
<div class="chat-message">
<div class="chat-message-other">Hi!</div>
</div>
<div class="chat-message">
<div class="chat-message-other">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
</div>
<div class="chat-message">
<div class="chat-message-other">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
</div>
<div class="chat-message">
<div class="chat-message-self">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
</div>
</div>
<div class="chat-field">
<form method="post">
<input type="text"
name="message"
placeholder="Reageer..."
required
>
<input type="submit"
value="Verstuur"
>
</form>
</div>
</div>
</div>
</div>

View File

@@ -1,29 +0,0 @@
<div class="content">
<div class="chat">
<div class="chat-history">
<div class="chat-message">
<div class="chat-message-self">Hi!</div>
</div>
<div class="chat-message">
<div class="chat-message-other">Hi!</div>
</div>
<div class="chat-message">
<div class="chat-message-self">How it's going?</div>
</div>
<div class="chat-message">
<div class="chat-message-self">Hi!</div>
</div>
</div>
<form class="chat-field" method="post">
<input type="text"
name="message"
placeholder="Typ een chatbericht om te verzenden"
required
>
<input type="submit"
value="Verstuur"
>
</form>
</div>
</div>

View File

@@ -1,6 +1,6 @@
<header> <header>
<div id="header-logo"> <div id="header-logo">
<img src="img/Logo.png" alt="MyHyvesbook+" /> <a href="profile.php"><img src="img/top-logo.png" alt="MyHyvesbook+" /></a>
</div> </div>
<div id="header-search"> <div id="header-search">
<form action="php/search.php" method="get"> <form action="php/search.php" method="get">
@@ -12,7 +12,7 @@
<div id="profile-menu-popup"> <div id="profile-menu-popup">
<a href="#"><span style="color: red;" class="fa fa-sign-out" data-title="Uitloggen"></span></a> | <a href="#"><span style="color: red;" class="fa fa-sign-out" data-title="Uitloggen"></span></a> |
<a href="#"><span style="color: blue;" class="fa fa-cog" data-title="Instellingen"></span></a> | <a href="#"><span style="color: blue;" class="fa fa-cog" data-title="Instellingen"></span></a> |
<a href="#"><span style="color: green;" class="fa fa-user" data-title="Profiel"></span></a> <a href="profile.php"><span style="color: green;" class="fa fa-user" data-title="Profiel"></span></a>
</div> </div>
<div id="profile-hello-popup"> <div id="profile-hello-popup">
<div id="hello-loop"> <div id="hello-loop">