From ab7e050066259333aa3945bf5b03fed1c69bfdd4 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 29 May 2023 19:41:21 +0200 Subject: [PATCH] Feature/extend footer by navigation (#2020) * Extend footer * Update changelog --- CHANGELOG.md | 1 + apps/client/src/app/app.component.html | 109 ++++++++++++++++-- apps/client/src/app/app.component.scss | 14 ++- apps/client/src/app/app.component.ts | 15 ++- apps/client/src/app/app.module.ts | 2 + .../src/app/pages/about/about-page.html | 2 +- 6 files changed, 124 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d05a19a0..088fb57d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Extended the footer by a navigation - Extended the testimonial section on the landing page - Added localized meta descriptions - Added support for localized routes in Spanish (`es`) diff --git a/apps/client/src/app/app.component.html b/apps/client/src/app/app.component.html index 66f9ce1ab..1bb77c7cc 100644 --- a/apps/client/src/app/app.component.html +++ b/apps/client/src/app/app.component.html @@ -44,19 +44,106 @@ diff --git a/apps/client/src/app/app.component.scss b/apps/client/src/app/app.component.scss index 20e455ccd..0c0828880 100644 --- a/apps/client/src/app/app.component.scss +++ b/apps/client/src/app/app.component.scss @@ -4,6 +4,11 @@ display: block; min-height: 100vh; + footer { + background-color: rgba(var(--palette-foreground-text), 0.05); + font-size: 90%; + } + main { min-height: 100vh; padding-top: 5rem; @@ -25,14 +30,13 @@ } } } - - .footer { - height: 5rem; - line-height: 1; - } } :host-context(.is-dark-theme) { + footer { + background-color: rgba(var(--palette-foreground-text-dark), 0.05); + } + main { .info-message-container { .info-message { diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts index 2fc84b6aa..2793eccf4 100644 --- a/apps/client/src/app/app.component.ts +++ b/apps/client/src/app/app.component.ts @@ -32,6 +32,8 @@ export class AppComponent implements OnDestroy, OnInit { public currentRoute: string; public currentYear = new Date().getFullYear(); public deviceType: string; + public hasPermissionForBlog: boolean; + public hasPermissionForSubscription: boolean; public info: InfoItem; public pageTitle: string; public user: User; @@ -55,6 +57,17 @@ export class AppComponent implements OnDestroy, OnInit { public ngOnInit() { this.deviceType = this.deviceService.getDeviceInfo().deviceType; + this.info = this.dataService.fetchInfo(); + + this.hasPermissionForBlog = hasPermission( + this.info?.globalPermissions, + permissions.enableBlog + ); + + this.hasPermissionForSubscription = hasPermission( + this.info?.globalPermissions, + permissions.enableSubscription + ); this.router.events .pipe(filter((event) => event instanceof NavigationEnd)) @@ -64,8 +77,6 @@ export class AppComponent implements OnDestroy, OnInit { const urlSegments = urlSegmentGroup.segments; this.currentRoute = urlSegments[0].path; - this.info = this.dataService.fetchInfo(); - if (this.deviceType === 'mobile') { setTimeout(() => { const index = this.title.getTitle().indexOf('–'); diff --git a/apps/client/src/app/app.module.ts b/apps/client/src/app/app.module.ts index 7b26139c3..a5f0d755c 100644 --- a/apps/client/src/app/app.module.ts +++ b/apps/client/src/app/app.module.ts @@ -14,6 +14,7 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { ServiceWorkerModule } from '@angular/service-worker'; +import { GfLogoModule } from '@ghostfolio/ui/logo'; import { MarkdownModule } from 'ngx-markdown'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { NgxStripeModule, STRIPE_PUBLISHABLE_KEY } from 'ngx-stripe'; @@ -40,6 +41,7 @@ export function NgxStripeFactory(): string { BrowserAnimationsModule, BrowserModule, GfHeaderModule, + GfLogoModule, GfSubscriptionInterstitialDialogModule, HttpClientModule, MarkdownModule.forRoot(), diff --git a/apps/client/src/app/pages/about/about-page.html b/apps/client/src/app/pages/about/about-page.html index 6b19aba77..6030ce0e4 100644 --- a/apps/client/src/app/pages/about/about-page.html +++ b/apps/client/src/app/pages/about/about-page.html @@ -40,7 +40,7 @@ Check the system status at - status.ghostfol.io.