You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

477 lines
7.6 KiB
SCSS

$bg: hsla(228, 12%, 12%, 1);
$bg0: hsla(228, 12%, 15%, 1);
$bg1: hsla(228, 12%, 18%, 1);
$bg2: hsla(228, 12%, 30%, 1);
$bg3: hsla(228, 12%, 36%, 1);
$bg4: hsla(228, 12%, 60%, 1);
$bg5: hsla(228, 12%, 100%, 1);
$red: #CC6666;
$amber: #DE935F;
$yellow: #F0C674;
$green: #B5BD68;
$cyan: #8ABEB7;
$blue: #81A2BE;
$purple: #B294BB;
$brown: #A3685A;
$accent: $blue;
$hover: hsla(0, 100%, 100%, 0.05);
$spacing: 0.7rem;
$borderwidth: 0.2rem;
6 years ago
@font-face {
font-family: "Open Sans";
font-weight: normal;
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(OpenSans-Regular.ttf) format("truetype");
6 years ago
}
@font-face {
font-family: "Open Sans";
font-weight: bold;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(OpenSans-Bold.ttf) format("truetype");
6 years ago
}
html, body {
margin: 0;
padding: 0;
background: $bg;
color: white;
font-family: "Open Sans";
font-size: 110%;
line-height: 1em;
6 years ago
height: 100vh;
width: 100vw;
position: absolute;
6 years ago
}
.list {
background: $bg0;
}
.roomListItem {
background: $bg0;
&:hover {
background: $bg1;
}
&.active {
background: $bg1;
}
}
6 years ago
.chat, .info, .input, .sidebar .filter {
background: $bg1;
6 years ago
border-color: $bg1;
}
.input, .info {
background: $bg2;
}
6 years ago
input {
// override gtk styling
font-family: "Open Sans", sans-serif;
}
body {
height: 100vh;
display: flex;
}
.loginwrapper {
margin-top: -15rem;
display: flex;
justify-content: center;
flex-direction: column;
input, label, button, span {
font-size: 140%;
}
img {
height: 15rem;
width: 15rem;
text-align: center;
align-self: center;
}
}
.errorMessage {
color: $red;
font-size: 140%;
}
.login {
align-self: center;
display: inline-grid;
grid-template-columns: 1fr 1fr;
$grey: #999;
label, input, button, span {
margin: 0.3em;
padding: 0.3em;
line-height: 140%;
}
label {
background: $blue;
justify-self: left;
}
label.inactive {
background: $grey;
}
label.error {
background: $red;
& ~ input, & ~ span {
border-color: $red;
}
}
label.validated {
background: $green;
& ~ input, & ~ span {
border-color: $green;
}
}
span {
display: inline-block;
border: 0.05rem solid $grey;
}
input {
border: 0.1rem solid $blue;
background: transparent;
color: white;
}
button {
grid-column-start: 2;
background: $blue;
color: white;
justify-self: right;
border: none;
}
}
6 years ago
#root {
height: 100%;
width: 100%;
position: relative;
display: grid;
box-sizing: border-box;
//grid-template-columns: 15% 85%;
6 years ago
justify-content: center;
}
.sidebar, .main {
6 years ago
position: relative;
box-sizing: border-box;
height: calc(100% - 2*$spacing);
width: calc(100% - 2*$spacing);
overflow-y: auto;
margin: $spacing;
display: flex;
flex-direction: column;
& > div:nth-child(2) { // Room list & Chat
flex: 1 1 auto;
overflow-y: auto;
}
}
.sidebar {
margin-right: 0;
flex: 0 0 15vw;
max-width: 15vw;
.filter {
border: none;
border-bottom: $borderwidth solid transparent;
width: 100%;
box-sizing: border-box;
padding: $spacing;
color: white;
font-size: 1rem;
margin: 0;
font-weight: bold;
}
}
6 years ago
.main {
flex: 1 1 auto;
}
.list {
div {
cursor: pointer;
}
}
.roomListItem {
6 years ago
height: 2rem + 2.5 * $spacing;
display: grid;
grid-template-columns: 4.2rem auto;
align-items: center;
width: 100%;
box-sizing: border-box;
6 years ago
transition: 0.2s;
&.active {
#avatar, #name {
transition: 0.2s;
}
#avatar {
border: 3px solid $accent;
transform: rotate(-5deg);
}
#name {
color: $accent;
font-weight: bold;
}
}
#avatar {
box-sizing: border-box;
justify-self: center;
height: calc(100% - 0.5rem);
object-fit: cover;
border: 3px solid lighten($bg0, 10);
border-radius: 0.4rem;
}
#name {
font-size: 1rem;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
padding: $spacing;
padding-left: 0;
}
}
.info {
padding: $spacing;
color: $accent;
font-size: 1rem;
font-weight: bold;
border-bottom: $borderwidth solid transparent;
box-sizing: border-box;
}
.chat {
padding: 0 $spacing;
box-sizing: border-box;
6 years ago
word-wrap: anywhere;
.events {
display: flex;
flex-direction: column;
justify-content: flex-end;
min-height: 100%;
.eventGroup {
padding-top: $spacing;
display: grid;
grid-template-columns: 3rem auto;
grid-template-areas: "avatar content";
margin-bottom: $spacing/2;
#avatar {
height: 3rem;
width: 3rem;
object-fit: cover;
box-sizing: border-box;
object-fit: cover;
6 years ago
border: 0.2rem solid lighten($bg0, 10);
position: sticky;
top: $spacing;
//align-self: flex-end;
//bottom: $spacing;
}
.col {
grid-area: content;
padding: 0 $spacing/2;
.user {
font-weight: bold;
6 years ago
padding-left: $spacing/2;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
}
.reply + .event {
margin-bottom: $spacing;
}
.event {
6 years ago
padding: $spacing/8 $spacing/2;
.reply {
border-left: $borderwidth solid $blue;
padding-left: 1/2 * $spacing;
margin-top: $spacing/2;
.user {
padding: 0;
}
}
6 years ago
&:nth-child(2) .reply {
margin-top: 0;
}
.body {
padding: $spacing/4 0;
white-space: pre-wrap;
img {
max-height: 40vh;
max-width: 90%;
object-fit: contain;
}
}
6 years ago
code {
font-size: 1rem
}
//border: 1px solid red;
&:hover {
border-radius: 0.1rem;
background: $hover;
transition: 0.1s;
6 years ago
}
& .local {
color: $bg4;
}
}
}
}
}
}
.input {
display: flex;
flex-direction: column;
border-top: $borderwidth solid transparent;
.replyEvent, .imgPreview {
border-bottom: $borderwidth/2 solid $bg3;
padding: $spacing/2 $spacing;
max-width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.imgPreview {
object-fit: cover;
display: flex;
}
.imgPreview div {
height: 5rem;
width: 5rem;
object-fit: cover;
margin: 2px;
margin-right: $spacing;
position: relative;
img {
height: 5rem;
width: 5rem;
object-fit: cover;
}
span {
position: absolute;
top: 2px;
right: 2px;
}
}
.fileUpload {
input {
display: none;
}
}
.content {
display: flex;
textarea {
background: transparent;
box-sizing: border-box;
flex: 1 1 auto;
padding: $spacing;
font-size: 1.2rem;
border: none;
resize: none;
overflow: hidden;
overflow-y: auto;
outline: none;
max-height: 150px;
}
.fileUpload {
flex: 0 0 auto;
display: inline-block;
margin: $spacing;
align-self: center;
cursor: pointer;
}
}
}
.noselect {
-moz-user-select: -moz-none;
-khtml-user-select: none;
-webkit-user-select: none;
-o-user-select: none;
user-select: none;
}
.fg-palet-red {
color: $red;
}
.fg-palet-green {
color: $green;
}
.fg-palet-yellow {
color: $yellow;
}
.fg-palet-blue {
color: $blue;
}
.fg-palet-purple {
color: $purple;
}
.fg-palet-cyan {
color: $cyan;
}