Skip to content

Commit

Permalink
feat: new canteen submenu, add OG metatags (#991)
Browse files Browse the repository at this point in the history
* feat: new canteen submenu, add OG metatags

* style: format
  • Loading branch information
TwoDCube authored Nov 22, 2021
1 parent 2a656e8 commit c771126
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ <h1 class="title title-end" [@headerAnimationTitleEnd]="openHeader" [@headerAnim
<span>Menza</span> <i class="material-icons arrow">expand_more</i>
<div class="submenu">
<a (click)="toggleDrawer()" [tabindex]="navTabbable$ | async" [routerLink]="'/canteen'">Étlap</a>
<a (click)="toggleDrawer()" [tabindex]="navTabbable$ | async" [routerLink]="'/pages/menza-befizetes'">Befizetés, információk</a>
<a (click)="toggleDrawer()" [tabindex]="navTabbable$ | async" [routerLink]="'/pages/menza-tajekoztatok-nyilatkozatok'"
>Tájékoztatók, nyilatkozatok</a
>
<a (click)="toggleDrawer()" [tabindex]="navTabbable$ | async" [routerLink]="'/pages/menza-ugyintezes-etkezes-lemondas'"
>Ügyintézés, étkezés lemondás</a
>
</div>
</div>
<div class="menu TEMP-disabled-not-implemented-link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router'
import { catchError, map, switchMap, tap } from 'rxjs/operators'
import { format } from 'date-fns'
import { TitleService } from '../../../../services/title.service'
import { Meta } from '@angular/platform-browser'

@Component({
selector: 'verseghy-posts',
Expand All @@ -22,7 +23,8 @@ export class PostsComponent implements OnInit {
private requestService: RequestService,
private route: ActivatedRoute,
private router: Router,
private titleService: TitleService
private titleService: TitleService,
private metaService: Meta
) {}

ngOnInit() {
Expand All @@ -43,6 +45,16 @@ export class PostsComponent implements OnInit {
if (!post) return

this.titleService.setTitle(post.title)

this.metaService.addTags([
{ property: 'og:type', content: 'article' },
{ property: 'og:title', content: post.title },
{ property: 'og:image', content: post.index_image },
{ property: 'og:description', content: post.description },
{ property: 'article:author', content: post.author.name },
{ property: 'article:published_time', content: post.date },
...post.labels.map((l) => ({ property: 'article:tag', content: l.name })),
])
})
)
}
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export const environment = {
appId: '1:616435986324:web:b449b36b597fdb3d',
measurementId: 'G-HMG0GDHDR6',
},
version: 'v1.5.20',
version: 'v1.5.21',
}

0 comments on commit c771126

Please sign in to comment.