Skip to content

Commit 561c903

Browse files
committed
feat(articles): added ability to add 2 authors and added links to booking page (#320)
1 parent bff06ac commit 561c903

File tree

3 files changed

+236
-206
lines changed

3 files changed

+236
-206
lines changed

libs/common-docs/src/models/article.interface.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
export interface IArticle {
22
author?: string;
33
authorImg?: string;
4+
secondAuthor?: string;
5+
secondAuthorImg?: string;
46
domains: string[];
57
language: string;
68
bgImg: string;
Lines changed: 53 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,55 @@
11
<ng-container *ngIf="article">
2-
<section class="first-section-half landing-section mt-4 bg-dark_title_col lg:!pb-32 !pb:8">
3-
<div class="container flex items-center flex-col">
4-
<ng-container *ngIf="changeBreadCrumbTitle?.length">
5-
<breadCrumbs [changeTitle]="changeBreadCrumbTitle" class="w-full hidden md:block"></breadCrumbs>
6-
</ng-container>
7-
<div class="w-full flex flex-col items-center md:mt-12 lg:mt-32 max-w-full lg:max-w-75% text-center text-light_title_col">
8-
<p class="text-20 mb-4">{{article.date | date:'MMMM d, y'}}</p>
9-
<p class="text-large font-bold md:text-64 leading-66 mb-8 md:mb-14">{{article.title}}</p>
10-
<div class="w-70 h-70 rounded-full overflow-hidden mb-4" *ngIf="article.authorImg">
11-
<img class="w-full h-full object-cover" [src]="article.authorImg" [alt]="article.author">
12-
</div>
13-
<p class="md:text-large text-24 mb-4" *ngIf="article.author">{{article.author}}</p>
14-
<p class="text-20" *ngIf="article.position">{{article.position}}</p>
15-
</div>
16-
</div>
17-
</section>
18-
<section class="landing-section" *ngIf="article.content">
19-
<div class="container pt-4 md:pt-12 flex items-center flex-col article-box !max-w-1010">
20-
<div class="max-w-full" [innerHTML]="checkHTML(article.content)" (click)="routLink($event)"></div>
21-
</div>
22-
</section>
23-
<section class="landing-section">
24-
<h1 class="main-title">More Articles</h1>
25-
<div class="container">
26-
<blog-preview [currentArticle]="article"></blog-preview>
27-
</div>
28-
</section>
2+
<section class="first-section-half landing-section mt-4 bg-dark_title_col lg:!pb-32 !pb:8">
3+
<div class="container flex items-center flex-col">
4+
<ng-container *ngIf="changeBreadCrumbTitle?.length">
5+
<breadCrumbs [changeTitle]="changeBreadCrumbTitle" class="w-full hidden md:block"></breadCrumbs>
6+
</ng-container>
7+
<div
8+
class="w-full flex flex-col items-center md:mt-12 lg:mt-32 max-w-full lg:max-w-75% text-center text-light_title_col">
9+
<p class="text-20 mb-4">{{article.date | date:'MMMM d, y'}}</p>
10+
<p class="text-large font-bold md:text-64 leading-66 mb-8 md:mb-14">{{article.title}}</p>
11+
12+
<div *ngIf="article.author && article.secondAuthor; else oneAuthorTemplate">
13+
<ng-template [ngTemplateOutlet]="authorImageTemplate"></ng-template>
14+
<p class="md:text-large text-24 mb-4">{{article.author}} and {{article.secondAuthor}}</p>
15+
</div>
16+
17+
<ng-template #oneAuthorTemplate>
18+
<ng-template [ngTemplateOutlet]="authorImageTemplate"></ng-template>
19+
<p class="md:text-large text-24 mb-4">{{article.author}}</p>
20+
</ng-template>
21+
22+
<ng-template #authorImageTemplate>
23+
<div class="w-70 h-70 rounded-full overflow-hidden mb-4"
24+
*ngIf="article.authorImg && !article.secondAuthorImg">
25+
<img class="w-full h-full object-cover" [src]="article.authorImg" [alt]="article.author">
26+
</div>
27+
28+
<div class="flex justify-center" *ngIf="article.authorImg && article.secondAuthorImg">
29+
<div class="w-70 h-70 rounded-full overflow-hidden mb-4 mr-8">
30+
<img class="w-full h-full object-cover" [src]="article.authorImg" [alt]="article.author">
31+
</div>
32+
33+
<div class="w-70 h-70 rounded-full overflow-hidden mb-4">
34+
<img class="w-full h-full object-cover" [src]="article.secondAuthorImg" [alt]="article.secondAuthor">
35+
</div>
36+
</div>
37+
38+
</ng-template>
39+
40+
<p class="text-20" *ngIf="article.position">{{article.position}}</p>
41+
</div>
42+
</div>
43+
</section>
44+
<section class="landing-section" *ngIf="article.content">
45+
<div class="container pt-4 md:pt-12 flex items-center flex-col article-box !max-w-1010">
46+
<div class="max-w-full" [innerHTML]="checkHTML(article.content)" (click)="routLink($event)"></div>
47+
</div>
48+
</section>
49+
<section class="landing-section">
50+
<h1 class="main-title">More Articles</h1>
51+
<div class="container">
52+
<blog-preview [currentArticle]="article"></blog-preview>
53+
</div>
54+
</section>
2955
</ng-container>

0 commit comments

Comments
 (0)