diff --git a/CHANGELOG.md b/CHANGELOG.md index 85f515a72..6cd1ed09f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added an indicator for excluded accounts in the accounts table +- Added a blog post: _Black Friday 2022_ ## 1.212.0 - 11.11.2022 diff --git a/apps/api/src/app/frontend.middleware.ts b/apps/api/src/app/frontend.middleware.ts index a1ab6452c..dde9a0b32 100644 --- a/apps/api/src/app/frontend.middleware.ts +++ b/apps/api/src/app/frontend.middleware.ts @@ -53,16 +53,12 @@ export class FrontendMiddleware implements NestMiddleware { public use(req: Request, res: Response, next: NextFunction) { let featureGraphicPath = 'assets/cover.png'; - if ( - req.path === '/en/blog/2022/08/500-stars-on-github' || - req.path === '/en/blog/2022/08/500-stars-on-github/' - ) { + if (req.path.startsWith('/en/blog/2022/08/500-stars-on-github')) { featureGraphicPath = 'assets/images/blog/500-stars-on-github.jpg'; - } else if ( - req.path === '/en/blog/2022/10/hacktoberfest-2022' || - req.path === '/en/blog/2022/10/hacktoberfest-2022/' - ) { + } else if (req.path.startsWith('/en/blog/2022/10/hacktoberfest-2022')) { featureGraphicPath = 'assets/images/blog/hacktoberfest-2022.png'; + } else if (req.path.startsWith('/en/blog/2022/11/black-friday-2022')) { + featureGraphicPath = 'assets/images/blog/black-friday-2022.jpg'; } if ( diff --git a/apps/client/src/app/app-routing.module.ts b/apps/client/src/app/app-routing.module.ts index d09beffc3..629e0eaf1 100644 --- a/apps/client/src/app/app-routing.module.ts +++ b/apps/client/src/app/app-routing.module.ts @@ -102,6 +102,13 @@ const routes: Routes = [ './pages/blog/2022/10/hacktoberfest-2022/hacktoberfest-2022-page.module' ).then((m) => m.Hacktoberfest2022PageModule) }, + { + path: 'blog/2022/11/black-friday-2022', + loadChildren: () => + import( + './pages/blog/2022/11/black-friday-2022/black-friday-2022-page.module' + ).then((m) => m.BlackFriday2022PageModule) + }, { path: 'demo', loadChildren: () => diff --git a/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page-routing.module.ts b/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page-routing.module.ts new file mode 100644 index 000000000..da6e43487 --- /dev/null +++ b/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page-routing.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { AuthGuard } from '@ghostfolio/client/core/auth.guard'; + +import { BlackFriday2022PageComponent } from './black-friday-2022-page.component'; + +const routes: Routes = [ + { + canActivate: [AuthGuard], + component: BlackFriday2022PageComponent, + path: '', + title: 'Black Friday 2022' + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class BlackFriday2022RoutingModule {} diff --git a/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.component.ts b/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.component.ts new file mode 100644 index 000000000..b7fadc6af --- /dev/null +++ b/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.component.ts @@ -0,0 +1,21 @@ +import { Component } from '@angular/core'; +import { DataService } from '@ghostfolio/client/services/data.service'; + +@Component({ + host: { class: 'page' }, + selector: 'gf-black-friday-2022-page', + styleUrls: ['./black-friday-2022-page.scss'], + templateUrl: './black-friday-2022-page.html' +}) +export class BlackFriday2022PageComponent { + public discount: number; + + public constructor(private dataService: DataService) { + const { subscriptions } = this.dataService.fetchInfo(); + + const coupon = subscriptions?.[0]?.coupon ?? 0; + const price = subscriptions?.[0]?.price ?? 1; + + this.discount = Math.floor((coupon / price) * 100) / 100; + } +} diff --git a/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.html b/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.html new file mode 100644 index 000000000..a44ad9371 --- /dev/null +++ b/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.html @@ -0,0 +1,138 @@ +
+
+
+
+
+

