Compare commits

...

3 Commits

Author SHA1 Message Date
Danila Fedorin bc794955e3 Prototype switching to em. 2019-08-21 21:40:58 -07:00
Danila Fedorin b8fc33eae6 Make minor visual changes 2019-08-21 21:20:30 -07:00
Danila Fedorin 7d09b4ad9a Make notifications more consistent. 2019-08-21 18:40:45 -07:00
4 changed files with 134 additions and 116 deletions

View File

@ -0,0 +1,3 @@
@import 'mixins';
@import 'variables';

12
static/scss/mixins.scss Normal file
View File

@ -0,0 +1,12 @@
@mixin input-common {
padding: 5px;
border-radius: $border-radius;
outline: none;
font-family: inherit;
font-size: inherit;
&:focus {
transition: background-color $transition-duration;
}
}

View File

@ -1,22 +1,7 @@
@import url('https://fonts.googleapis.com/css?family=Open+Sans|Source+Code+Pro');
$primary-color: #53C0FA;
$primary-color-highlight: #4298C7;
$primary-color-light: #9FDBFB;
$background-color: #1b1e21;
$background-color-light: lighten($background-color, 4%);
$background-color-dark: darken($background-color, 4%);
$error-color: #f01d43;
$error-color-dark: darken(#f01d43, 10%);
$alert-color: #18f49c;
$alert-color-bright: rgb(240, 244, 24);
$inactive-input-color: lighten($background-color-light, 5%);
$active-input-color: lighten($inactive-input-color, 5%);
$transition-duration: .250s;
$inset-shadow: inset 0px 0px 5px rgba(0, 0, 0, .25);
$border-radius: 3px;
@import 'mixins';
@import 'variables';
@import 'components';
html, body {
height: 100vh;
@ -24,32 +9,19 @@ html, body {
body {
font-family: 'Open Sans', sans-serif;
margin: 0px;
margin: 0;
background-color: $background-color;
font-size: 12px;
font-height: 1em;
color: white;
}
@mixin input-common {
padding: 5px;
border-radius: $border-radius;
outline: none;
font-family: inherit;
font-size: inherit;
&:focus {
transition: background-color $transition-duration;
}
}
input, textarea {
@include input-common();
overflow-x: hidden;
background-color: $inactive-input-color;
color: white;
border: none;
padding: 10px;
padding: .5em;
&:focus {
background-color: $active-input-color;
@ -68,6 +40,7 @@ button {
}
}
a {
text-decoration: none;
color: $primary-color;
@ -77,50 +50,43 @@ a {
}
}
h2, h3 {
margin: 0px;
margin-bottom: 3px;
}
a.file-wrapper {
padding: 5px 0px 5px 0px;
display: flex;
align-items: center;
.feather-icon {
height: 30px;
width: 30px;
margin-right: 10px;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
margin-bottom: .5em;
}
/*
* Errors
*/
div.errors-wrapper {
position: fixed;
pointer-events: none;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
}
div.error-wrapper {
pointer-events: auto;
width: 400px;
padding: 5px;
width: 40%;
padding: .5em;
background-color: $error-color;
border: 1px solid $error-color-dark;
border: .1em solid $error-color-dark;
color: white;
margin: auto;
margin-top: 10px;
margin-bottom: 10px;
font-size: 14px;
display: flex;
margin-top: .85em;
margin-bottom: .85em;
font-size: 1em;
align-items: center;
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;
.feather-icon {
margin-right: 10px;
margin-right: .85em;
}
}
@ -130,12 +96,12 @@ div.error-wrapper {
div.login-wrapper {
display: flex;
flex-direction: column;
max-width: 300px;
max-width: 30%;
margin: auto;
margin-top: 20px;
margin-top: 1.5em;
input, button {
margin: 3px;
margin: .3em;
}
}
@ -145,24 +111,25 @@ div.login-wrapper {
div.base-wrapper {
display: flex;
height: 100%;
> div {
padding: 10px;
box-sizing: border-box;
}
}
/*
* The list of rooms
*/
div.rooms-container {
border-right: .1em solid $background-color-dark;
}
div.rooms-wrapper {
flex-shrink: 0;
width: 15%;
min-width: 200px;
background-color: $background-color-light;
min-width: 20em;
padding: .85em;
box-sizing: border-box;
border-right: .1em solid $background-color-dark;
.room-search {
padding: 5px;
padding: .5em;
width: 100%;
box-sizing: border-box;
}
@ -170,23 +137,21 @@ div.rooms-wrapper {
div.room-link-wrapper {
whitespace: nowrap;
border-left: solid .2em $background-color;
padding-left: .5em;
margin: .3em;
display: flex;
padding: 0px;
border-left: solid 2px $background-color-light;
padding-left: 5px;
margin: 3px;
align-items: center;
.feather-icon {
margin-right: 3px;
height: 1.2em;
}
span {
span.notification-count {
color: $alert-color;
margin-right: .5em;
display: flex;
align-items: center;
margin-right: 5px;
&.bright {
color: $alert-color-bright;
@ -206,7 +171,7 @@ div.room-link-wrapper {
}
&.active {
border-left: solid 2px $primary-color;
border-left: solid .2em $primary-color;
}
&.hidden {
@ -216,15 +181,15 @@ div.room-link-wrapper {
div.reconnect-wrapper {
position: fixed;
bottom: 20px;
left: 20px;
bottom: 1.5em;
left: 1.5em;
display: flex;
align-items: center;
background-color: $inactive-input-color;
border-radius: $border-radius;
.feather-icon {
margin-right: 10px;
margin-right: .85em;
}
}
@ -232,36 +197,38 @@ div.reconnect-wrapper {
* The current room, if any.
*/
div.room-wrapper {
flex-grow: 1;
display: flex;
height: 100%;
flex-direction: column;
padding: 5px;
padding: .85em;
}
div.typing-wrapper {
padding: 5px;
padding: .5em;
height: 1em;
flex-shrink: 0;
}
/*
* The message input and send button.
*/
div.message-wrapper {
display: flex;
flex-shrink: 0;
input, textarea {
flex-grow: 12;
margin: 3px;
margin: .3em;
}
button {
margin: 3px;
height: 40px;
width: 40px;
transition: background-color $transition-duration;
margin: .3em;
height: 3em;
width: 3em;
transition: color $transition-duration;
background-color: $background-color;
color: $primary-color;
&:hover {
color: $primary-color-light;
}
}
}
@ -274,7 +241,7 @@ div.messages-wrapper {
width: 100%;
text-align: center;
box-sizing: border-box;
padding: 5px;
padding: .5em;
}
}
@ -284,16 +251,16 @@ table.messages-table {
table-layout: fixed;
td {
padding: 5px;
padding: .5em;
vertical-align: top;
}
img {
max-width: 90%;
max-height: 400px;
margin-top: 10px;
margin-bottom: 10px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, .5);
max-height: 30em;
margin-top: .85em;
margin-bottom: .85em;
box-shadow: 0 0 .5em rgba(0, 0, 0, .5);
}
.sending {
@ -302,27 +269,24 @@ table.messages-table {
video {
max-width: 90%;
max-height: 400px;
max-height: 30em;
}
td:nth-child(1) {
width: 10%;
@media screen and (min-width: 1000px) {
width: 100px;
}
white-space: nowrap;
}
}
div.message {
p {
margin: 0px;
margin: 0;
}
blockquote {
margin: 0px 0px 0px 0px;
padding-left: 5px;
border-left: 4px solid $primary-color;
margin: 0 0 0 0;
padding-left: .5em;
border-left: .4em solid $primary-color;
}
code {
@ -334,7 +298,7 @@ div.message {
overflow: auto;
display: block;
box-sizing: border-box;
padding: 10px;
padding: .85em;
background-color: $background-color-dark;
border-radius: $border-radius;
box-shadow: $inset-shadow;
@ -343,8 +307,8 @@ div.message {
span.sender-wrapper {
border-radius: $border-radius;
padding-left: 5px;
padding-right: 5px;
padding-left: .5em;
padding-right: .5em;
display: inline-block;
box-sizing: border-box;
text-align: right;
@ -356,6 +320,19 @@ span.sender-wrapper {
color: black;
}
a.file-wrapper {
padding: .5em 0 .5em 0;
display: flex;
align-items: center;
.feather-icon {
height: 2em;
width: 2em;
margin-right: .85em;
}
}
/**
* Icons
*/
@ -366,6 +343,6 @@ span.sender-wrapper {
stroke-linecap: round;
stroke-linejoin: round;
fill: none;
height: 20px;
width: 20px;
height: 1.5em;
width: 1.5em;
}

View File

@ -0,0 +1,26 @@
// Colors
$primary-color: #53C0FA;
$primary-color-highlight: #4298C7;
$primary-color-light: #9FDBFB;
$background-color: #1b1e21;
$background-color-light: lighten($background-color, 4%);
$background-color-dark: darken($background-color, 4%);
$error-color: #f01d43;
$error-color-dark: darken(#f01d43, 10%);
$alert-color: #18f49c;
$alert-color-bright: rgb(240, 244, 24);
$inactive-input-color: lighten($background-color-light, 5%);
$active-input-color: lighten($inactive-input-color, 5%);
// Transitions
$transition-duration: .250s;
// Shadows
$inset-shadow: inset 0px 0px 5px rgba(0, 0, 0, .25);
// Borders
$border-radius: 3px;