display: inline-block;
text-align: center;
- color: #000;
+ color: var(--mainForegroundColor);
margin: 10px 30px;
img {
.inner-form-title {
text-transform: uppercase;
- color: $orange-color;
+ color: var(--mainColor);
font-weight: $font-bold;
font-size: 13px;
margin-top: 30px;
width: fit-content;
display: flex;
align-items: baseline;
- color: #000;
+ color: var(--mainForegroundColor);
.video-channel-display-name {
font-weight: $font-semibold;
width: fit-content;
display: flex;
align-items: baseline;
- color: #000;
+ color: var(--mainForegroundColor);
.video-channel-display-name {
font-weight: $font-semibold;
.video-info-name {
@include disable-default-a-behaviour;
- color: #000;
+ color: var(--mainForegroundColor);
display: block;
width: fit-content;
font-size: 16px;
</a>
</div>
- <div class="header-right">
+ <div class="header-right" [ngClass]="{ 'border-bottom': isMenuDisplayed === false }">
<my-header></my-header>
</div>
</div>
.sub-header-container {
margin-top: $header-height;
+ background-color: var(--mainBackgroundColor);
}
.header {
position: fixed;
top: 0;
width: 100%;
- background-color: $bg-color;
+ background-color: var(--mainBackgroundColor);
z-index: 1000;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
display: flex;
@include icon(24px);
&.icon-menu {
- background-image: url('../assets/images/header/menu.svg');
+ background-color: var(--mainForegroundColor);
+ mask-image: url('../assets/images/header/menu.svg');
margin: 0 18px 0 20px;
}
}
}
footer {
- border-top: 1px solid $footer-border-color;
padding: 10px 0;
font-size: 11px;
margin-top: $footer-margin;
padding-right: 40px; // For the search icon
&::placeholder {
- color: #000;
+ color: var(--inputPlaceholderColor);
}
&:focus::placeholder {
@include icon(25px);
height: 21px;
- background-image: url('../../assets/images/header/search.svg');
+ background-color: var(--mainForegroundColor);
+ mask: url('../../assets/images/header/search.svg') no-repeat 50% 50%;
// yolo
position: absolute;
}
.create-an-account, .forgot-password-button {
- color: #000;
+ color: var(--mainForegroundColor);
cursor: pointer;
&:hover {
<span class="language">
<span (click)="openLanguageChooser()" i18n-title title="Change the language" class="icon icon-language"></span>
</span>
+ <span class="color-palette">
+ <span (click)="toggleDarkTheme()" i18n-title title="Toggle dark interface" class="icon icon-moonsun"></span>
+ </span>
</div>
</menu>
</div>
}
menu {
- background-color: $black-background;
+ background-color: $menu-background;
margin: 0;
padding: 0;
height: 100%;
}
.footer {
- margin-bottom: 15px;
+ padding-bottom: 15px;
padding-left: $menu-left-padding;
- .language {
+ .language, .color-palette {
display: inline-block;
color: $menu-bottom-color;
cursor: pointer;
background-image: url('../../assets/images/menu/language.png');
}
+ &.icon-moonsun {
+ margin-left: 10px;
+ position: relative;
+ top: -1px;
+ width: 24px;
+ height: 24px;
+
+ background-image: url('../../assets/images/menu/moonsun.svg');
+ }
+
&:hover {
opacity: 1;
}
[UserRight.MANAGE_VIDEO_ABUSES]: '/admin/video-abuses',
[UserRight.MANAGE_VIDEO_BLACKLIST]: '/admin/video-blacklist'
}
+ private theme = document.querySelector('body')
+ private previousTheme = { }
constructor (
private authService: AuthService,
}
}
)
+
+ // initialise the alternative theme with dark theme colors
+ this.previousTheme['mainBackgroundColor'] = '#111111'
+ this.previousTheme['mainForegroundColor'] = '#fff'
+ this.previousTheme['submenuColor'] = 'rgb(32,32,32)'
+ this.previousTheme['inputColor'] = 'gray'
+ this.previousTheme['inputPlaceholderColor'] = '#fff'
}
isRegistrationAllowed () {
this.languageChooserModal.show()
}
+ toggleDarkTheme () {
+ // switch properties
+ this.switchProperty('mainBackgroundColor')
+ this.switchProperty('mainForegroundColor')
+ this.switchProperty('submenuColor')
+ this.switchProperty('inputColor')
+ this.switchProperty('inputPlaceholderColor')
+ }
+
+ private switchProperty (property, newValue?) {
+ const propertyOldvalue = window.getComputedStyle(this.theme).getPropertyValue('--' + property)
+ this.theme.style.setProperty('--' + property, (newValue) ? newValue : this.previousTheme[property])
+ this.previousTheme[property] = propertyOldvalue
+ }
+
private computeIsUserHasAdminAccess () {
const right = this.getFirstAdminRightAvailable()
.video-info-name {
@include disable-default-a-behaviour;
- color: #000;
+ color: var(--mainForegroundColor);
display: block;
width: fit-content;
font-size: 18px;
display: flex;
align-items: baseline;
- color: #000;
+ color: var(--mainForegroundColor);
width: fit-content;
.video-channel-display-name {
position: relative;
top: -2px;
background-image: url('../../../assets/images/global/help.svg');
- background-color: #fff;
border: none;
margin: 5px;
}
&.icon-syndication {
position: relative;
top: -2px;
- background-image: url('../../../assets/images/global/syndication.svg');
+ background-color: var(--mainForegroundColor);
+ mask-image: url('../../../assets/images/global/syndication.svg');
}
}
}
\ No newline at end of file
transition: color 0.2s;
font-size: 16px;
font-weight: $font-semibold;
- color: $fg-color;
+ color: var(--mainForegroundColor);
margin-top: 5px;
margin-bottom: 5px;
$border-type: solid;
$border-color: #EAEAEA;
-$background-color: #F7F7F7;
-
/deep/ .root-tabset.video-add-tabset {
&.hide-nav .nav {
display: none !important;
a.nav-link {
@include disable-default-a-behaviour;
- color: #000;
height: 40px !important;
padding: 0 30px !important;
font-size: 15px;
&.active {
border: $border-width $border-type $border-color;
border-bottom: none;
- background-color: $background-color !important;
+ background-color: var(--mainBackgroundColor) !important;
span {
- border-bottom: 2px solid #F1680D;
+ border-bottom: 2px solid var(--mainColor);
font-weight: $font-bold;
}
}
border: $border-width $border-type $border-color;
border-top: none;
- background-color: $background-color;
+ background-color: var(--mainBackgroundColor);
border-radius: 3px;
width: 100%;
min-height: 440px;
.comment-account {
@include disable-default-a-behaviour;
- color: #000;
+ color: var(--mainForegroundColor);
font-weight: $font-bold;
}
a {
@include disable-default-a-behaviour;
- color: #000;
+ color: var(--mainForegroundColor);
&:hover {
opacity: 0.8;
display: inline;
align-items: center;
font-size: 13px;
- color: #000;
+ color: var(--mainForegroundColor);
span:hover {
opacity: 0.8;
a.video-attribute-value {
@include disable-default-a-behaviour;
- color: #000;
+ color: var(--mainForegroundColor);
&:hover {
opacity: 0.9;
a {
@include disable-default-a-behaviour;
- color: $orange-color;
+ color: var(--mainColor);
transition: color 0.3s;
&:hover {
}
.privacy-concerns-okay {
- background-color: $orange-color;
+ background-color: var(--mainColor);
padding: 5px 8px 5px 7px;
margin-left: auto;
border-radius: 3px;
a {
@include disable-default-a-behaviour;
- color: #000;
+ color: var(--mainForegroundColor);
}
}
--- /dev/null
+<svg height="300px" width="300px" fill="#fff" xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 100 100" x="0px" y="0px"><title>Artboard 633</title><circle cx="50" cy="6" r="4"/><circle cx="50" cy="94" r="4"/><circle cx="6" cy="50" r="4"/><circle cx="94" cy="50" r="4"/><circle cx="18" cy="18" r="4"/><circle cx="82" cy="82" r="4"/><circle cx="18" cy="82" r="4"/><circle cx="82" cy="18" r="4"/><path d="M82,50A32,32,0,1,0,50,82,32,32,0,0,0,82,50ZM50,26a23.67,23.67,0,0,1,5.87.76c4.36,9.93.57,19-4.66,24.29s-14.4,9.24-24.45,4.83A23.75,23.75,0,0,1,26,50,24,24,0,0,1,50,26Zm0,48a23.94,23.94,0,0,1-18.26-8.47,29.38,29.38,0,0,0,3.74.26,30.07,30.07,0,0,0,21.41-9.11,29.82,29.82,0,0,0,8.61-25A24,24,0,0,1,50,74Z"/></svg>
\ No newline at end of file
body {
font-family: $main-fonts;
font-weight: $font-regular;
- color: #000;
+ color: var(--mainForegroundColor);
font-size: 14px;
}
}
.sub-menu {
- background-color: #F7F7F7;
+ background-color: var(--submenuColor);
width: 100%;
height: 81px;
margin-bottom: 30px;
}
.title-page {
- color: #000;
+ color: var(--mainForegroundColor);
font-size: 16px;
display: inline-block;
margin-right: 55px;
@include disable-default-a-behaviour;
&.active, &.title-page-single {
- border-bottom: 2px solid $orange-color;
+ border-bottom: 2px solid var(--mainColor);
font-weight: $font-bold;
margin-top: 30px;
margin-bottom: 25px;
}
&:hover, &:active, &:focus {
- color: #000;
+ color: var(--mainForegroundColor);
}
@media screen and (max-width: 500px) {
@include disable-default-a-behaviour;
font-size: 16px;
- color: #000;
+ color: var(--mainForegroundColor);
padding: 5px 15px;
border-radius: 0.25rem;
&.active {
font-weight: $font-semibold;
background-color: #f0f0f0;
+ color: #000;
}
}
}
}
.modal {
+ .modal-content {
+ background-color: var(--mainBackgroundColor);
+ }
+
.modal-header {
border-bottom: none;
margin-bottom: 5px;
a {
@include disable-default-a-behaviour;
- color: #000;
+ color: var(--mainForegroundColor);
}
}
&, & a {
@include disable-default-a-behaviour;
- color: #000 !important;
+ color: var(--mainForegroundColor) !important;
}
}
}
display: inline-block;
height: $button-height;
width: $width;
- background: #fff;
+ background: var(--inputColor);
border: 1px solid #C6C6C6;
border-radius: 3px;
padding-left: 15px;
padding-right: 15px;
+
+ &::placeholder {
+ color: var(--inputPlaceholderColor);
+ }
}
@mixin peertube-input-group($width) {
.input-group-text{
font-size: 14px;
+ color: gray;
}
}
@mixin orange-button {
&, &:active, &:focus {
color: #fff;
- background-color: $orange-color;
+ background-color: var(--mainColor);
}
&:hover {
color: #fff;
- background-color: $orange-hoover-color;
+ background-color: var(--mainHoverColor);
}
&[disabled], &.disabled {
width: $width;
border-radius: 3px;
overflow: hidden;
- background: #fff;
+ background: var(--inputColor);
position: relative;
font-size: 15px;
position: relative;
width: 18px;
height: 18px;
- border: $border-width solid #000;
+ border: $border-width solid var(--mainForegroundColor);
border-radius: 3px;
vertical-align: middle;
cursor: pointer;
height: 12px;
opacity: 0;
transform: rotate(45deg) scale(0);
- border-right: 2px solid #fff;
- border-bottom: 2px solid #fff;
+ border-right: 2px solid var(--mainForegroundColor);
+ border-bottom: 2px solid var(--mainForegroundColor);
}
}
&:checked + span {
border-color: transparent;
- background: $orange-color;
+ background: var(--mainColor);
animation: jelly 0.6s ease;
&:after {
@mixin in-content-small-title {
text-transform: uppercase;
- color: $orange-color;
+ color: var(--mainColor);
font-weight: $font-bold;
font-size: 13px;
}
@mixin actor-owner {
@include disable-default-a-behaviour;
- display: block;
+ display: inline-table;
font-size: 13px;
margin-top: 4px;
- color: #000;
+ color: var(--mainForegroundColor);
span:hover {
opacity: 0.8;
$orange-color: #F1680D;
$orange-hoover-color: #F97D46;
-$black-background: #000;
-$grey-background: #f6f2f2;
$bg-color: #fff;
$fg-color: #000;
$header-border-color: #e9eff6;
$search-input-width: 375px;
+$menu-background: #000;
$menu-color: #fff;
$menu-bottom-color: #C6C6C6;
$menu-width: 240px;
$menu-left-padding: 26px;
+$sub-menu-color: #F7F7F7;
+
$footer-height: 30px;
$footer-margin: 30px;
$video-thumbnail-width: 200px;
$theater-bottom-space: 85px;
+
+$input-color: $bg-color;
+$input-placeholder-color: #898989;
+
+/*** theme ***/
+
+body {
+ // now beware node-sass requires interpolation
+ // for css custom properties #{$var}
+ --mainColor: #{$orange-color};
+ --mainHoverColor: #{$orange-hoover-color};
+ --mainBackgroundColor: #{$bg-color};
+ --mainForegroundColor: #{$fg-color};
+ --submenuColor: #{$sub-menu-color};
+ --inputColor: #{$input-color};
+ --inputPlaceholderColor: #{$input-placeholder-color};
+}
+
+/*** map theme ***/
+
+// pass variables into a sass map,
+// to be warned of non-existing variables
+$variables: (
+ --mainColor: var(--mainColor),
+ --mainHoverColor: var(--mainHoverColor),
+ --mainBackgroundColor: var(--mainBackgroundColor),
+ --mainForegroundColor: var(--mainForegroundColor),
+ --submenuColor: var(--submenuColor),
+ --inputColor: var(--inputColor),
+ --inputPlaceholderColor: var(--inputPlaceholderColor)
+);
+
+/*** theme helper ***/
+
+@function var($variable) {
+ @return map-get($variables, $variable);
+}
&.ui-state-active {
&, &:hover, &:active, &:focus {
color: #fff !important;
- background-color: $orange-color !important;
+ background-color: var(--mainColor) !important;
}
}
}