Black Friday 2022

+
2022-11-13
+ Black Friday 2022 Teaser +
+
+

+ Get {{ discount | percent }} off on our + Ghostfolio Premium + + annual plan for ambitious investors who need the full picture of + their financial assets. +

+
+
+

+ Ghostfolio + is a modern web application to manage your personal finance. The + software presents the current assets (stocks, ETFs, + cryptocurrencies, commodities etc.) in real time to make solid, + data-driven investment decisions. Check out the numerous + features to manage your wealth. +

+
+
+

+ Snap the limited Black Friday 2022 deal before it’s gone. For + detailed information on plans and pricing, please visit our + pricing page. +

+

+ Get the Deal +

+
+
+
    +
  • + 2022 +
  • +
  • + Black Friday +
  • +
  • + Cloud +
  • +
  • + Cryptocurrency +
  • +
  • + Deal +
  • +
  • + ETF +
  • +
  • + Finance +
  • +
  • + Fintech +
  • +
  • + Ghostfolio +
  • +
  • + Ghostfolio Premium +
  • +
  • + Hosting +
  • +
  • + Investment +
  • +
  • + Open Source +
  • +
  • + OSS +
  • +
  • + Personal Finance +
  • +
  • + Portfolio +
  • +
  • + Portfolio Tracker +
  • +
  • + Pricing +
  • +
  • + SaaS +
  • +
  • + Software +
  • +
  • + Stock +
  • +
  • + Subscription +
  • +
  • + Wealth +
  • +
  • + Wealth Management +
  • +
  • + Web3 +
  • +
  • + Web 3.0 +
  • +
