Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Add background to lateral menu

Chocobozzz21fe5db1d492
diff --git a/client/src/app/shared/shared-main/menu/lateral-menu-background.svg b/client/src/app/shared/shared-main/menu/lateral-menu-background.svg
new file mode 100644
index 0000000000..94d4cc3ae1
--- /dev/null
+++ b/client/src/app/shared/shared-main/menu/lateral-menu-background.svg
@@ -0,0 +1,54 @@
+<svg width="216" height="271" viewBox="0 0 216 271" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 23.1156V-23.002L25.1602 0.0568237L-10.2515 23.1156Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 69.2328V23.1152L25.1602 46.174L-10.2515 69.2328Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M25.1618 46.1742V0.0566406L59.75 23.1154L25.1618 46.1742Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M24.75 98V46L59.75 72L24.75 98Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 23.1136V-23.0039L95.1611 0.0548706L59.7494 23.1136Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 69.2328V23.1152L95.1611 46.174L59.7494 69.2328Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M95.1638 46.1742V0.0566406L129.752 23.1154L95.1638 46.1742Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 23.1136V-23.0039L165.162 0.0548706L129.75 23.1136Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 69.2328V23.1152L165.162 46.174L129.75 69.2328Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M165.161 46.1742V0.0566406L199.749 23.1154L165.161 46.1742Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 23.1156V-23.002L235.162 0.0568237L199.75 23.1156Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 69.2347V23.1172L235.162 46.176L199.75 69.2347Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 121.121V75.0039L25.1602 98.0627L-10.2515 121.121Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 167.239V121.121L25.1602 144.18L-10.2515 167.239Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M25.1618 144.18V98.0625L59.75 121.121L25.1618 144.18Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 121.121V75.0039L95.1611 98.0627L59.7494 121.121Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 167.239V121.121L95.1611 144.18L59.7494 167.239Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M95.1638 144.18V98.0625L129.752 121.121L95.1638 144.18Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 121.121V75.0039L165.162 98.0627L129.75 121.121Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 167.239V121.121L165.162 144.18L129.75 167.239Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M165.161 144.18V98.0625L199.749 121.121L165.161 144.18Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 121.121V75.0039L235.162 98.0627L199.75 121.121Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 167.239V121.121L235.162 144.18L199.75 167.239Z" fill="currentColor" />
+
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 121.116V74.998L25.1602 98.0568L-10.2515 121.116Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 167.233V121.115L25.1602 144.174L-10.2515 167.233Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M25.1618 144.174V98.0566L59.75 121.115L25.1618 144.174Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 121.114V74.9961L95.1611 98.0549L59.7494 121.114Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 167.233V121.115L95.1611 144.174L59.7494 167.233Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M95.1638 144.174V98.0566L129.752 121.115L95.1638 144.174Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 121.114V74.9961L165.162 98.0549L129.75 121.114Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 167.233V121.115L165.162 144.174L129.75 167.233Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M165.161 144.174V98.0566L199.749 121.115L165.161 144.174Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 121.116V74.998L235.162 98.0568L199.75 121.116Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 167.235V121.117L235.162 144.176L199.75 167.235Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 219.121V173.004L25.1602 196.063L-10.2515 219.121Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 265.239V219.121L25.1602 242.18L-10.2515 265.239Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M25.1618 242.18V196.062L59.75 219.121L25.1618 242.18Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 219.121V173.004L95.1611 196.063L59.7494 219.121Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 265.239V219.121L95.1611 242.18L59.7494 265.239Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M95.1638 242.18V196.062L129.752 219.121L95.1638 242.18Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 219.121V173.004L165.162 196.063L129.75 219.121Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 265.239V219.121L165.162 242.18L129.75 265.239Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M165.161 242.18V196.062L199.749 219.121L165.161 242.18Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 219.121V173.004L235.162 196.063L199.75 219.121Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 265.239V219.121L235.162 242.18L199.75 265.239Z" fill="currentColor" />
+
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M95.75 98V46L130.75 72L95.75 98Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M164.75 98V46L199.75 72L164.75 98Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M95.75 199V147L130.75 173L95.75 199Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M26.75 199V147L61.75 173L26.75 199Z" fill="currentColor" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M164.75 199V147L199.75 173L164.75 199Z" fill="currentColor" />
+ </svg>
diff --git a/client/src/app/shared/shared-main/menu/lateral-menu.component.html b/client/src/app/shared/shared-main/menu/lateral-menu.component.html
index d52d1d3ee8..7d3e6e0b3f 100644
--- a/client/src/app/shared/shared-main/menu/lateral-menu.component.html
+++ b/client/src/app/shared/shared-main/menu/lateral-menu.component.html
@@ -1,4 +1,7 @@
<div class="menu">
+
+ <div class="svg-container" aria-hidden="true" [innerHTML]="lateralMenuBackground"></div>
+
<h1>{{ config().title }}</h1>
<ul class="ul-unstyle">
@@ -26,7 +29,13 @@
<span class="label" *ngTemplateOutlet="label"></span>
</my-unavailable-menu-entry>
} @else {
- <a [routerLink]="entry.routerLink" [queryParams]="globalQueryParams()" queryParamsHandling="merge" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }">
+ <a
+ [routerLink]="entry.routerLink"
+ [queryParams]="globalQueryParams()"
+ queryParamsHandling="merge"
+ routerLinkActive="active"
+ [routerLinkActiveOptions]="{ exact: true }"
+ >
<ng-container *ngTemplateOutlet="icon"></ng-container>
<ng-container *ngTemplateOutlet="label"></ng-container>
</a>
diff --git a/client/src/app/shared/shared-main/menu/lateral-menu.component.scss b/client/src/app/shared/shared-main/menu/lateral-menu.component.scss
index 4130a56970..cd96e0b372 100644
--- a/client/src/app/shared/shared-main/menu/lateral-menu.component.scss
+++ b/client/src/app/shared/shared-main/menu/lateral-menu.component.scss
@@ -2,6 +2,28 @@
@use "_mixins" as *;
@use "_form-mixins" as *;
+menu,
+.menu-placeholder,
+h1,
+ul {
+ position: relative;
+ z-index: 1;
+}
+
+.svg-container {
+ position: absolute;
+ top: 0;
+ opacity: 0.4;
+ z-index: 0;
+
+ ::ng-deep svg {
+ color: pvar(--bg-secondary-450);
+
+ -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 100%);
+ mask-image: linear-gradient(to bottom, #000 25%, transparent 100%);
+ }
+}
+
h1 {
color: pvar(--fg-200);
font-weight: $font-bold;
diff --git a/client/src/app/shared/shared-main/menu/lateral-menu.component.ts b/client/src/app/shared/shared-main/menu/lateral-menu.component.ts
index fb27e5c364..bc4d41e75c 100644
--- a/client/src/app/shared/shared-main/menu/lateral-menu.component.ts
+++ b/client/src/app/shared/shared-main/menu/lateral-menu.component.ts
@@ -1,6 +1,7 @@
import { CommonModule } from '@angular/common'
-import { Component, input } from '@angular/core'
+import { Component, inject, input } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
+import { DomSanitizer } from '@angular/platform-browser'
import { RouterModule } from '@angular/router'
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'
import { GlobalIconComponent, GlobalIconName } from '../../shared-icons/global-icon.component'
@@ -40,9 +41,13 @@ export type LateralMenuConfig = {
]
})
export class LateralMenuComponent {
+ private domSanitizer = inject(DomSanitizer)
+
config = input.required<LateralMenuConfig>()
globalQueryParams = input<Record<string, any>>()
+ lateralMenuBackground = this.domSanitizer.bypassSecurityTrustHtml(require('./lateral-menu-background.svg'))
+
isDisplayed (entry: LateralMenuLinkEntry) {
if (!entry.isDisplayed) return true