Files
im_webapp/css/base.css
T

474 lines
7.9 KiB
CSS

* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
html, body {
height:100%;
width:100%;
font-family: 'Roboto', Arial, sans-serif;
overflow: hidden;
background-color: silver;
}
#mountPoint {
height: 100%;
padding-top: 1em;
padding-bottom: 4em;
}
/* Top-level application layout style: sidepanel + main view */
#app-container {
position: relative;
display: flex;
height: 100%;
width: 80em;
overflow: hidden;
margin-left: auto;
margin-right: auto;
box-shadow: 1px 2px 0.3em gray;
background-color: white;
}
#sidepanel {
display: flex;
flex-direction: column;
width: 30em;
height: 100%;
}
#topic-view {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
/* END of top-level layout */
/* Sidepanel styles */
#side-caption-panel {
display: flex;
align-items: center;
x-justify-content: space-between;
flex: none;
padding: 0.5em;
height: 4.5em;
background-color: #039be5; /* light-blue 600 */
color: #b3e5fc; /* light-blue 100 */
box-shadow: 0 1px 1px -1px gray;
z-index: 1; /* otherwise the shadow becomes invisible */
}
#side-caption-panel a {
color: #b3e5fc; /* light-blue 100 */
padding-left: 0.5em;
vertical-align: -1.5em; /* icons are bigger than the declared font size */
}
#side-caption-panel :hover {
color: white;
}
#sidepanel-title {
margin-right: auto;
margin-left: 0.5em;
font-size: 2rem;
}
#self-avatar {
width: 3em;
height: auto;
flex: none;
}
/* Area which displays an error message */
#alert-box {
padding: 0.5em;
background-color: transparent;
}
#alert-box.error-alert {
background-color: #ffcdd2;
border-color: #d32f2f;
color: #600;
}
/* List of contacts */
#contacts-panel {
position: relative;
overflow-y: scroll;
}
#contact-box {
list-style: none;
}
#contact-box li {
display: flex;
padding: 0.5em;
min-height: 3.5em;
overflow: hidden;
}
#contact-box li:hover {
background-color: #fffde7; /* yellow 50 highlight */
}
/* Avatar and online-offline indicator */
#contact-box .avatar-box {
margin-right: 1em;
position: relative;
width: 3em;
height: 3em;
overflow: hidden;
padding: 0;
}
#contact-box .avatar {
width: 3em;
height: auto;
}
/* Online-offline indicator positioned inside avatar-box */
#contact-box .online, .offline {
font-size: 1.5em;
position: absolute;
right: 0;
bottom: -0.5em;
}
#contact-box .online {
color: #66bb6a;
}
#contact-box .offline {
color: #999;
}
#add-topic {
position: absolute;
right: 1em;
bottom: 1em;
}
/* END of avatar box */
/* END of sidepanel styles */
/* Topic/messages view */
#topic-caption-panel {
display: flex;
align-items: baseline;
justify-content: space-between;
flex: none;
padding: 0.5em;
height: 4.5em;
background-color: #b0bec5;
box-shadow: 0 1px 1px -1px gray;
z-index: 1; /* otherwise the shadow becomes invisible */
}
#messages-panel {
padding: 0.75em;
overflow-y: scroll;
background-color: #eceff1;
background-image: url("../img/ignasi_pattern_s.png");
}
/* Footer-panel with the input for the new message */
#send-message-panel {
flex: none;
margin-top: auto;
padding: 0.5em;
}
/* A static panel shown when no topic is selected */
#dummy-view {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background-color: #e0f7fa;
}
/* END of topic/mesages view */
.contactBox {
overflow: hidden;
}
#newTopicInput {
z-index: 3;
background-color: #FFF;
padding-bottom: 0.25em;
}
.contactList {
padding: 9.5em 0em 0.5em 0em;
margin-top: -9em;
height: 100vh;
overflow-y: scroll;
}
.contactList li {
padding: 0.25em;
}
.contactList li:hover {
background-color: #EEE;
}
.contact {
margin-top: 0;
}
.fullHeight {
height: 100%;
overflow: hidden;
}
.fullViewPort {
height: 99vh;
overflow-y: hidden;
}
.col-lg-12 {
padding: 0;
margin: 0;
}
/* Talk bubbles */
.chat-box {
list-style: none;
padding: 0 0 3.5em 0;
margin: 0 1em 0 1em;
}
.chat-box li {
display: flex;
margin: 0;
padding: 0;
align-items: flex-end;
}
.chat-box li.right {
justify-content: flex-end;
}
.chat-box .bubble {
position: relative;
max-width: 32em;
min-width: 16em;
height: auto;
padding: 0.75em 0.5em 0.75em 1.25em;
margin: 0;
text-align: left;
border-radius: 0.5em;
-webkit-border-radius: 0.5em;
-moz-border-radius: 0.5em;
/* tested in chrome 47 on mac - performance sucks
-webkit-filter: drop-shadow(0px 1px 1px -1px rgba(0,0,0,0.3));
-filter: drop-shadow(0px 1px 1px -1px rgba(0,0,0,0.3));
*/
}
.chat-box li.single {
margin-top: 0.75em;
margin-bottom: 0.75em;
}
.chat-box li.first {
margin-top: 0.75em;
margin-bottom: 0.15em;
}
.chat-box li.middle {
margin-top: 0.15em;
margin-bottom: 0.15em;
}
.chat-box li.last {
margin-top: 0.15em;
margin-bottom: 0.75em;
}
/* Left triangle placed bottom left flush. */
.chat-box li.left .tip::before {
content: '';
position: absolute;
width: 0;
height: 0;
right: auto;
left: -10px;
top: auto;
bottom: 0;
border: 10px solid;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: inherit;
border-left-color: transparent;
}
/* Right triangle placed bottom right flush. */
.chat-box li.right .tip::before {
content: '';
position: absolute;
width: 0;
height: 0;
left: auto;
right: -10px;
top: auto;
bottom: 0;
border: 10px solid;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: inherit;
border-left-color: transparent;
}
.chat-box .avatar {
width: 40px;
text-align: center;
}
.chat-box .avatar img {
width: 32px;
display: block;
position: relative;
left: 4px;
border-radius: 50%;
}
.chat-box .bubble p {
margin: 0;
}
/* Typing notification bubble */
.chat-box .typing {
display: inline-block;
border-radius: 0.5em;
width: 2em;
padding: 0.25em 0.35em;
vertical-align: middle;
text-align: center;
color: #aaa;
}
.chat-box li.single .typing {
margin-top: 0.75em;
margin-bottom: 0.75em;
}
.chat-box li.last .typing {
margin-top: 0.15em;
margin-bottom: 0.75em;
}
.chat-box .timestamp {
font-size: 80%;
color: #777;
padding-left: 1.5em;
padding-top: 0.5em;
}
/* END of talk bubbles */
/* Input fields and buttons */
button {
display: inline-block;
margin: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
border: 1px solid transparent;
white-space: nowrap;
padding: 0.25em 1em;
font-size: 1.35rem;
border-radius: 2px;
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.25);
}
button[disabled],
html input[disabled] {
cursor: default;
opacity: 0.65;
box-shadow: none;
}
button.round {
border-radius: 50%;
width: 5rem;
height: 5rem;
line-height: 1;
outline: none; /* otherwise a square outline is shown */
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.25);
z-index: 2;
}
button.blue {
background-color: #2196f3; /* blue 500 */
color: white;
}
button:active {
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
input {
background: transparent;
border: none;
border-bottom: 1px solid #999;
width: 100%;
margin: 0;
padding: 0;
outline: none;
transition: border 0.2s ease-in-out, box-shadow: 0.2s ease-in-out;
}
input:focus {
border-bottom: 1px solid #2196f3;
box-shadow: inset 0 -1px 0 #2196f3;
}
/* END of input and buttons */
/* Modal dialog */
.overlay {
position: absolute;
display: flex;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10;
background-color: rgba(0,0,0,0.5);
}
.modal-dialog {
background-color: white;
margin: auto;
}
/* END of modal dialog */
/* Miscellaneous */
/* Badge with the number of unread messages */
.badge {
background-color: #0097A7;
color: white;
border-radius: 1em;
}
/* Color of buttons */
.blue {
color: #2196f3; /* blue 500 */
}
/* Material icons resized from the default 24pt */
.material-icons {
font-size: 2rem;
}
.material-icons.small {
font-size: 1.5rem;
}