+
+
+
+
+
diff --git a/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.module.ts b/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.module.ts new file mode 100644 index 000000000..93964e7ab --- /dev/null +++ b/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.module.ts @@ -0,0 +1,21 @@ +import { CommonModule } from '@angular/common'; +import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { RouterModule } from '@angular/router'; +import { GfPremiumIndicatorModule } from '@ghostfolio/ui/premium-indicator'; + +import { BlackFriday2022RoutingModule } from './black-friday-2022-page-routing.module'; +import { BlackFriday2022PageComponent } from './black-friday-2022-page.component'; + +@NgModule({ + declarations: [BlackFriday2022PageComponent], + imports: [ + BlackFriday2022RoutingModule, + CommonModule, + GfPremiumIndicatorModule, + MatButtonModule, + RouterModule + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}) +export class BlackFriday2022PageModule {} diff --git a/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.scss b/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.scss new file mode 100644 index 000000000..5d4e87f30 --- /dev/null +++ b/apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.scss @@ -0,0 +1,3 @@ +:host { + display: block; +} diff --git a/apps/client/src/app/pages/blog/blog-page.component.ts b/apps/client/src/app/pages/blog/blog-page.component.ts index 2df3dbc7a..db5454fbf 100644 --- a/apps/client/src/app/pages/blog/blog-page.component.ts +++ b/apps/client/src/app/pages/blog/blog-page.component.ts @@ -1,4 +1,6 @@ import { Component, OnDestroy } from '@angular/core'; +import { DataService } from '@ghostfolio/client/services/data.service'; +import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { Subject } from 'rxjs'; @Component({ @@ -8,9 +10,18 @@ import { Subject } from 'rxjs'; templateUrl: './blog-page.html' }) export class BlogPageComponent implements OnDestroy { + public hasPermissionForSubscription: boolean; + private unsubscribeSubject = new Subject(); - public constructor() {} + public constructor(private dataService: DataService) { + const info = this.dataService.fetchInfo(); + + this.hasPermissionForSubscription = hasPermission( + info?.globalPermissions, + permissions.enableSubscription + ); + } public ngOnDestroy() { this.unsubscribeSubject.next(); diff --git a/apps/client/src/app/pages/blog/blog-page.html b/apps/client/src/app/pages/blog/blog-page.html index f2d1de322..6d77821cd 100644 --- a/apps/client/src/app/pages/blog/blog-page.html +++ b/apps/client/src/app/pages/blog/blog-page.html @@ -2,6 +2,30 @@

Blog

+ + + + +
diff --git a/apps/client/src/app/pages/pricing/pricing-page.component.ts b/apps/client/src/app/pages/pricing/pricing-page.component.ts index a7f95b1c3..48c775901 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.component.ts +++ b/apps/client/src/app/pages/pricing/pricing-page.component.ts @@ -28,7 +28,7 @@ export class PricingPageComponent implements OnDestroy, OnInit { const { baseCurrency, subscriptions } = this.dataService.fetchInfo(); this.baseCurrency = baseCurrency; - this.coupon = this.price = subscriptions?.[0]?.coupon; + this.coupon = subscriptions?.[0]?.coupon; this.price = subscriptions?.[0]?.price; } diff --git a/apps/client/src/app/pages/pricing/pricing-page.html b/apps/client/src/app/pages/pricing/pricing-page.html index d8ddeedc3..53a892193 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.html +++ b/apps/client/src/app/pages/pricing/pricing-page.html @@ -1,3 +1,16 @@ +
+
+
+
+

Black Friday Deal

+
+
+
+
+
diff --git a/apps/client/src/app/pages/pricing/pricing-page.scss b/apps/client/src/app/pages/pricing/pricing-page.scss index 8edf75b42..6e0f68019 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.scss +++ b/apps/client/src/app/pages/pricing/pricing-page.scss @@ -11,6 +11,20 @@ } } + .intro { + background-color: rgb(var(--dark-primary-text)); + color: rgba(var(--palette-primary-500), 1); + + h1 { + font-size: 4vw; + line-height: 1; + + @media (max-width: 575.98px) { + font-size: 10vw; + } + } + } + .mat-card { &:hover, &.active { @@ -22,4 +36,8 @@ :host-context(.is-dark-theme) { color: rgb(var(--light-primary-text)); + + .intro { + background-color: rgba(var(--light-dividers)); + } } diff --git a/apps/client/src/assets/images/blog/black-friday-2022.jpg b/apps/client/src/assets/images/blog/black-friday-2022.jpg new file mode 100644 index 000000000..45fe74149 Binary files /dev/null and b/apps/client/src/assets/images/blog/black-friday-2022.jpg differ diff --git a/apps/client/src/assets/sitemap.xml b/apps/client/src/assets/sitemap.xml index 72f35bece..1557eec0e 100644 --- a/apps/client/src/assets/sitemap.xml +++ b/apps/client/src/assets/sitemap.xml @@ -6,74 +6,78 @@ http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> https://ghostfol.io - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/de/blog/2021/07/hallo-ghostfolio - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/about - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/about/changelog - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/blog - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/blog/2021/07/hello-ghostfolio - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/blog/2022/01/ghostfolio-first-months-in-open-source - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/blog/2022/07/ghostfolio-meets-internet-identity - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/blog/2022/07/how-do-i-get-my-finances-in-order - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/blog/2022/08/500-stars-on-github - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 - + https://ghostfol.io/en/blog/2022/10/hacktoberfest-2022 - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 + + + https://ghostfol.io/en/blog/2022/11/black-friday-2022 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/demo - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/faq - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/features - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/markets - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/pricing - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/register - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 https://ghostfol.io/en/resources - 2022-10-16T00:00:00+00:00 + 2022-11-10T00:00:00+00:00 diff --git a/apps/client/src/styles.scss b/apps/client/src/styles.scss index 9c8099035..83d4367e4 100644 --- a/apps/client/src/styles.scss +++ b/apps/client/src/styles.scss @@ -38,11 +38,13 @@ body { .blog { a { - color: rgba(var(--palette-primary-500), 1) !important; - font-weight: 500; + &:not(.mat-flat-button) { + color: rgba(var(--palette-primary-500), 1) !important; + font-weight: 500; - &:hover { - text-decoration: underline; + &:hover { + text-decoration: underline; + } } } }