diff --git a/src/app/post/components/post-card/post-card.component.html b/src/app/post/components/post-card/post-card.component.html index c6b32c5a1d0e3511bafa10526583f7714fa51c83..22ebc401e4b4a26874a180af62597c9cf2c30f97 100644 --- a/src/app/post/components/post-card/post-card.component.html +++ b/src/app/post/components/post-card/post-card.component.html @@ -30,7 +30,7 @@ <div fxLayout="column" class="informations"> <div>{{ post.author }}</div> <div> - {{ post.updated_at | date: 'dd MMM y' }} + {{ post.updated_at | date: 'd MMM y' }} </div> </div> </div> diff --git a/src/app/post/components/post-card/post-card.component.scss b/src/app/post/components/post-card/post-card.component.scss index 394089ce2a7747367d5707dec9efb3fe9cbe7eab..68ff9e687b92e8a7bd271972ac59470a774c877b 100644 --- a/src/app/post/components/post-card/post-card.component.scss +++ b/src/app/post/components/post-card/post-card.component.scss @@ -44,7 +44,6 @@ .informations { @include cn-regular-16; div:nth-child(2n) { - text-transform: uppercase; color: $grey-3; } } diff --git a/src/app/post/components/post-details/post-details.component.scss b/src/app/post/components/post-details/post-details.component.scss index c06de925a4408a0ecd1c3645fa8617d335a9f2fc..59262dbe3668b6e74455df14ca504f8982339a12 100644 --- a/src/app/post/components/post-details/post-details.component.scss +++ b/src/app/post/components/post-details/post-details.component.scss @@ -34,7 +34,6 @@ $margin-post: 20px; .informations { @include cn-regular-16; div:nth-child(2n) { - text-transform: uppercase; color: $grey-3; } } @@ -201,7 +200,7 @@ $margin-post: 20px; .gh-canvas .article-image { grid-column: wide-start/wide-end; width: 100%; - margin: 6vmin 0 0; + margin: 4vmin 0 0; img { display: block; margin-left: auto; diff --git a/src/app/post/components/post-list/post-list.component.ts b/src/app/post/components/post-list/post-list.component.ts index f1b0ffb9061461cb44ba5c4518ee0159be866eaf..77a3b17dae26ccf3d7035ecfeeefcfa2836215d4 100644 --- a/src/app/post/components/post-list/post-list.component.ts +++ b/src/app/post/components/post-list/post-list.component.ts @@ -21,9 +21,6 @@ export class PostListComponent implements OnInit { public selectedPublicTagsSlug = []; public filters: Tag[]; public allPosts: Post[] = []; - public leftColumnPosts: Post[] = []; - public rightColumnPosts: Post[] = []; - public bigNews: Post; public pagination: Pagination; public isLoading = false; public isPublishMode = false; @@ -46,11 +43,6 @@ export class PostListComponent implements OnInit { ngOnInit(): void { this.isLoading = true; // Init APP news list - this.postService.getPosts(1, [TagEnum.aLaUne]).subscribe((news) => { - if (news.posts[0]) { - this.bigNews = this.addAuthorToPost(news.posts[0]); - } - }); this.route.queryParams.subscribe((queryParams) => { this.isPublishMode = false; // If main tag is in route, set it @@ -70,7 +62,8 @@ export class PostListComponent implements OnInit { // Init default news list this.postService.getPosts(1).subscribe((news) => { this.setNews(news); - this.allPosts.unshift(this.bigNews); + const headLineTag = this.allPosts.find((post: Post) => post.tags.some((tag) => tag.slug === TagEnum.aLaUne)); + this.allPosts.unshift(headLineTag); }); } }); @@ -113,14 +106,10 @@ export class PostListComponent implements OnInit { } public resetPosts(): void { - this.leftColumnPosts = []; - this.rightColumnPosts = []; this.allPosts = []; } - public publishNews(): void {} - - //Transform excerpt post to have a custom author. + // Transform excerpt post to have a custom author. private addAuthorToPost(post: Post): Post { post.author = post.excerpt; post.excerpt = post.html.replace(/<[^>]*>/g, '');