From 0211de8fe54ad9c1b494b824ba59183041b9f91f Mon Sep 17 00:00:00 2001
From: Etienne LOUPIAS <eloupias@grandlyon.com>
Date: Tue, 1 Mar 2022 12:16:35 +0100
Subject: [PATCH] feat(posts): add button to show more

---
 src/app/post/components/post-list/post-list.component.html | 5 +++++
 src/app/post/components/post-list/post-list.component.scss | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/src/app/post/components/post-list/post-list.component.html b/src/app/post/components/post-list/post-list.component.html
index 01056ea4f..31e1c5dba 100644
--- a/src/app/post/components/post-list/post-list.component.html
+++ b/src/app/post/components/post-list/post-list.component.html
@@ -27,6 +27,11 @@
           <app-post-card [post]="news" class="col" *ngFor="let news of allPosts"></app-post-card>
         </div>
       </div>
+      <div *ngIf="!lastPage" fxLayout="row" fxLayoutAlign="center center">
+        <button class="btn-primary small" (click)="loadMore()">
+          <div class="rowBtn" fxLayout="row" fxLayoutAlign="center center">Voir plus</div>
+        </button>
+      </div>
     </div>
   </div>
 </div>
diff --git a/src/app/post/components/post-list/post-list.component.scss b/src/app/post/components/post-list/post-list.component.scss
index 6e13a5817..dad8b06fa 100644
--- a/src/app/post/components/post-list/post-list.component.scss
+++ b/src/app/post/components/post-list/post-list.component.scss
@@ -239,3 +239,6 @@ h2 {
     margin-bottom: 0;
   }
 }
+.btn-primary {
+  margin-bottom: 20px;
+}
-- 
GitLab