Misc cleanup, more definitions of color with scss variables and added a lot of color transitions for when switching theme color.

This commit is contained in:
2019-10-22 23:07:21 +02:00
parent f8c284cd71
commit c454d9c9e0
14 changed files with 68 additions and 61 deletions

View File

@@ -97,10 +97,14 @@ body{
line-height: 1.6; line-height: 1.6;
background: $background-color; background: $background-color;
color: $text-color; color: $text-color;
transition: background-color .5s ease, color .5s ease;
&.hidden{ &.hidden{
overflow: hidden; overflow: hidden;
} }
} }
h1,h2,h3 {
transition: color .5s ease;
}
a:any-link { a:any-link {
color: inherit; color: inherit;
} }

View File

@@ -26,7 +26,6 @@ export default {
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -47,6 +46,7 @@ header {
@include tablet-min { @include tablet-min {
height: 284px; height: 284px;
} }
&:before { &:before {
content: ""; content: "";
position: absolute; position: absolute;
@@ -54,12 +54,14 @@ header {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: $background-70; background-color: $background-70;
transition: background-color .5s ease;
} }
.container { .container {
text-align: center; text-align: center;
position: relative; position: relative;
transition: color .5s ease;
} }
.title { .title {
@@ -69,6 +71,7 @@ header {
letter-spacing: 0.5px; letter-spacing: 0.5px;
color: $text-color; color: $text-color;
margin: 0; margin: 0;
@include tablet-min{ @include tablet-min{
font-size: 28px; font-size: 28px;
} }
@@ -80,6 +83,7 @@ header {
font-weight: 300; font-weight: 300;
color: $text-color-70; color: $text-color-70;
margin: 5px 0; margin: 5px 0;
@include tablet-min{ @include tablet-min{
font-size: 16px; font-size: 16px;
} }

View File

@@ -23,7 +23,7 @@ export default {
img: img img: img
}, },
data(){ data(){
return{ return {
noImage: false noImage: false
} }
}, },
@@ -36,7 +36,7 @@ export default {
this.noImage = true this.noImage = true
} }
}, },
openMoviePopup(id, type){ openMoviePopup(id, type) {
this.$popup.open(id, type) this.$popup.open(id, type)
} }
} }
@@ -46,10 +46,12 @@ export default {
<style lang="scss"> <style lang="scss">
@import "./src/scss/variables"; @import "./src/scss/variables";
@import "./src/scss/media-queries"; @import "./src/scss/media-queries";
.movies-item { .movies-item {
padding: 10px; padding: 10px;
width: 50%; width: 50%;
background-color: $background-color; background-color: $background-color;
transition: background-color 0.5s ease;
@include tablet-min{ @include tablet-min{
padding: 15px; padding: 15px;

View File

@@ -6,16 +6,15 @@
<use xlink:href="#svgLogo"></use> <use xlink:href="#svgLogo"></use>
</svg> </svg>
</router-link> </router-link>
<div class="nav__hamburger" @click="toggleNav"> <div class="nav__hamburger" @click="toggleNav">
<div class="bar"></div> <div v-for="_ in 3" class="bar"></div>
<div class="bar"></div>
<div class="bar"></div>
</div> </div>
<ul class="nav__list"> <ul class="nav__list">
<li class="nav__item" v-for="item in listTypes"> <li class="nav__item" v-for="item in listTypes">
<router-link class="nav__link" :to="'/list/' + item.route"> <router-link class="nav__link" :to="'/list/' + item.route">
<div class="nav__link-wrap"> <div class="nav__link-wrap">
<!-- <img :src="item.icon" class="nav__link-icon"> -->
<svg class="nav__link-icon"> <svg class="nav__link-icon">
<use :xlink:href="'#icon_' + item.route"></use> <use :xlink:href="'#icon_' + item.route"></use>
</svg> </svg>
@@ -23,8 +22,9 @@
</div> </div>
</router-link> </router-link>
</li> </li>
<li class="nav__item nav__item--profile"> <li class="nav__item nav__item--profile">
<router-link class="nav__link nav__link--profile" :to="{name: 'signin'}" v-if="!userLoggedIn"> <router-link class="nav__link nav__link--profile" :to="{name: 'signin'}" v-if="!userLoggedIn">
<div class="nav__link-wrap"> <div class="nav__link-wrap">
<svg class="nav__link-icon"> <svg class="nav__link-icon">
<use xlink:href="#iconLogin"></use> <use xlink:href="#iconLogin"></use>
@@ -32,7 +32,8 @@
<span class="nav__link-title">Sign in</span> <span class="nav__link-title">Sign in</span>
</div> </div>
</router-link> </router-link>
<router-link class="nav__link nav__link--profile" :to="{name: 'profile'}" v-if="userLoggedIn">
<router-link class="nav__link nav__link--profile" :to="{name: 'profile'}" v-if="userLoggedIn">
<div class="nav__link-wrap"> <div class="nav__link-wrap">
<svg class="nav__link-icon"> <svg class="nav__link-icon">
<use xlink:href="#iconLogin"></use> <use xlink:href="#iconLogin"></use>
@@ -43,6 +44,7 @@
</li> </li>
</ul> </ul>
</nav> </nav>
<div class="spacer"></div> <div class="spacer"></div>
</div> </div>
</template> </template>
@@ -67,6 +69,7 @@ export default {
} }
}, },
created(){ created(){
// TODO move this to state manager
eventHub.$on('setUserStatus', this.setUserStatus); eventHub.$on('setUserStatus', this.setUserStatus);
} }
} }
@@ -80,14 +83,15 @@ export default {
width: 30px; width: 30px;
} }
.spacer { .spacer {
@include mobile-only { @include mobile-only {
width: 100%; width: 100%;
height: $header-size; height: $header-size;
} }
} }
.nav { .nav {
transition: background .5s ease;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
@@ -201,7 +205,6 @@ export default {
opacity: 0; opacity: 0;
visibility: hidden; visibility: hidden;
background-color: $background-95; background-color: $background-95;
transition: all 0.5s ease;
text-align: left; text-align: left;
&--active{ &--active{
opacity: 1; opacity: 1;
@@ -218,6 +221,7 @@ export default {
} }
} }
&__item { &__item {
transition: background .5s ease, color .5s ease, border .5s ease;
background-color: $background-color-secondary; background-color: $background-color-secondary;
color: $text-color-70; color: $text-color-70;
@@ -264,7 +268,6 @@ export default {
text-decoration: none; text-decoration: none;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.5px; letter-spacing: 0.5px;
transition: color 0.5s ease, background 0.5s ease;
position: relative; position: relative;
cursor: pointer; cursor: pointer;
&-wrap { &-wrap {
@@ -284,13 +287,13 @@ export default {
&--profile { &--profile {
width: 75px; width: 75px;
height: 75px; height: 75px;
background-color: $background-color-secondary;
} }
} }
&-icon { &-icon {
width: 20px; width: 20px;
height: 20px; height: 20px;
fill: $text-color-70; fill: $text-color-70;
transition: fill 0.5s ease;
@include tablet-min { @include tablet-min {
width: 20px; width: 20px;
height: 20px; height: 20px;

View File

@@ -73,16 +73,24 @@ export default {
} }
}, },
created(){ created(){
document.title = 'Profile' + storage.pageTitlePostfix;
storage.backTitle = document.title;
if(!localStorage.getItem('token')){ if(!localStorage.getItem('token')){
this.userLoggedIn = false; this.userLoggedIn = false;
} else { } else {
this.userLoggedIn = true; this.userLoggedIn = true;
this.getUserInfo(); this.getUserInfo();
getUserRequests()
.then(results => {
this.results = results.results
this.totalResults = results.total_results
})
getEmoji() getEmoji()
.then(resp => this.emoji = resp.data.emoji ) .then(resp => {
const { emoji } = resp
this.emoji = emoji
store.dispatch('documentTitle/updateEmoji', emoji)
})
} }
} }
} }

View File

@@ -93,10 +93,6 @@ export default {
eventHub.$emit('setUserStatus'); eventHub.$emit('setUserStatus');
this.$router.push({ name: 'home' }); this.$router.push({ name: 'home' });
} }
},
created(){
document.title = 'Profile' + storage.pageTitlePostfix;
storage.backTitle = document.title;
} }
} }
</script> </script>

