From 60c35932f6a14cfe83bb0e54407427cce70171ea Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 25 Mar 2021 13:42:55 +0100 Subject: Redesign channel page --- client/src/sass/application.scss | 25 +++++++++++++---- client/src/sass/include/_mixins.scss | 50 +++++++++++++++++++++++++++++++-- client/src/sass/include/_variables.scss | 7 ++++- 3 files changed, 73 insertions(+), 9 deletions(-) (limited to 'client/src/sass') diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss index a0009eecc..0a92afef3 100644 --- a/client/src/sass/application.scss +++ b/client/src/sass/application.scss @@ -36,7 +36,9 @@ body { --menuBackgroundColor: #{$menu-background}; --menuForegroundColor: #{$menu-color}; + --submenuColor: #{$sub-menu-color}; + --channelBackgroundColor: #{$channel-background-color}; --inputForegroundColor: #{$input-foreground-color}; --inputBackgroundColor: #{$input-background-color}; @@ -277,11 +279,6 @@ my-input-toggle-hidden ::ng-deep input { font-weight: bold; } -@keyframes spin { - from { transform: scale(1) rotate(0deg);} - to { transform: scale(1) rotate(360deg);} -} - // In tables, don't have a hover different background table { .action-button-edit, .action-button-delete { @@ -468,3 +465,21 @@ ngx-loading-bar { } } } + +// Utils + +.peertube-button { + @include peertube-button; +} + +.peertube-button-link { + @include peertube-button-link; +} + +.orange-button { + @include orange-button; +} + +.orange-button-inverted { + @include orange-button-inverted; +} diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss index cf5ac8fd8..82c60a59d 100644 --- a/client/src/sass/include/_mixins.scss +++ b/client/src/sass/include/_mixins.scss @@ -31,9 +31,19 @@ text-overflow: ellipsis; } -@mixin prefix($property, $parameters...) { - @each $prefix in -webkit-, -moz-, -ms-, -o-, "" { - #{$prefix}#{$property}: $parameters; +@mixin fade-text ($fade-after, $background-color) { + position: relative; + overflow: hidden; + + &:after { + content: ''; + pointer-events: none; + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + background: linear-gradient(transparent $fade-after, $background-color); } } @@ -138,6 +148,33 @@ } } +@mixin orange-button-inverted { + @include button-focus(pvar(--mainColorLightest)); + + border: 2px solid pvar(--mainColor); + font-weight: $font-regular; + + &, &:active, &:focus { + color: pvar(--mainColor); + background-color: pvar(--mainBackgroundColor); + } + + &:hover { + color: pvar(--mainColor); + background-color: pvar(--mainColorLightest); + } + + &[disabled], &.disabled { + cursor: default; + color: pvar(--mainColor); + background-color: #C6C6C6; + } + + my-global-icon { + @include apply-svg-color(pvar(--mainColor)) + } +} + @mixin tertiary-button { @include button-focus($grey-button-outline-color); @@ -509,6 +546,13 @@ min-height: $size; } +@mixin channel-avatar ($size) { + width: $size; + height: $size; + min-width: $size; + min-height: $size; +} + @mixin chevron ($size, $border-width) { border-style: solid; border-width: $border-width $border-width 0 0; diff --git a/client/src/sass/include/_variables.scss b/client/src/sass/include/_variables.scss index c8316473d..bcd28215b 100644 --- a/client/src/sass/include/_variables.scss +++ b/client/src/sass/include/_variables.scss @@ -16,9 +16,10 @@ $grey-foreground-hover-color: #303030; $grey-button-outline-color: scale-color($grey-foreground-color, $alpha: -95%); $main-color: hsl(24, 90%, 50%); -$main-hover-color: lighten($main-color, 5%); $main-color-lighter: lighten($main-color, 10%); $main-color-lightest: lighten($main-color, 40%); +$main-hover-color: lighten($main-color, 5%); + $secondary-color: hsl(187, 77%, 34%); $support-button: inherit; @@ -50,6 +51,8 @@ $menu-lateral-padding: 26px; $sub-menu-color: #F7F7F7; $sub-menu-height: 81px; +$channel-background-color: #f6ede8; + $footer-height: 30px; $footer-margin: 30px; @@ -98,7 +101,9 @@ $variables: ( --menuBackgroundColor: var(--menuBackgroundColor), --menuForegroundColor: var(--menuForegroundColor), + --submenuColor: var(--submenuColor), + --channelBackgroundColor: var(--channelBackgroundColor), --inputForegroundColor: var(--inputForegroundColor), --inputBackgroundColor: var(--inputBackgroundColor), -- cgit v1.2.3