View File

@@ -228,6 +228,7 @@ export default {
position: fixed; position: fixed;
flex-wrap: wrap; flex-wrap: wrap;
z-index: 5; z-index: 5;
border: 0;
background-color: $background-color-secondary; background-color: $background-color-secondary;
// TODO check if this is for mobile // TODO check if this is for mobile
@@ -246,10 +247,13 @@ export default {
width: 100%; width: 100%;
padding: 13px 20px 13px 45px; padding: 13px 20px 13px 45px;
outline: none; outline: none;
margin: 0;
border: 0; border: 0;
background-color: transparent; background-color: $background-color-secondary;
font-weight: 300; font-weight: 300;
font-size: 19px; font-size: 19px;
color: $text-color;
transition: background-color .5s ease, color .5s ease;
@include tablet-min { @include tablet-min {
padding: 13px 30px 13px 60px; padding: 13px 30px 13px 60px;

View File

@@ -53,15 +53,15 @@ export default {
data(){ data(){
return{ return{
userLoggedIn: '', userLoggedIn: '',
plexUsername: undefined, messages: [],
plexPassword: undefined, plexUsername: null,
newPass: undefined, plexPassword: null,
newPassConfirm: undefined newPassword: null,
newPasswordRepeat: null
} }
}, },
methods: { methods: {
setValue(l, t) { setValue(l, t) {
console.log('l, t', l, t)
this[l] = t this[l] = t
}, },
changePassword() { changePassword() {
@@ -82,8 +82,6 @@ export default {
} }
}, },
created(){ created(){
document.title = 'Settings' + storage.pageTitlePostfix;
storage.backTitle = document.title;
if (localStorage.getItem('token')){ if (localStorage.getItem('token')){
this.userLoggedIn = true this.userLoggedIn = true
} }
@@ -94,6 +92,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./src/scss/variables"; @import "./src/scss/variables";
@import "./src/scss/media-queries"; @import "./src/scss/media-queries";
a { a {
text-decoration: none; text-decoration: none;
} }

View File

@@ -29,8 +29,8 @@ export default {
data(){ data(){
return{ return{
messages: [], messages: [],
username: undefined, username: null,
password: undefined password: null
} }
}, },
methods: { methods: {

View File

@@ -1,5 +1,5 @@
<template> <template>
<div v-if="show"> <div v-if="show" class="container">
<h2 class="torrentHeader-text">Searching for: {{ editedSearchQuery || query }}</h2> <h2 class="torrentHeader-text">Searching for: {{ editedSearchQuery || query }}</h2>
<!-- <div class="torrentHeader"> <!-- <div class="torrentHeader">
<span class="torrentHeader-text">Searching for:&nbsp;</span> <span class="torrentHeader-text">Searching for:&nbsp;</span>

View File

@@ -30,7 +30,7 @@
height: 35px; height: 35px;
width: 35px; width: 35px;
&:after { &:after {
border: 7px solid rgba($green, 0.9); border: 7px solid $green-90;
border-radius: 50%; border-radius: 50%;
content: ''; content: '';
left: 8px; left: 8px;

View File

@@ -39,7 +39,7 @@ export default {
color: $text-color; color: $text-color;
background: $background-color-secondary; background: $background-color-secondary;
outline: none; outline: none;
transition: background 0.5s ease, color 0.5s ease; transition: background 0.5s ease, color 0.5s ease, border-color .5s ease;
@include tablet-min{ @include tablet-min{
font-size: 12px; font-size: 12px;

View File

@@ -68,7 +68,6 @@ export default {
width: 100%; width: 100%;
max-width: 35rem; max-width: 35rem;
padding: 10px 10px 10px 45px; padding: 10px 10px 10px 45px;
// padding: 15px 10px 15px 45px;
outline: none; outline: none;
background-color: $background-color-secondary; background-color: $background-color-secondary;
color: $text-color; color: $text-color;
@@ -77,9 +76,8 @@ export default {
border: 1px solid $text-color-50; border: 1px solid $text-color-50;
margin: 0; margin: 0;
margin-left: -2.2rem !important; margin-left: -2.2rem !important;
// margin-bottom: 1rem;
z-index: 3; z-index: 3;
transition: border-color .5s ease; transition: color .5s ease, background-color .5s ease, border .5s ease;
border-radius: 0; border-radius: 0;
-webkit-appearance: none; -webkit-appearance: none;

View File

@@ -54,7 +54,7 @@ export default {
transition: opacity .4s; transition: opacity .4s;
} }
.fade-leave-active { .fade-leave-active {
transition: opacitiy .1s; transition: opacity .1s;
} }
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ { .fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0; opacity: 0;
@@ -63,31 +63,31 @@ export default {
.message { .message {
width: 100%; width: 100%;
max-width: 35rem; max-width: 35rem;
height: 80px; height: 75px;
display: flex; display: flex;
margin-top: 1rem; margin-top: 1rem;
margin-bottom: 1rem; margin-bottom: 1rem;
// padding-bottom: 1rem; color: $text-color-70;
// background-color: red;
&:first-of-type {
background-color: navajowhite;
}
> div { > div {
margin: 8px 24px; margin: 6px 24px;
width: 100%; width: 100%;
} }
h2 { h2 {
font-weight: 300; font-weight: 300;
letter-spacing: 0.25px;
margin: 0; margin: 0;
font-size: 1.3rem;
color: $text-color;
transition: color .5s ease;
} }
span { span {
font-weight: 300; font-weight: 300;
color: $text-color-70;
transition: color .5s ease;
} }
.pinstripe { .pinstripe {
@@ -112,16 +112,15 @@ export default {
padding: 0; padding: 0;
margin-top: 0.5rem; margin-top: 0.5rem;
margin-right: 0.5rem; margin-right: 0.5rem;
color: $text-color-70;
transition: color .5s ease; transition: color .5s ease;
color: $white-80;
&:hover { &:hover {
color: $white; color: $text-color;
} }
} }
&.success { &.success {
color: $color-error-text;
background-color: $color-success; background-color: $color-success;
.pinstripe { .pinstripe {
@@ -130,7 +129,6 @@ export default {
} }
&.error { &.error {
color: $color-error-text;
background-color: $color-error; background-color: $color-error;
.pinstripe { .pinstripe {
@@ -139,19 +137,10 @@ export default {
} }
&.warning { &.warning {
color: $black;
background-color: $color-warning; background-color: $color-warning;
.dismiss {
color: $black-80;
&:hover {
color: $black;
}
}
.pinstripe { .pinstripe {
background-color: $color-warning-light; background-color: $color-warning-highlight;
} }
} }
} }