From ed121d347a961e0780ae365ecd1282d8aa5eb528 Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Fri, 26 Feb 2021 11:49:17 +0100
Subject: [PATCH 01/17] feat(post) : init lazy loading

---
 src/app/app-routing.module.ts         |  4 ++++
 src/app/posts/posts-routing.module.ts | 11 +++++++++++
 src/app/posts/posts.component.html    |  1 +
 src/app/posts/posts.component.scss    |  0
 src/app/posts/posts.component.spec.ts | 25 +++++++++++++++++++++++++
 src/app/posts/posts.component.ts      | 15 +++++++++++++++
 src/app/posts/posts.module.ts         | 10 ++++++++++
 7 files changed, 66 insertions(+)
 create mode 100644 src/app/posts/posts-routing.module.ts
 create mode 100644 src/app/posts/posts.component.html
 create mode 100644 src/app/posts/posts.component.scss
 create mode 100644 src/app/posts/posts.component.spec.ts
 create mode 100644 src/app/posts/posts.component.ts
 create mode 100644 src/app/posts/posts.module.ts

diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 045be83e7..556fb1eff 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -87,6 +87,10 @@ const routes: Routes = [
     component: FormComponent,
     canDeactivate: [DeactivateGuard],
   },
+  {
+    path: 'posts',
+    loadChildren: () => import('./posts/posts.module').then((m) => m.PostsModule),
+  },
   {
     path: '**',
     redirectTo: 'home',
diff --git a/src/app/posts/posts-routing.module.ts b/src/app/posts/posts-routing.module.ts
new file mode 100644
index 000000000..80b37d9e9
--- /dev/null
+++ b/src/app/posts/posts-routing.module.ts
@@ -0,0 +1,11 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { PostsComponent } from './posts.component';
+
+const routes: Routes = [{ path: '', component: PostsComponent }];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class PostsRoutingModule {}
diff --git a/src/app/posts/posts.component.html b/src/app/posts/posts.component.html
new file mode 100644
index 000000000..2c30d2067
--- /dev/null
+++ b/src/app/posts/posts.component.html
@@ -0,0 +1 @@
+<p>posts works!</p>
diff --git a/src/app/posts/posts.component.scss b/src/app/posts/posts.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/app/posts/posts.component.spec.ts b/src/app/posts/posts.component.spec.ts
new file mode 100644
index 000000000..9702efa6e
--- /dev/null
+++ b/src/app/posts/posts.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PostsComponent } from './posts.component';
+
+describe('PostsComponent', () => {
+  let component: PostsComponent;
+  let fixture: ComponentFixture<PostsComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      declarations: [ PostsComponent ]
+    })
+    .compileComponents();
+  });
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(PostsComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/src/app/posts/posts.component.ts b/src/app/posts/posts.component.ts
new file mode 100644
index 000000000..73d77fc55
--- /dev/null
+++ b/src/app/posts/posts.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-posts',
+  templateUrl: './posts.component.html',
+  styleUrls: ['./posts.component.scss']
+})
+export class PostsComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit(): void {
+  }
+
+}
diff --git a/src/app/posts/posts.module.ts b/src/app/posts/posts.module.ts
new file mode 100644
index 000000000..32e4a4b79
--- /dev/null
+++ b/src/app/posts/posts.module.ts
@@ -0,0 +1,10 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { PostsComponent } from './posts.component';
+import { PostsRoutingModule } from './posts-routing.module';
+
+@NgModule({
+  declarations: [PostsComponent],
+  imports: [CommonModule, PostsRoutingModule],
+})
+export class PostsModule {}
-- 
GitLab


From c0f5d8279f727fc3320b7339b0cf709da994011f Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Fri, 26 Feb 2021 15:01:54 +0100
Subject: [PATCH 02/17] feat(posts) : init

---
 src/app/app-routing.module.ts                 |  2 +-
 .../post-details/post-details.component.html  |  1 +
 .../post-details/post-details.component.scss} |  0
 .../post-details.component.spec.ts            | 25 +++++++++++++++++++
 .../post-details/post-details.component.ts    | 15 +++++++++++
 .../post-header/post-header.component.html    |  1 +
 .../post-header/post-header.component.scss    |  6 +++++
 .../post-header/post-header.component.spec.ts | 25 +++++++++++++++++++
 .../post-header/post-header.component.ts      | 15 +++++++++++
 .../post-list/post-list.component.html        | 17 +++++++++++++
 .../post-list/post-list.component.scss        | 12 +++++++++
 .../post-list/post-list.component.spec.ts     | 25 +++++++++++++++++++
 .../post-list/post-list.component.ts          | 15 +++++++++++
 .../post-routing.module.ts}                   |  6 ++---
 src/app/post/post.component.html              |  4 +++
 src/app/post/post.component.scss              |  0
 .../post.component.spec.ts}                   | 13 +++++-----
 src/app/post/post.component.ts                | 12 +++++++++
 src/app/post/post.module.ts                   | 14 +++++++++++
 .../post/services/post/post.component.html    |  1 +
 .../post/services/post/post.component.scss    |  0
 .../post/services/post/post.component.spec.ts | 25 +++++++++++++++++++
 src/app/post/services/post/post.component.ts  | 15 +++++++++++
 src/app/posts/posts.component.html            |  1 -
 src/app/posts/posts.component.ts              | 15 -----------
 src/app/posts/posts.module.ts                 | 10 --------
 26 files changed, 238 insertions(+), 37 deletions(-)
 create mode 100644 src/app/post/components/post-details/post-details.component.html
 rename src/app/{posts/posts.component.scss => post/components/post-details/post-details.component.scss} (100%)
 create mode 100644 src/app/post/components/post-details/post-details.component.spec.ts
 create mode 100644 src/app/post/components/post-details/post-details.component.ts
 create mode 100644 src/app/post/components/post-header/post-header.component.html
 create mode 100644 src/app/post/components/post-header/post-header.component.scss
 create mode 100644 src/app/post/components/post-header/post-header.component.spec.ts
 create mode 100644 src/app/post/components/post-header/post-header.component.ts
 create mode 100644 src/app/post/components/post-list/post-list.component.html
 create mode 100644 src/app/post/components/post-list/post-list.component.scss
 create mode 100644 src/app/post/components/post-list/post-list.component.spec.ts
 create mode 100644 src/app/post/components/post-list/post-list.component.ts
 rename src/app/{posts/posts-routing.module.ts => post/post-routing.module.ts} (54%)
 create mode 100644 src/app/post/post.component.html
 create mode 100644 src/app/post/post.component.scss
 rename src/app/{posts/posts.component.spec.ts => post/post.component.spec.ts} (57%)
 create mode 100644 src/app/post/post.component.ts
 create mode 100644 src/app/post/post.module.ts
 create mode 100644 src/app/post/services/post/post.component.html
 create mode 100644 src/app/post/services/post/post.component.scss
 create mode 100644 src/app/post/services/post/post.component.spec.ts
 create mode 100644 src/app/post/services/post/post.component.ts
 delete mode 100644 src/app/posts/posts.component.html
 delete mode 100644 src/app/posts/posts.component.ts
 delete mode 100644 src/app/posts/posts.module.ts

diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 556fb1eff..9b85e5e1b 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -89,7 +89,7 @@ const routes: Routes = [
   },
   {
     path: 'posts',
-    loadChildren: () => import('./posts/posts.module').then((m) => m.PostsModule),
+    loadChildren: () => import('./post/post.module').then((m) => m.PostModule),
   },
   {
     path: '**',
diff --git a/src/app/post/components/post-details/post-details.component.html b/src/app/post/components/post-details/post-details.component.html
new file mode 100644
index 000000000..11f24be81
--- /dev/null
+++ b/src/app/post/components/post-details/post-details.component.html
@@ -0,0 +1 @@
+<p>post-details works!</p>
diff --git a/src/app/posts/posts.component.scss b/src/app/post/components/post-details/post-details.component.scss
similarity index 100%
rename from src/app/posts/posts.component.scss
rename to src/app/post/components/post-details/post-details.component.scss
diff --git a/src/app/post/components/post-details/post-details.component.spec.ts b/src/app/post/components/post-details/post-details.component.spec.ts
new file mode 100644
index 000000000..90f92b94c
--- /dev/null
+++ b/src/app/post/components/post-details/post-details.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PostDetailsComponent } from './post-details.component';
+
+describe('PostDetailsComponent', () => {
+  let component: PostDetailsComponent;
+  let fixture: ComponentFixture<PostDetailsComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      declarations: [ PostDetailsComponent ]
+    })
+    .compileComponents();
+  });
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(PostDetailsComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/src/app/post/components/post-details/post-details.component.ts b/src/app/post/components/post-details/post-details.component.ts
new file mode 100644
index 000000000..adf283aa1
--- /dev/null
+++ b/src/app/post/components/post-details/post-details.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-post-details',
+  templateUrl: './post-details.component.html',
+  styleUrls: ['./post-details.component.scss']
+})
+export class PostDetailsComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit(): void {
+  }
+
+}
diff --git a/src/app/post/components/post-header/post-header.component.html b/src/app/post/components/post-header/post-header.component.html
new file mode 100644
index 000000000..6d9a4faab
--- /dev/null
+++ b/src/app/post/components/post-header/post-header.component.html
@@ -0,0 +1 @@
+<div class="header-container">post-header works!</div>
diff --git a/src/app/post/components/post-header/post-header.component.scss b/src/app/post/components/post-header/post-header.component.scss
new file mode 100644
index 000000000..e24dbb9e6
--- /dev/null
+++ b/src/app/post/components/post-header/post-header.component.scss
@@ -0,0 +1,6 @@
+@import '../../../../assets/scss/color';
+
+.header-container {
+  height: 180px;
+  background: $white;
+}
diff --git a/src/app/post/components/post-header/post-header.component.spec.ts b/src/app/post/components/post-header/post-header.component.spec.ts
new file mode 100644
index 000000000..a2ba8e0b6
--- /dev/null
+++ b/src/app/post/components/post-header/post-header.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PostHeaderComponent } from './post-header.component';
+
+describe('PostHeaderComponent', () => {
+  let component: PostHeaderComponent;
+  let fixture: ComponentFixture<PostHeaderComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      declarations: [ PostHeaderComponent ]
+    })
+    .compileComponents();
+  });
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(PostHeaderComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/src/app/post/components/post-header/post-header.component.ts b/src/app/post/components/post-header/post-header.component.ts
new file mode 100644
index 000000000..4927d262b
--- /dev/null
+++ b/src/app/post/components/post-header/post-header.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-post-header',
+  templateUrl: './post-header.component.html',
+  styleUrls: ['./post-header.component.scss']
+})
+export class PostHeaderComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit(): void {
+  }
+
+}
diff --git a/src/app/post/components/post-list/post-list.component.html b/src/app/post/components/post-list/post-list.component.html
new file mode 100644
index 000000000..0c1d36f47
--- /dev/null
+++ b/src/app/post/components/post-list/post-list.component.html
@@ -0,0 +1,17 @@
+<div class="section-container" fxLayout="row">
+  <div fxLayout="column" class="list-container">
+    <div fxLayout="column">
+      <div fxLayout="row" fxLayoutAlign="space-between center">
+        <h2>A la une</h2>
+        <button>Publier votre actu</button>
+      </div>
+    </div>
+
+    <div fxLayout="column">
+      <div fxLayout="row">
+        <h2>Autres actualités</h2>
+      </div>
+    </div>
+  </div>
+  <div fxLayout="column" fxLayoutAlign=" center" class="project-container">Appels ap rojets</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
new file mode 100644
index 000000000..6d3bff0c2
--- /dev/null
+++ b/src/app/post/components/post-list/post-list.component.scss
@@ -0,0 +1,12 @@
+@import '../../../../assets/scss/color';
+
+.section-container {
+  background: $grey-6;
+}
+
+.list-container {
+  width: 80%;
+}
+.project-container {
+  width: 20%;
+}
diff --git a/src/app/post/components/post-list/post-list.component.spec.ts b/src/app/post/components/post-list/post-list.component.spec.ts
new file mode 100644
index 000000000..2d39c2494
--- /dev/null
+++ b/src/app/post/components/post-list/post-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PostListComponent } from './post-list.component';
+
+describe('PostListComponent', () => {
+  let component: PostListComponent;
+  let fixture: ComponentFixture<PostListComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      declarations: [ PostListComponent ]
+    })
+    .compileComponents();
+  });
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(PostListComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/src/app/post/components/post-list/post-list.component.ts b/src/app/post/components/post-list/post-list.component.ts
new file mode 100644
index 000000000..b8742d722
--- /dev/null
+++ b/src/app/post/components/post-list/post-list.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-post-list',
+  templateUrl: './post-list.component.html',
+  styleUrls: ['./post-list.component.scss']
+})
+export class PostListComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit(): void {
+  }
+
+}
diff --git a/src/app/posts/posts-routing.module.ts b/src/app/post/post-routing.module.ts
similarity index 54%
rename from src/app/posts/posts-routing.module.ts
rename to src/app/post/post-routing.module.ts
index 80b37d9e9..2ec94d598 100644
--- a/src/app/posts/posts-routing.module.ts
+++ b/src/app/post/post-routing.module.ts
@@ -1,11 +1,11 @@
 import { NgModule } from '@angular/core';
 import { Routes, RouterModule } from '@angular/router';
-import { PostsComponent } from './posts.component';
+import { PostComponent } from './post.component';
 
-const routes: Routes = [{ path: '', component: PostsComponent }];
+const routes: Routes = [{ path: '', component: PostComponent }];
 
 @NgModule({
   imports: [RouterModule.forChild(routes)],
   exports: [RouterModule],
 })
-export class PostsRoutingModule {}
+export class PostRoutingModule {}
diff --git a/src/app/post/post.component.html b/src/app/post/post.component.html
new file mode 100644
index 000000000..eaa0bc1a6
--- /dev/null
+++ b/src/app/post/post.component.html
@@ -0,0 +1,4 @@
+<app-post-header></app-post-header>
+<app-post-list></app-post-list>
+<app-post-details></app-post-details>
+<p>posts works!</p>
diff --git a/src/app/post/post.component.scss b/src/app/post/post.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/app/posts/posts.component.spec.ts b/src/app/post/post.component.spec.ts
similarity index 57%
rename from src/app/posts/posts.component.spec.ts
rename to src/app/post/post.component.spec.ts
index 9702efa6e..5716f2398 100644
--- a/src/app/posts/posts.component.spec.ts
+++ b/src/app/post/post.component.spec.ts
@@ -1,20 +1,19 @@
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 
-import { PostsComponent } from './posts.component';
+import { PostComponent } from './post.component';
 
 describe('PostsComponent', () => {
-  let component: PostsComponent;
-  let fixture: ComponentFixture<PostsComponent>;
+  let component: PostComponent;
+  let fixture: ComponentFixture<PostComponent>;
 
   beforeEach(async () => {
     await TestBed.configureTestingModule({
-      declarations: [ PostsComponent ]
-    })
-    .compileComponents();
+      declarations: [PostComponent],
+    }).compileComponents();
   });
 
   beforeEach(() => {
-    fixture = TestBed.createComponent(PostsComponent);
+    fixture = TestBed.createComponent(PostComponent);
     component = fixture.componentInstance;
     fixture.detectChanges();
   });
diff --git a/src/app/post/post.component.ts b/src/app/post/post.component.ts
new file mode 100644
index 000000000..075daa3b5
--- /dev/null
+++ b/src/app/post/post.component.ts
@@ -0,0 +1,12 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-post',
+  templateUrl: './post.component.html',
+  styleUrls: ['./post.component.scss'],
+})
+export class PostComponent implements OnInit {
+  constructor() {}
+
+  ngOnInit(): void {}
+}
diff --git a/src/app/post/post.module.ts b/src/app/post/post.module.ts
new file mode 100644
index 000000000..a18cc43dd
--- /dev/null
+++ b/src/app/post/post.module.ts
@@ -0,0 +1,14 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { PostComponent } from './post.component';
+import { PostRoutingModule } from './post-routing.module';
+import { PostHeaderComponent } from './components/post-header/post-header.component';
+import { PostListComponent } from './components/post-list/post-list.component';
+import { PostDetailsComponent } from './components/post-details/post-details.component';
+import { SharedModule } from '../shared/shared.module';
+
+@NgModule({
+  declarations: [PostComponent, PostHeaderComponent, PostListComponent, PostDetailsComponent],
+  imports: [CommonModule, PostRoutingModule, SharedModule],
+})
+export class PostModule {}
diff --git a/src/app/post/services/post/post.component.html b/src/app/post/services/post/post.component.html
new file mode 100644
index 000000000..71b500c4d
--- /dev/null
+++ b/src/app/post/services/post/post.component.html
@@ -0,0 +1 @@
+<p>post works!</p>
diff --git a/src/app/post/services/post/post.component.scss b/src/app/post/services/post/post.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/app/post/services/post/post.component.spec.ts b/src/app/post/services/post/post.component.spec.ts
new file mode 100644
index 000000000..b941a2fe1
--- /dev/null
+++ b/src/app/post/services/post/post.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PostComponent } from './post.component';
+
+describe('PostComponent', () => {
+  let component: PostComponent;
+  let fixture: ComponentFixture<PostComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      declarations: [ PostComponent ]
+    })
+    .compileComponents();
+  });
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(PostComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/src/app/post/services/post/post.component.ts b/src/app/post/services/post/post.component.ts
new file mode 100644
index 000000000..ae2acfc6e
--- /dev/null
+++ b/src/app/post/services/post/post.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-post',
+  templateUrl: './post.component.html',
+  styleUrls: ['./post.component.scss']
+})
+export class PostComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit(): void {
+  }
+
+}
diff --git a/src/app/posts/posts.component.html b/src/app/posts/posts.component.html
deleted file mode 100644
index 2c30d2067..000000000
--- a/src/app/posts/posts.component.html
+++ /dev/null
@@ -1 +0,0 @@
-<p>posts works!</p>
diff --git a/src/app/posts/posts.component.ts b/src/app/posts/posts.component.ts
deleted file mode 100644
index 73d77fc55..000000000
--- a/src/app/posts/posts.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
-  selector: 'app-posts',
-  templateUrl: './posts.component.html',
-  styleUrls: ['./posts.component.scss']
-})
-export class PostsComponent implements OnInit {
-
-  constructor() { }
-
-  ngOnInit(): void {
-  }
-
-}
diff --git a/src/app/posts/posts.module.ts b/src/app/posts/posts.module.ts
deleted file mode 100644
index 32e4a4b79..000000000
--- a/src/app/posts/posts.module.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { PostsComponent } from './posts.component';
-import { PostsRoutingModule } from './posts-routing.module';
-
-@NgModule({
-  declarations: [PostsComponent],
-  imports: [CommonModule, PostsRoutingModule],
-})
-export class PostsModule {}
-- 
GitLab


From c2310d5a5628a841115729f65c3d7cb320e94311 Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Fri, 26 Feb 2021 15:44:24 +0100
Subject: [PATCH 03/17] =?UTF-8?q?feat(post)=20:=20add=20design=20"appel=20?=
 =?UTF-8?q?=C3=A0=20projet"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../post-list/post-list.component.html        | 26 ++++++++++----
 .../post-list/post-list.component.scss        | 34 +++++++++++++++++++
 .../post-list/post-list.component.ts          |  9 +++--
 src/app/post/post.component.html              |  2 --
 .../svg-icon/svg-icon.component.scss          |  4 +++
 src/assets/post/sprite.svg                    | 11 ++++++
 src/assets/scss/_typography.scss              |  8 +++++
 7 files changed, 80 insertions(+), 14 deletions(-)
 create mode 100644 src/assets/post/sprite.svg

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 0c1d36f47..c9e22c225 100644
--- a/src/app/post/components/post-list/post-list.component.html
+++ b/src/app/post/components/post-list/post-list.component.html
@@ -1,17 +1,29 @@
-<div class="section-container" fxLayout="row">
+<div class="section-container" fxLayout="row" fxLayoutGap="32px">
   <div fxLayout="column" class="list-container">
     <div fxLayout="column">
-      <div fxLayout="row" fxLayoutAlign="space-between center">
-        <h2>A la une</h2>
-        <button>Publier votre actu</button>
+      <div fxLayout="row" class="row-border" fxLayoutAlign="space-between center">
+        <h2>à la une</h2>
+        <app-button
+          [type]="'button'"
+          [style]="'buttonWithHash'"
+          [text]="'Publier votre actu'"
+          (action)="publishNews()"
+        ></app-button>
       </div>
     </div>
 
     <div fxLayout="column">
-      <div fxLayout="row">
-        <h2>Autres actualités</h2>
+      <div fxLayout="row" class="row-border">
+        <h2>autres actualités</h2>
+      </div>
+    </div>
+  </div>
+  <div fxLayout="column" fxLayoutAlign=" center" class="project-container">
+    <div class="background-project-container">
+      <div class="project-content" fxLayout="column">
+        <app-svg-icon [iconClass]="'icon-80'" [iconColor]="'inherit'" [type]="'post'" [icon]="'project'"></app-svg-icon>
+        <h2>appels à projets</h2>
       </div>
     </div>
   </div>
-  <div fxLayout="column" fxLayoutAlign=" center" class="project-container">Appels ap rojets</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 6d3bff0c2..b3cf207d9 100644
--- a/src/app/post/components/post-list/post-list.component.scss
+++ b/src/app/post/components/post-list/post-list.component.scss
@@ -1,12 +1,46 @@
 @import '../../../../assets/scss/color';
+@import '../../../../assets/scss/typography';
+@import '../../../../assets/scss/shapes';
 
 .section-container {
   background: $grey-6;
+  .row-border {
+    border-bottom: 1px dashed $grey-4;
+    margin: 16px 0;
+  }
+  h2 {
+    font-style: italic !important;
+    text-transform: uppercase;
+  }
 }
 
 .list-container {
   width: 80%;
+  h2 {
+    @include cn-bold-28;
+    color: $grey-2;
+  }
 }
 .project-container {
   width: 20%;
+  min-width: 306px;
+  @include background-hash($secondary-color);
+  border: 1px solid $secondary-color;
+  border-radius: 6px;
+  .background-project-container {
+    width: 100%;
+    height: 100%;
+    background: $white;
+    border-radius: 6px;
+    .project-content {
+      padding: 18px 32px 62px 36px;
+      fill: $secondary-color;
+      stroke: $secondary-color;
+      text-align: center;
+      h2 {
+        @include cn-bold-26;
+        color: $secondary-color;
+      }
+    }
+  }
 }
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 b8742d722..52014ff68 100644
--- a/src/app/post/components/post-list/post-list.component.ts
+++ b/src/app/post/components/post-list/post-list.component.ts
@@ -3,13 +3,12 @@ import { Component, OnInit } from '@angular/core';
 @Component({
   selector: 'app-post-list',
   templateUrl: './post-list.component.html',
-  styleUrls: ['./post-list.component.scss']
+  styleUrls: ['./post-list.component.scss'],
 })
 export class PostListComponent implements OnInit {
+  constructor() {}
 
-  constructor() { }
-
-  ngOnInit(): void {
-  }
+  ngOnInit(): void {}
 
+  public publishNews(): void {}
 }
diff --git a/src/app/post/post.component.html b/src/app/post/post.component.html
index eaa0bc1a6..2ea36328d 100644
--- a/src/app/post/post.component.html
+++ b/src/app/post/post.component.html
@@ -1,4 +1,2 @@
 <app-post-header></app-post-header>
 <app-post-list></app-post-list>
-<app-post-details></app-post-details>
-<p>posts works!</p>
diff --git a/src/app/shared/components/svg-icon/svg-icon.component.scss b/src/app/shared/components/svg-icon/svg-icon.component.scss
index e688256ea..0d40e293b 100644
--- a/src/app/shared/components/svg-icon/svg-icon.component.scss
+++ b/src/app/shared/components/svg-icon/svg-icon.component.scss
@@ -9,6 +9,10 @@
   &.icon-75 {
     width: 4.688em;
   }
+  &.icon-80 {
+    height: 80px;
+    width: 80px;
+  }
   &.validation {
     height: 100%;
     width: 26px;
diff --git a/src/assets/post/sprite.svg b/src/assets/post/sprite.svg
new file mode 100644
index 000000000..9c8181e25
--- /dev/null
+++ b/src/assets/post/sprite.svg
@@ -0,0 +1,11 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+
+<symbol id="project" viewBox="0 0 80 60" xmlns="http://www.w3.org/2000/svg">
+<path d="M1.66016 23.2006C4.67429 23.0597 8.52282 22.3132 12.7892 21.1547C17.5608 19.8591 22.9197 18.0302 28.3314 15.8906C38.369 11.9223 48.6614 6.85659 55.7703 2.08884V2.14843V2.22928V2.31051V2.39211V2.47407V2.5564V2.6391V2.72216V2.80559V2.88938V2.97352V3.05802V3.14288V3.2281V3.31367V3.39959V3.48586V3.57248V3.65944V3.74676V3.83441V3.92241V4.01075V4.09943V4.18845V4.27781V4.3675V4.45752V4.54788V4.63856V4.72958V4.82092V4.91259V5.00458V5.0969V5.18954V5.2825V5.37577V5.46937V5.56327V5.6575V5.75203V5.84688V5.94203V6.03749V6.13326V6.22933V6.32571V6.42239V6.51937V6.61664V6.71422V6.81209V6.91025V7.0087V7.10745V7.20649V7.30581V7.40542V7.50532V7.6055V7.70596V7.8067V7.90772V8.00901V8.11059V8.21243V8.31455V8.41694V8.5196V8.62253V8.72573V8.82918V8.93291V9.03689V9.14114V9.24565V9.35041V9.45543V9.5607V9.66622V9.772V9.87803V9.9843V10.0908V10.1976V10.3046V10.4119V10.5194V10.6271V10.7351V10.8433V10.9517V11.0604V11.1693V11.2784V11.3878V11.4974V11.6072V11.7172V11.8275V11.938V12.0487V12.1596V12.2708V12.3821V12.4937V12.6054V12.7174V12.8296V12.942V13.0546V13.1675V13.2805V13.3937V13.5071V13.6207V13.7345V13.8485V13.9628V14.0771V14.1917V14.3065V14.4215V14.5366V14.6519V14.7674V14.8831V14.999V15.1151V15.2313V15.3477V15.4643V15.581V15.6979V15.815V15.9323V16.0497V16.1673V16.2851V16.403V16.521V16.6393V16.7577V16.8762V16.9949V17.1137V17.2327V17.3519V17.4712V17.5906V17.7102V17.83V17.9498V18.0698V18.19V18.3103V18.4307V18.5513V18.672V18.7928V18.9137V19.0348V19.156V19.2774V19.3988V19.5204V19.6421V19.7639V19.8858V20.0079V20.1301V20.2523V20.3747V20.4972V20.6198V20.7425V20.8654V20.9883V21.1113V21.2344V21.3576V21.481V21.6044V21.7279V21.8515V21.9752V22.099V22.2229V22.3468V22.4709V22.595V22.7192V22.8435V22.9679V23.0923V23.2169V23.3415V23.4661V23.5909V23.7157V23.8406V23.9655V24.0905V24.2156V24.3408V24.466V24.5912V24.7166V24.8419V24.9674V25.0929V25.2184V25.344V25.4696V25.5953V25.7211V25.8468V25.9726V26.0985V26.2244V26.3503V26.4763V26.6023V26.7284V26.8544V26.9806V27.1067V27.2328V27.359V27.4852V27.6115V27.7377V27.864V27.9903V28.1166V28.243V28.3693V28.4956V28.622V28.7484V28.8748V29.0012V29.1275V29.2539V29.3803V29.5067V29.6331V29.7595V29.8859V30.0123V30.1387V30.265V30.3914V30.5177V30.6441V30.7704V30.8967V31.023V31.1492V31.2754V31.4017V31.5279V31.654V31.7802V31.9063V32.0323V32.1584V32.2844V32.4104V32.5363V32.6622V32.7881V32.9139V33.0397V33.1654V33.2911V33.4168V33.5424V33.6679V33.7934V33.9188V34.0442V34.1696V34.2948V34.42V34.5452V34.6703V34.7953V34.9203V35.0452V35.17V35.2947V35.4194V35.544V35.6686V35.793V35.9174V36.0417V36.1659V36.2901V36.4141V36.5381V36.662V36.7858V36.9095V37.0331V37.1566V37.2801V37.4034V37.5266V37.6498V37.7728V37.8957V38.0186V38.1413V38.2639V38.3864V38.5088V38.6311V38.7533V38.8754V38.9973V39.1191V39.2408V39.3624V39.4839V39.6053V39.7265V39.8476V39.9685V40.0894V40.2101V40.3307V40.4511V40.5714V40.6916V40.8116V40.9315V41.0512V41.1708V41.2903V41.4096V41.5288V41.6478V41.7667V41.8854V42.004V42.1224V42.2406V42.3587V42.4766V42.5944V42.712V42.8294V42.9467V43.0638V43.1808V43.2975V43.4141V43.5306V43.6468V43.7629V43.8788V43.9945V44.11V44.2254V44.3406V44.4555V44.5703V44.6849V44.7993V44.9136V45.0276V45.1414V45.2551V45.3685V45.4818V45.5948V45.7076V45.8203V45.9327V46.0449V46.1569V46.2687V46.3803V46.4917V46.6029V46.7138V46.8245V46.9351V47.0453V47.1554V47.2653V47.3749V47.4843V47.5934V47.7024V47.8111V47.9195V48.0278V48.1358V48.2435V48.3511V48.4583V48.5654V48.6722V48.7787V48.885V48.9911V49.0969V49.2024V49.3078V49.4128V49.5176V49.6221V49.7264V49.8304V49.9342V50.0377V50.1409V50.2439V50.3465V50.449V50.5511V50.653V50.7546V50.8559V50.957V51.0578V51.1582V51.2585V51.3584V51.458V51.5574V51.6565V51.7552V51.8537V51.9519V52.0498V52.1474V52.2448V52.3418V52.4385V52.5349V52.631V52.7268V52.8223V52.9175V53.0124V53.1069V53.2012V53.2952V53.3888V53.4821V53.5751V53.6678V53.7601V53.8521V53.9439V54.0352V54.1263V54.217V54.3074V54.3975V54.4872V54.5766V54.5932C48.6675 50.7584 38.3441 46.5962 28.2733 43.3173C18.0609 39.9923 7.95384 37.5244 1.66016 37.2769V23.2006Z" fill="none" stroke-width="2"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M56.7703 0.181641C42.7428 10.2013 12.6838 22.2249 0.660156 22.2249V38.2564C3.19182 38.2564 8.06936 39.0833 11.8822 39.8595L6.27117 53.4863C5.78047 56.4517 7.78661 59.2534 10.752 59.7441C13.7174 60.2349 16.5192 58.2287 17.0099 55.2633L19.8979 41.4627L19.6442 39.9086L19.5098 39.51L41.2658 9.45105H45.2737L21.5122 42.2809C34.1261 45.936 48.342 51.4756 56.7703 56.2918V28.5373L42.6898 47.8979H38.682L55.0188 25.106L56.7703 28.386V11.4099L32.9349 43.1831H28.9271L55.4659 7.44562L56.7703 10.1451V0.181641ZM25.4388 18.068H21.4309L12.6838 31.1271V37.1106L25.4388 18.068Z" stroke="none"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M64.9531 28.002C64.9531 29.1368 65.919 30.0566 67.1105 30.0566L77.178 30.0566C78.3695 30.0566 79.3353 29.1368 79.3353 28.002C79.3353 26.8673 78.3695 25.9474 77.178 25.9474L67.1105 25.9474C65.919 25.9474 64.9531 26.8673 64.9531 28.002Z" stroke="none"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M63.6036 16.1736C64.0749 17.2789 65.353 17.7927 66.4582 17.3214L75.7969 13.3389C76.9021 12.8675 77.416 11.5895 76.9447 10.4843C76.4734 9.37908 75.1953 8.86521 74.0901 9.33653L64.7514 13.3191C63.6462 13.7904 63.1323 15.0684 63.6036 16.1736Z" stroke="none"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M63.6036 39.4919C64.0749 38.3867 65.353 37.8728 66.4582 38.3441L75.7969 42.3267C76.9021 42.798 77.416 44.076 76.9447 45.1812C76.4734 46.2864 75.1953 46.8003 74.0901 46.329L64.7514 42.3464C63.6462 41.8751 63.1323 40.5971 63.6036 39.4919Z" stroke="none"/>
+</symbol>
+
+</svg>
diff --git a/src/assets/scss/_typography.scss b/src/assets/scss/_typography.scss
index d5f92bac1..b340d5a63 100644
--- a/src/assets/scss/_typography.scss
+++ b/src/assets/scss/_typography.scss
@@ -11,6 +11,7 @@ $font-size-medium: 1.25em; // 20px
 $font-size-xmedium: 1.375em; // 22px
 
 $font-size-large: 1.625em; // 26px
+$font-size-xlarge: 1.75em; // 28px
 
 html,
 body,
@@ -43,6 +44,13 @@ h6,
   font-size: $font-size-small;
 }
 
+@mixin cn-bold-28 {
+  font-family: $title-font;
+  font-style: normal;
+  font-weight: bold;
+  font-size: $font-size-xlarge;
+}
+
 @mixin cn-bold-26 {
   font-family: $title-font;
   font-style: normal;
-- 
GitLab


From 0df5b30e5522d2f392dc420a866b49732c7e8ab7 Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Fri, 26 Feb 2021 15:49:45 +0100
Subject: [PATCH 04/17] feat(post) : init card news + fix services

---
 .../post-card/post-card.component.html           |  1 +
 .../post-card/post-card.component.scss}          |  0
 .../post-card/post-card.component.spec.ts}       | 12 ++++++------
 .../components/post-card/post-card.component.ts  | 15 +++++++++++++++
 .../post-list/post-list.component.html           |  3 +++
 .../post-list/post-list.component.scss           |  1 +
 .../components/post-list/post-list.component.ts  |  2 +-
 src/app/post/post.module.ts                      |  3 ++-
 src/app/post/services/post.service.spec.ts       | 16 ++++++++++++++++
 src/app/post/services/post.service.ts            |  9 +++++++++
 src/app/post/services/post/post.component.html   |  1 -
 src/app/post/services/post/post.component.ts     | 15 ---------------
 12 files changed, 54 insertions(+), 24 deletions(-)
 create mode 100644 src/app/post/components/post-card/post-card.component.html
 rename src/app/post/{services/post/post.component.scss => components/post-card/post-card.component.scss} (100%)
 rename src/app/post/{services/post/post.component.spec.ts => components/post-card/post-card.component.spec.ts} (55%)
 create mode 100644 src/app/post/components/post-card/post-card.component.ts
 create mode 100644 src/app/post/services/post.service.spec.ts
 create mode 100644 src/app/post/services/post.service.ts
 delete mode 100644 src/app/post/services/post/post.component.html
 delete mode 100644 src/app/post/services/post/post.component.ts

diff --git a/src/app/post/components/post-card/post-card.component.html b/src/app/post/components/post-card/post-card.component.html
new file mode 100644
index 000000000..8d9923984
--- /dev/null
+++ b/src/app/post/components/post-card/post-card.component.html
@@ -0,0 +1 @@
+<p>post-card works!</p>
diff --git a/src/app/post/services/post/post.component.scss b/src/app/post/components/post-card/post-card.component.scss
similarity index 100%
rename from src/app/post/services/post/post.component.scss
rename to src/app/post/components/post-card/post-card.component.scss
diff --git a/src/app/post/services/post/post.component.spec.ts b/src/app/post/components/post-card/post-card.component.spec.ts
similarity index 55%
rename from src/app/post/services/post/post.component.spec.ts
rename to src/app/post/components/post-card/post-card.component.spec.ts
index b941a2fe1..d4d019381 100644
--- a/src/app/post/services/post/post.component.spec.ts
+++ b/src/app/post/components/post-card/post-card.component.spec.ts
@@ -1,20 +1,20 @@
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 
-import { PostComponent } from './post.component';
+import { PostCardComponent } from './post-card.component';
 
-describe('PostComponent', () => {
-  let component: PostComponent;
-  let fixture: ComponentFixture<PostComponent>;
+describe('PostCardComponent', () => {
+  let component: PostCardComponent;
+  let fixture: ComponentFixture<PostCardComponent>;
 
   beforeEach(async () => {
     await TestBed.configureTestingModule({
-      declarations: [ PostComponent ]
+      declarations: [ PostCardComponent ]
     })
     .compileComponents();
   });
 
   beforeEach(() => {
-    fixture = TestBed.createComponent(PostComponent);
+    fixture = TestBed.createComponent(PostCardComponent);
     component = fixture.componentInstance;
     fixture.detectChanges();
   });
diff --git a/src/app/post/components/post-card/post-card.component.ts b/src/app/post/components/post-card/post-card.component.ts
new file mode 100644
index 000000000..53fa6b42c
--- /dev/null
+++ b/src/app/post/components/post-card/post-card.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-post-card',
+  templateUrl: './post-card.component.html',
+  styleUrls: ['./post-card.component.scss']
+})
+export class PostCardComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit(): void {
+  }
+
+}
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 c9e22c225..d0f59b635 100644
--- a/src/app/post/components/post-list/post-list.component.html
+++ b/src/app/post/components/post-list/post-list.component.html
@@ -16,6 +16,9 @@
       <div fxLayout="row" class="row-border">
         <h2>autres actualités</h2>
       </div>
+      <div *ngFor="let new of news">
+        <app-post-card></app-post-card>
+      </div>
     </div>
   </div>
   <div fxLayout="column" fxLayoutAlign=" center" class="project-container">
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 b3cf207d9..342fced69 100644
--- a/src/app/post/components/post-list/post-list.component.scss
+++ b/src/app/post/components/post-list/post-list.component.scss
@@ -23,6 +23,7 @@
 }
 .project-container {
   width: 20%;
+  height: 100%;
   min-width: 306px;
   @include background-hash($secondary-color);
   border: 1px solid $secondary-color;
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 52014ff68..4a013c29a 100644
--- a/src/app/post/components/post-list/post-list.component.ts
+++ b/src/app/post/components/post-list/post-list.component.ts
@@ -7,7 +7,7 @@ import { Component, OnInit } from '@angular/core';
 })
 export class PostListComponent implements OnInit {
   constructor() {}
-
+  news = ['', '', '', '', '', '', '', '', '', ''];
   ngOnInit(): void {}
 
   public publishNews(): void {}
diff --git a/src/app/post/post.module.ts b/src/app/post/post.module.ts
index a18cc43dd..af61760cb 100644
--- a/src/app/post/post.module.ts
+++ b/src/app/post/post.module.ts
@@ -6,9 +6,10 @@ import { PostHeaderComponent } from './components/post-header/post-header.compon
 import { PostListComponent } from './components/post-list/post-list.component';
 import { PostDetailsComponent } from './components/post-details/post-details.component';
 import { SharedModule } from '../shared/shared.module';
+import { PostCardComponent } from './components/post-card/post-card.component';
 
 @NgModule({
-  declarations: [PostComponent, PostHeaderComponent, PostListComponent, PostDetailsComponent],
+  declarations: [PostComponent, PostHeaderComponent, PostListComponent, PostDetailsComponent, PostCardComponent],
   imports: [CommonModule, PostRoutingModule, SharedModule],
 })
 export class PostModule {}
diff --git a/src/app/post/services/post.service.spec.ts b/src/app/post/services/post.service.spec.ts
new file mode 100644
index 000000000..913642b87
--- /dev/null
+++ b/src/app/post/services/post.service.spec.ts
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { PostService } from './post.service';
+
+describe('PostService', () => {
+  let service: PostService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(PostService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
diff --git a/src/app/post/services/post.service.ts b/src/app/post/services/post.service.ts
new file mode 100644
index 000000000..cbadae187
--- /dev/null
+++ b/src/app/post/services/post.service.ts
@@ -0,0 +1,9 @@
+import { Injectable } from '@angular/core';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class PostService {
+
+  constructor() { }
+}
diff --git a/src/app/post/services/post/post.component.html b/src/app/post/services/post/post.component.html
deleted file mode 100644
index 71b500c4d..000000000
--- a/src/app/post/services/post/post.component.html
+++ /dev/null
@@ -1 +0,0 @@
-<p>post works!</p>
diff --git a/src/app/post/services/post/post.component.ts b/src/app/post/services/post/post.component.ts
deleted file mode 100644
index ae2acfc6e..000000000
--- a/src/app/post/services/post/post.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
-  selector: 'app-post',
-  templateUrl: './post.component.html',
-  styleUrls: ['./post.component.scss']
-})
-export class PostComponent implements OnInit {
-
-  constructor() { }
-
-  ngOnInit(): void {
-  }
-
-}
-- 
GitLab


From 4e081f98eb31eef96214bfb8886d112005484fa7 Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Fri, 26 Feb 2021 17:27:44 +0100
Subject: [PATCH 05/17] feat(post) : feat design card listPost

---
 .../post-card/post-card.component.html        | 16 +++++++++++-
 .../post-card/post-card.component.scss        | 25 +++++++++++++++++++
 .../post-card/post-card.component.ts          | 13 +++++-----
 .../post-list/post-list.component.html        |  9 +++++--
 .../post-list/post-list.component.scss        |  3 +++
 .../post-list/post-list.component.ts          | 21 +++++++++++++---
 src/app/post/models/pagination.model.ts       |  8 ++++++
 src/app/post/models/post.model.ts             |  7 ++++++
 src/app/post/models/postWithMeta.model.ts     | 11 ++++++++
 src/app/post/services/post.service.ts         | 12 +++++++--
 10 files changed, 110 insertions(+), 15 deletions(-)
 create mode 100644 src/app/post/models/pagination.model.ts
 create mode 100644 src/app/post/models/post.model.ts
 create mode 100644 src/app/post/models/postWithMeta.model.ts

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 8d9923984..c73c0f0fa 100644
--- a/src/app/post/components/post-card/post-card.component.html
+++ b/src/app/post/components/post-card/post-card.component.html
@@ -1 +1,15 @@
-<p>post-card works!</p>
+<div fxLayout="column" *ngIf="post" class="post" fxLayoutGap="12px">
+  <div fxLayout="row"></div>
+  <div fxLayout="row" class="title">
+    {{ post.title }}
+  </div>
+  <div fxLayout="row" class="description">
+    {{ post.custom_excerpt }}
+  </div>
+  <div fxLayout="column" class="informations">
+    <div fxLayout="row">
+      {{ post.published_at | date: 'shortDate' }}
+    </div>
+    <div fxLayout="row">par auteurICI</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 e69de29bb..5c3546ce8 100644
--- a/src/app/post/components/post-card/post-card.component.scss
+++ b/src/app/post/components/post-card/post-card.component.scss
@@ -0,0 +1,25 @@
+@import '../../../../assets/scss/color';
+@import '../../../../assets/scss/typography';
+
+.post {
+  padding: 24px 6px;
+  border-bottom: 1px dashed $grey-3;
+  .title {
+    @include cn-bold-20;
+    color: $grey-1;
+  }
+  .description {
+    @include cn-regular-16;
+    color: $black;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box !important;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+  }
+  .informations {
+    @include cn-regular-16;
+    color: $grey-3;
+    font-style: italic;
+  }
+}
diff --git a/src/app/post/components/post-card/post-card.component.ts b/src/app/post/components/post-card/post-card.component.ts
index 53fa6b42c..a5067fe2c 100644
--- a/src/app/post/components/post-card/post-card.component.ts
+++ b/src/app/post/components/post-card/post-card.component.ts
@@ -1,15 +1,14 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, Input, OnInit } from '@angular/core';
+import { Post } from '../../models/post.model';
 
 @Component({
   selector: 'app-post-card',
   templateUrl: './post-card.component.html',
-  styleUrls: ['./post-card.component.scss']
+  styleUrls: ['./post-card.component.scss'],
 })
 export class PostCardComponent implements OnInit {
+  @Input() post: Post;
+  constructor() {}
 
-  constructor() { }
-
-  ngOnInit(): void {
-  }
-
+  ngOnInit(): void {}
 }
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 d0f59b635..4affb6c0a 100644
--- a/src/app/post/components/post-list/post-list.component.html
+++ b/src/app/post/components/post-list/post-list.component.html
@@ -16,8 +16,13 @@
       <div fxLayout="row" class="row-border">
         <h2>autres actualités</h2>
       </div>
-      <div *ngFor="let new of news">
-        <app-post-card></app-post-card>
+      <div fxLayout="row" fxLayoutGap="33px">
+        <div fxLayout="column" class="columnPosts">
+          <app-post-card [post]="news" *ngFor="let news of leftColumnPosts"></app-post-card>
+        </div>
+        <div fxLayout="column" class="columnPosts">
+          <app-post-card [post]="news" *ngFor="let news of rightColumnPosts"></app-post-card>
+        </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 342fced69..379c78857 100644
--- a/src/app/post/components/post-list/post-list.component.scss
+++ b/src/app/post/components/post-list/post-list.component.scss
@@ -20,6 +20,9 @@
     @include cn-bold-28;
     color: $grey-2;
   }
+  .columnPosts {
+    width: 50%;
+  }
 }
 .project-container {
   width: 20%;
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 4a013c29a..9fa76c790 100644
--- a/src/app/post/components/post-list/post-list.component.ts
+++ b/src/app/post/components/post-list/post-list.component.ts
@@ -1,4 +1,7 @@
 import { Component, OnInit } from '@angular/core';
+import { Post } from '../../models/post.model';
+import { PostWithMeta } from '../../models/postWithMeta.model';
+import { PostService } from '../../services/post.service';
 
 @Component({
   selector: 'app-post-list',
@@ -6,9 +9,21 @@ import { Component, OnInit } from '@angular/core';
   styleUrls: ['./post-list.component.scss'],
 })
 export class PostListComponent implements OnInit {
-  constructor() {}
-  news = ['', '', '', '', '', '', '', '', '', ''];
-  ngOnInit(): void {}
+  constructor(private postService: PostService) {}
+  news: PostWithMeta;
+  leftColumnPosts: Post[] = [];
+  rightColumnPosts: Post[] = [];
+  ngOnInit(): void {
+    this.postService.getAllPosts().subscribe((news) => {
+      news.posts.forEach((val, index) => {
+        if (index % 2 == 0) {
+          this.leftColumnPosts.push(val);
+        } else {
+          this.rightColumnPosts.push(val);
+        }
+      });
+    });
+  }
 
   public publishNews(): void {}
 }
diff --git a/src/app/post/models/pagination.model.ts b/src/app/post/models/pagination.model.ts
new file mode 100644
index 000000000..4f9ecaaec
--- /dev/null
+++ b/src/app/post/models/pagination.model.ts
@@ -0,0 +1,8 @@
+export class Pagination {
+  limit: number;
+  next: any;
+  page: number;
+  pages: number;
+  prev: any;
+  total: number;
+}
diff --git a/src/app/post/models/post.model.ts b/src/app/post/models/post.model.ts
new file mode 100644
index 000000000..4f65d0452
--- /dev/null
+++ b/src/app/post/models/post.model.ts
@@ -0,0 +1,7 @@
+export class Post {
+  id: number;
+  published_at: Date;
+  title: string;
+  custom_excerpt: string;
+  feature_image: string;
+}
diff --git a/src/app/post/models/postWithMeta.model.ts b/src/app/post/models/postWithMeta.model.ts
new file mode 100644
index 000000000..b8dcb3578
--- /dev/null
+++ b/src/app/post/models/postWithMeta.model.ts
@@ -0,0 +1,11 @@
+import { Pagination } from './pagination.model';
+import { Post } from './post.model';
+
+export class PostWithMeta {
+  posts: Post[];
+  meta: { pagination: Pagination };
+
+  constructor(obj?: any) {
+    Object.assign(this, obj);
+  }
+}
diff --git a/src/app/post/services/post.service.ts b/src/app/post/services/post.service.ts
index cbadae187..903f655f5 100644
--- a/src/app/post/services/post.service.ts
+++ b/src/app/post/services/post.service.ts
@@ -1,9 +1,17 @@
+import { HttpClient } from '@angular/common/http';
 import { Injectable } from '@angular/core';
+import { Observable } from 'rxjs';
+import { map } from 'rxjs/operators';
+import { PostWithMeta } from '../models/postWithMeta.model';
 
 @Injectable({
-  providedIn: 'root'
+  providedIn: 'root',
 })
 export class PostService {
+  private readonly baseUrl = 'api/posts';
+  constructor(private http: HttpClient) {}
 
-  constructor() { }
+  public getAllPosts(): Observable<PostWithMeta> {
+    return this.http.get<PostWithMeta>(`${this.baseUrl}`).pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
+  }
 }
-- 
GitLab


From e64b31e5ca3c7511398a730b629fd2a32d74decd Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Mon, 1 Mar 2021 14:49:30 +0100
Subject: [PATCH 06/17] feat(post) : add img to post + fix request to include
 tags/author

---
 .../post-card/post-card.component.html        |  8 ++++---
 .../post-card/post-card.component.scss        | 17 +++++++++++++
 .../post-card/post-card.component.ts          |  1 +
 .../post-list/post-list.component.html        |  1 +
 .../post-list/post-list.component.scss        |  6 ++++-
 .../post-list/post-list.component.ts          |  9 ++++++-
 src/app/post/services/post.service.ts         | 24 +++++++++++++++++--
 7 files changed, 59 insertions(+), 7 deletions(-)

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 c73c0f0fa..0733c5981 100644
--- a/src/app/post/components/post-card/post-card.component.html
+++ b/src/app/post/components/post-card/post-card.component.html
@@ -1,5 +1,7 @@
-<div fxLayout="column" *ngIf="post" class="post" fxLayoutGap="12px">
-  <div fxLayout="row"></div>
+<div fxLayout="column" *ngIf="post" class="post" [ngClass]="class" fxLayoutGap="12px">
+  <div fxLayout="row" class="imageContainer" *ngIf="post.feature_image">
+    <img class="image" [src]="post.feature_image" />
+  </div>
   <div fxLayout="row" class="title">
     {{ post.title }}
   </div>
@@ -10,6 +12,6 @@
     <div fxLayout="row">
       {{ post.published_at | date: 'shortDate' }}
     </div>
-    <div fxLayout="row">par auteurICI</div>
+    <div fxLayout="row">par {{ post.primary_author.name }}</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 5c3546ce8..41c9a24e1 100644
--- a/src/app/post/components/post-card/post-card.component.scss
+++ b/src/app/post/components/post-card/post-card.component.scss
@@ -4,6 +4,23 @@
 .post {
   padding: 24px 6px;
   border-bottom: 1px dashed $grey-3;
+  &.bigNew {
+    border: 0;
+    .imageContainer {
+      .image {
+        object-fit: cover;
+        height: 360px;
+        width: 100%;
+      }
+    }
+  }
+  .imageContainer {
+    .image {
+      object-fit: cover;
+      height: 88px;
+      width: 195px;
+    }
+  }
   .title {
     @include cn-bold-20;
     color: $grey-1;
diff --git a/src/app/post/components/post-card/post-card.component.ts b/src/app/post/components/post-card/post-card.component.ts
index a5067fe2c..e73dd03b3 100644
--- a/src/app/post/components/post-card/post-card.component.ts
+++ b/src/app/post/components/post-card/post-card.component.ts
@@ -8,6 +8,7 @@ import { Post } from '../../models/post.model';
 })
 export class PostCardComponent implements OnInit {
   @Input() post: Post;
+  @Input() class: string;
   constructor() {}
 
   ngOnInit(): void {}
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 4affb6c0a..4f9694300 100644
--- a/src/app/post/components/post-list/post-list.component.html
+++ b/src/app/post/components/post-list/post-list.component.html
@@ -10,6 +10,7 @@
           (action)="publishNews()"
         ></app-button>
       </div>
+      <app-post-card [class]="'bigNew'" [post]="bigNews"></app-post-card>
     </div>
 
     <div fxLayout="column">
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 379c78857..1f483aca6 100644
--- a/src/app/post/components/post-list/post-list.component.scss
+++ b/src/app/post/components/post-list/post-list.component.scss
@@ -13,7 +13,11 @@
     text-transform: uppercase;
   }
 }
-
+.test {
+  div {
+    border: 0;
+  }
+}
 .list-container {
   width: 80%;
   h2 {
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 9fa76c790..9f85d69fc 100644
--- a/src/app/post/components/post-list/post-list.component.ts
+++ b/src/app/post/components/post-list/post-list.component.ts
@@ -13,8 +13,11 @@ export class PostListComponent implements OnInit {
   news: PostWithMeta;
   leftColumnPosts: Post[] = [];
   rightColumnPosts: Post[] = [];
+  projectsNew: Post[] = [];
+  bigNews: Post;
   ngOnInit(): void {
-    this.postService.getAllPosts().subscribe((news) => {
+    this.postService.getPosts().subscribe((news) => {
+      console.log(news);
       news.posts.forEach((val, index) => {
         if (index % 2 == 0) {
           this.leftColumnPosts.push(val);
@@ -23,6 +26,10 @@ export class PostListComponent implements OnInit {
         }
       });
     });
+    this.postService.getPosts(['bignew']).subscribe((news) => {
+      this.bigNews = news.posts[0];
+      console.log(this.bigNews);
+    });
   }
 
   public publishNews(): void {}
diff --git a/src/app/post/services/post.service.ts b/src/app/post/services/post.service.ts
index 903f655f5..f530c8e6f 100644
--- a/src/app/post/services/post.service.ts
+++ b/src/app/post/services/post.service.ts
@@ -11,7 +11,27 @@ export class PostService {
   private readonly baseUrl = 'api/posts';
   constructor(private http: HttpClient) {}
 
-  public getAllPosts(): Observable<PostWithMeta> {
-    return this.http.get<PostWithMeta>(`${this.baseUrl}`).pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
+  public getAllPostss(): Observable<PostWithMeta> {
+    return this.http
+      .get<PostWithMeta>(`${this.baseUrl}?include=tags,authors&filter=tag:-[getting-started,jeremie]`)
+      .pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
+  }
+  public getPosts(tags?: string[]): Observable<PostWithMeta> {
+    if (!tags) {
+      return this.http
+        .get<PostWithMeta>(`${this.baseUrl}?include=tags,authors`)
+        .pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
+    }
+    let tagsString = '';
+    // Transform tab filters to string filters
+    tags.forEach((tag, index) => {
+      tagsString += tag;
+      if (index != tags.length - 1) {
+        tagsString += ',';
+      }
+    });
+    return this.http
+      .get<PostWithMeta>(`${this.baseUrl}?include=tags,authors&filter=tag:[${tagsString}]`)
+      .pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
   }
 }
-- 
GitLab


From b722802af30ac56c00ea02698b3bc7059701ff55 Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Tue, 2 Mar 2021 14:53:04 +0100
Subject: [PATCH 07/17] feat(post)  : add author + tag

---
 .../post-card/post-card.component.html        | 25 ++++++---
 .../post-card/post-card.component.scss        | 14 +++++
 .../post-card/post-card.component.ts          | 30 ++++++++++-
 .../post-list/post-list.component.html        |  6 +++
 .../post-list/post-list.component.scss        |  6 +--
 .../post-list/post-list.component.ts          | 23 ++++++--
 src/app/post/enum/tagEnum.enum.ts             |  9 ++++
 src/app/post/models/post.model.ts             |  7 ++-
 src/app/post/models/tag.model.ts              |  4 ++
 src/app/post/services/post.service.ts         |  7 +--
 src/assets/post/sprite.svg                    | 54 +++++++++++++++++++
 11 files changed, 162 insertions(+), 23 deletions(-)
 create mode 100644 src/app/post/enum/tagEnum.enum.ts
 create mode 100644 src/app/post/models/tag.model.ts

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 0733c5981..3dc507bda 100644
--- a/src/app/post/components/post-card/post-card.component.html
+++ b/src/app/post/components/post-card/post-card.component.html
@@ -1,17 +1,28 @@
 <div fxLayout="column" *ngIf="post" class="post" [ngClass]="class" fxLayoutGap="12px">
-  <div fxLayout="row" class="imageContainer" *ngIf="post.feature_image">
-    <img class="image" [src]="post.feature_image" />
-  </div>
-  <div fxLayout="row" class="title">
-    {{ post.title }}
+  <div fxLayout="column" fxLayoutGap="4px">
+    <div fxLayout="row" class="tag" fxLayoutAlign=" center" fxLayoutGap="12px" *ngIf="getIconOfTag(post.tags[0].slug)">
+      <app-svg-icon
+        [iconClass]="'icon-32'"
+        [iconColor]="'inherit'"
+        [type]="'post'"
+        [icon]="getIconOfTag(post.tags[0].slug)"
+      ></app-svg-icon>
+      <span>{{ post.tags[0].name }}</span>
+    </div>
+    <div fxLayout="row" class="imageContainer" *ngIf="post.feature_image">
+      <img class="image" [src]="post.feature_image" />
+    </div>
+    <div fxLayout="row" class="title">
+      {{ post.title }}
+    </div>
   </div>
   <div fxLayout="row" class="description">
-    {{ post.custom_excerpt }}
+    {{ post.excerpt }}
   </div>
   <div fxLayout="column" class="informations">
     <div fxLayout="row">
       {{ post.published_at | date: 'shortDate' }}
     </div>
-    <div fxLayout="row">par {{ post.primary_author.name }}</div>
+    <div fxLayout="row">par {{ post.author }}</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 41c9a24e1..fd0d45d24 100644
--- a/src/app/post/components/post-card/post-card.component.scss
+++ b/src/app/post/components/post-card/post-card.component.scss
@@ -21,6 +21,13 @@
       width: 195px;
     }
   }
+  .tag {
+    @include cn-bold-16;
+    text-transform: uppercase;
+    color: $secondary-color;
+    fill: $secondary-color;
+    stroke: $secondary-color;
+  }
   .title {
     @include cn-bold-20;
     color: $grey-1;
@@ -40,3 +47,10 @@
     font-style: italic;
   }
 }
+.project {
+  text-align: left;
+  .imageContainer,
+  .informations {
+    display: none !important;
+  }
+}
diff --git a/src/app/post/components/post-card/post-card.component.ts b/src/app/post/components/post-card/post-card.component.ts
index e73dd03b3..317e19c03 100644
--- a/src/app/post/components/post-card/post-card.component.ts
+++ b/src/app/post/components/post-card/post-card.component.ts
@@ -1,4 +1,5 @@
 import { Component, Input, OnInit } from '@angular/core';
+import { TagEnum } from '../../enum/tagEnum.enum';
 import { Post } from '../../models/post.model';
 
 @Component({
@@ -9,7 +10,34 @@ import { Post } from '../../models/post.model';
 export class PostCardComponent implements OnInit {
   @Input() post: Post;
   @Input() class: string;
+  test: string;
   constructor() {}
 
-  ngOnInit(): void {}
+  ngOnInit(): void {
+    /*ùif (this.post) {
+      console.log(this.post);
+      this.test = this.post.html.replace(/<[^>]*>/g, '');
+    }*/
+  }
+
+  getIconOfTag(tag: string): string {
+    switch (tag) {
+      case TagEnum.aLaUne:
+        return 'a-la-une';
+      case TagEnum.formation:
+        return 'formationTag';
+      case TagEnum.projet:
+        return 'projetTag';
+      case TagEnum.ressource:
+        return 'ressourceTag';
+      case TagEnum.info:
+        return 'infoTag';
+      case TagEnum.etude:
+        return 'etudeTag';
+      case TagEnum.dossier:
+        return 'dossierTag';
+      default:
+        return null;
+    }
+  }
 }
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 4f9694300..89aef5777 100644
--- a/src/app/post/components/post-list/post-list.component.html
+++ b/src/app/post/components/post-list/post-list.component.html
@@ -32,6 +32,12 @@
       <div class="project-content" fxLayout="column">
         <app-svg-icon [iconClass]="'icon-80'" [iconColor]="'inherit'" [type]="'post'" [icon]="'project'"></app-svg-icon>
         <h2>appels à projets</h2>
+        <app-post-card
+          [post]="news"
+          [class]="'project'"
+          [ngClass]="{ 'last-child': last }"
+          *ngFor="let news of projectsNew; let last = last"
+        ></app-post-card>
       </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 1f483aca6..cf2195aeb 100644
--- a/src/app/post/components/post-list/post-list.component.scss
+++ b/src/app/post/components/post-list/post-list.component.scss
@@ -13,8 +13,8 @@
     text-transform: uppercase;
   }
 }
-.test {
-  div {
+.last-child {
+  ::ng-deep .post {
     border: 0;
   }
 }
@@ -41,7 +41,7 @@
     background: $white;
     border-radius: 6px;
     .project-content {
-      padding: 18px 32px 62px 36px;
+      padding: 18px 32px 26px 36px;
       fill: $secondary-color;
       stroke: $secondary-color;
       text-align: center;
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 9f85d69fc..bb399cb45 100644
--- a/src/app/post/components/post-list/post-list.component.ts
+++ b/src/app/post/components/post-list/post-list.component.ts
@@ -10,15 +10,15 @@ import { PostService } from '../../services/post.service';
 })
 export class PostListComponent implements OnInit {
   constructor(private postService: PostService) {}
-  news: PostWithMeta;
   leftColumnPosts: Post[] = [];
   rightColumnPosts: Post[] = [];
   projectsNew: Post[] = [];
   bigNews: Post;
+  projectsNews: Post[];
   ngOnInit(): void {
     this.postService.getPosts().subscribe((news) => {
-      console.log(news);
       news.posts.forEach((val, index) => {
+        val = this.addAuthorToPost(val);
         if (index % 2 == 0) {
           this.leftColumnPosts.push(val);
         } else {
@@ -26,11 +26,24 @@ export class PostListComponent implements OnInit {
         }
       });
     });
-    this.postService.getPosts(['bignew']).subscribe((news) => {
-      this.bigNews = news.posts[0];
-      console.log(this.bigNews);
+    this.postService.getPosts(['a-la-une']).subscribe((news) => {
+      this.bigNews = this.addAuthorToPost(news.posts[0]);
+    });
+    this.postService.getPosts(['appels']).subscribe((news) => {
+      let projectNews = news.posts;
+      projectNews.forEach((news) => {
+        news = this.addAuthorToPost(news);
+      });
+      this.projectsNew = projectNews;
     });
   }
 
   public publishNews(): void {}
+
+  //Transform excerpt post to have a custom author.
+  private addAuthorToPost(post: Post): Post {
+    post.author = post.excerpt;
+    post.excerpt = post.html.replace(/<[^>]*>/g, '');
+    return post;
+  }
 }
diff --git a/src/app/post/enum/tagEnum.enum.ts b/src/app/post/enum/tagEnum.enum.ts
new file mode 100644
index 000000000..de26cf710
--- /dev/null
+++ b/src/app/post/enum/tagEnum.enum.ts
@@ -0,0 +1,9 @@
+export enum TagEnum {
+  aLaUne = 'a-la-une',
+  formation = 'formations',
+  projet = 'projets',
+  ressource = 'ressources',
+  info = 'infos',
+  etude = 'etudes',
+  dossier = 'dossiers',
+}
diff --git a/src/app/post/models/post.model.ts b/src/app/post/models/post.model.ts
index 4f65d0452..53efadc33 100644
--- a/src/app/post/models/post.model.ts
+++ b/src/app/post/models/post.model.ts
@@ -1,7 +1,12 @@
+import { Tag } from './tag.model';
+
 export class Post {
   id: number;
   published_at: Date;
   title: string;
-  custom_excerpt: string;
+  excerpt: string;
   feature_image: string;
+  html: string;
+  author: string;
+  tags: Tag[];
 }
diff --git a/src/app/post/models/tag.model.ts b/src/app/post/models/tag.model.ts
new file mode 100644
index 000000000..df72a66b1
--- /dev/null
+++ b/src/app/post/models/tag.model.ts
@@ -0,0 +1,4 @@
+export class Tag {
+  name: string;
+  slug: string;
+}
diff --git a/src/app/post/services/post.service.ts b/src/app/post/services/post.service.ts
index f530c8e6f..848e6a58e 100644
--- a/src/app/post/services/post.service.ts
+++ b/src/app/post/services/post.service.ts
@@ -11,15 +11,10 @@ export class PostService {
   private readonly baseUrl = 'api/posts';
   constructor(private http: HttpClient) {}
 
-  public getAllPostss(): Observable<PostWithMeta> {
-    return this.http
-      .get<PostWithMeta>(`${this.baseUrl}?include=tags,authors&filter=tag:-[getting-started,jeremie]`)
-      .pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
-  }
   public getPosts(tags?: string[]): Observable<PostWithMeta> {
     if (!tags) {
       return this.http
-        .get<PostWithMeta>(`${this.baseUrl}?include=tags,authors`)
+        .get<PostWithMeta>(`${this.baseUrl}?include=tags,authors&filter=tag:-[appels,a-la-une]`)
         .pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
     }
     let tagsString = '';
diff --git a/src/assets/post/sprite.svg b/src/assets/post/sprite.svg
index 9c8181e25..5e60b294b 100644
--- a/src/assets/post/sprite.svg
+++ b/src/assets/post/sprite.svg
@@ -8,4 +8,58 @@
 <path fill-rule="evenodd" clip-rule="evenodd" d="M63.6036 39.4919C64.0749 38.3867 65.353 37.8728 66.4582 38.3441L75.7969 42.3267C76.9021 42.798 77.416 44.076 76.9447 45.1812C76.4734 46.2864 75.1953 46.8003 74.0901 46.329L64.7514 42.3464C63.6462 41.8751 63.1323 40.5971 63.6036 39.4919Z" stroke="none"/>
 </symbol>
 
+<symbol id="projetTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<mask id="path-1-inside-1" fill="white">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M4 7C4 5.34315 5.34315 4 7 4C8.65685 4 10 5.34315 10 7V24C10 25.6569 8.65685 27 7 27C5.34315 27 4 25.6569 4 24V7ZM7 26C8.10457 26 9 25.1046 9 24C9 22.8954 8.10457 22 7 22C5.89543 22 5 22.8954 5 24C5 25.1046 5.89543 26 7 26Z"/>
+</mask>
+<path d="M7 3C4.79086 3 3 4.79086 3 7H5C5 5.89543 5.89543 5 7 5V3ZM11 7C11 4.79086 9.20914 3 7 3V5C8.10457 5 9 5.89543 9 7H11ZM11 24V7H9V24H11ZM7 28C9.20914 28 11 26.2091 11 24H9C9 25.1046 8.10457 26 7 26V28ZM3 24C3 26.2091 4.79086 28 7 28V26C5.89543 26 5 25.1046 5 24H3ZM3 7V24H5V7H3ZM8 24C8 24.5523 7.55228 25 7 25V27C8.65685 27 10 25.6569 10 24H8ZM7 23C7.55228 23 8 23.4477 8 24H10C10 22.3431 8.65685 21 7 21V23ZM6 24C6 23.4477 6.44771 23 7 23V21C5.34315 21 4 22.3431 4 24H6ZM7 25C6.44772 25 6 24.5523 6 24H4C4 25.6569 5.34315 27 7 27V25Z" stroke="none" mask="url(#path-1-inside-1)"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M7 27H10L24 7H25.5L11.5 27H14L27.5 8L28 9.5L15.5 27H18L27.5 14L28 15.5L19.5 27H22L27.5 19.5L28 21L23.5 27H28V21V15.5V9.5V6H9.82929C9.93985 6.31278 10 6.64936 10 7V9L11.5 7H13L10 11.0909V14.4412L15.5 7H17L10 16.5789V21.0909L20 7H21.5L10 23.56V24C10 25.6569 8.65685 27 7 27Z" stroke="none"/>
+<path d="M7 27H28V6.5H9.95852C9.9858 6.6626 10 6.82964 10 7V7.5H27V26H9.23611C8.68679 26.6137 7.8885 27 7 27Z" stroke="none"/>
+<path d="M9 24C9 25.1046 8.10457 26 7 26C5.89543 26 5 25.1046 5 24C5 22.8954 5.89543 22 7 22C8.10457 22 9 22.8954 9 24Z" stroke="none"/>
+</symbol>
+
+<symbol id="ressourceTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<path d="M3.5 25V13.0495C7.32281 13.9728 11.7651 14.5 16.5 14.5C20.828 14.5 24.9112 14.0595 28.5 13.2789V25C28.5 25.2761 28.2761 25.5 28 25.5H4C3.72386 25.5 3.5 25.2761 3.5 25Z" fill="none"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M20 6H13V8H20V6ZM13 4C11.8954 4 11 4.89543 11 6V9H22V6C22 4.89543 21.1046 4 20 4H13Z" stroke="none"/>
+<path d="M28.5 13.2602C27.6168 13.4803 26.8068 13.7326 26.0024 13.9831L25.9955 13.9852C24.3831 14.4874 22.7659 14.9905 20.5 15.2722V15C20.5 14.1716 19.8284 13.5 19 13.5H14C13.1716 13.5 12.5 14.1716 12.5 15V15.2709C9.84798 14.949 7.85358 14.3349 5.87723 13.7256L5.87212 13.724C5.09326 13.4839 4.31292 13.2433 3.5 13.0242V9C3.5 8.72386 3.72386 8.5 4 8.5H28C28.2761 8.5 28.5 8.72386 28.5 9V13.2602Z"/>
+<path d="M3 13.4095C3.7817 13.6107 4.59178 13.795 5.42722 13.9611L3 17.4286V13.4095Z" stroke="none"/>
+<path d="M29 13.6541V16L22 26L18.5 26L26.8278 14.1031C27.5713 13.9674 28.296 13.8174 29 13.6541Z" stroke="none"/>
+<path d="M29 18.1429V23.1429L27 26H23.5L29 18.1429Z" stroke="none"/>
+<path d="M28.7003 25.7138C28.788 25.6278 28.8598 25.5259 28.9112 25.4126L28.7003 25.7138Z" stroke="none"/>
+<path d="M21.3318 14.8118C22.6365 14.7087 23.9059 14.5647 25.1318 14.3832L17 26H13.5L19.1037 17.9947C19.6073 17.9428 20 17.5173 20 17V16.7143L21.3318 14.8118Z" stroke="none"/>
+<path d="M17.6 18L12 26H8.50001L14.1 18H17.6Z" stroke="none"/>
+<path d="M13.0602 17.3426L7.00001 26H4C3.84543 26 3.69905 25.9649 3.56839 25.9023L11.35 14.7858C11.8954 14.8318 12.4472 14.8707 13.0047 14.9022C13.0016 14.9344 13 14.967 13 15V17C13 17.1203 13.0213 17.2357 13.0602 17.3426Z" stroke="none"/>
+<path d="M6.75572 14.2061C7.78653 14.3818 8.8514 14.5304 9.94511 14.6498L3 24.5714V19.5714L6.75572 14.2061Z" stroke="none"/>
+<rect x="13.5" y="14.5" width="6" height="3" rx="0.5" fill="none"/>
+</symbol>
+
+<symbol id="infoTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<path d="M23 25.5H9.44949C10.0978 24.8647 10.5 23.9793 10.5 23V5.5H25.5V23C25.5 24.3807 24.3807 25.5 23 25.5Z" fill="none"/>
+<rect x="12" y="16" width="12" height="1" rx="0.5" stroke="none"/>
+<rect x="12" y="19" width="12" height="1" rx="0.5" stroke="none"/>
+<rect x="12" y="22" width="12" height="1" rx="0.5" stroke="none"/>
+<rect x="12" y="8" width="12" height="6" rx="1" stroke="none"/>
+<path d="M11 12V13.5L5.00001 20.5V17.2273L9.60001 12H11Z" stroke="none"/>
+<path d="M5.00001 22.5V22.2273L11 15.4091L11 18.5L6 24.5C5.48214 24.0507 5.00001 23.1722 5.00001 22.5Z" stroke="none"/>
+<path d="M7.06819 24.8771C7.36151 24.9569 7.67471 25 8.00001 25C9.65686 25 11 23.8807 11 22.5V20.4091L7.06819 24.8771Z" stroke="none"/>
+<path d="M8 12H5.00001L5 15.5L8 12Z" stroke="none"/>
+<path d="M5.5 12.5H10.5V23C10.5 24.3807 9.38071 25.5 8 25.5C6.61929 25.5 5.5 24.3807 5.5 23V12.5Z" fill="none"/>
+</symbol>
+
+<symbol id="formationTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M3 28V24.4C3 22.1088 4.1007 20.0762 5.79995 18.7998C4.80938 17.7598 4.2 16.3513 4.2 14.8C4.2 11.5967 6.79675 9 10 9C13.2033 9 15.8 11.5967 15.8 14.8C15.8 16.3513 15.1906 17.7598 14.2001 18.7998C15.8993 20.0762 17 22.1088 17 24.4V28H3ZM13.4307 19.4769C13.1256 19.2639 12.7998 19.0785 12.4568 18.9244C12.7774 18.7331 13.0738 18.5054 13.3403 18.2471C14.2405 17.3746 14.8 16.1527 14.8 14.8C14.8 12.149 12.651 10 10 10C7.34903 10 5.2 12.149 5.2 14.8C5.2 16.1527 5.75951 17.3746 6.65971 18.2471C6.92623 18.5054 7.2226 18.7331 7.54316 18.9244C7.20024 19.0785 6.87441 19.2639 6.56931 19.4769C5.01609 20.5613 4 22.362 4 24.4V27H16V24.4C16 22.362 14.9839 20.5613 13.4307 19.4769Z" stroke="none"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M2 6H30V22H16.5777C16.3879 21.4799 16.1381 20.9887 15.8369 20.5348L25.6379 7H24.1379L15.0488 19.5516C14.7868 19.2788 14.503 19.0273 14.2001 18.7998C15.1906 17.7598 15.8 16.3513 15.8 14.8C15.8 14.4589 15.7705 14.1246 15.7141 13.7996L20.6379 7H19.1379L15.2607 12.3543C14.8403 11.4515 14.1943 10.675 13.3952 10.0971L15.6379 7H14.1379L12.3353 9.48933C11.6208 9.17468 10.8308 9 10 9C9.70926 9 9.42352 9.02139 9.14426 9.06269L10.6379 7H9.13793L7.14742 9.74881C5.70291 10.5663 4.64387 11.9856 4.3108 13.666L3 15.4762V17.5476L4.28201 15.7772C4.46929 16.8805 4.96816 17.8775 5.68402 18.6744L5.28319 19.228C4.45784 19.9811 3.81311 20.9293 3.4223 22H2V6ZM29 7.19048V9.2619L20.5 21H19L29 7.19048ZM25.5 21H24L29 14.0952V16.1667L25.5 21ZM5.63793 7L3 10.6429V8.57143L4.13793 7H5.63793Z" stroke="none"/>
+</symbol>
+
+<symbol id="etudeTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<path d="M27.722 26.2329L22.4916 21.0959C24.0154 19.2877 24.9215 16.9452 24.9215 14.4384C24.8803 8.68493 20.2265 4 14.4607 4C8.69498 4 4 8.68493 4 14.4384C4 20.1918 8.69498 24.8767 14.4607 24.8767C16.9318 24.8767 19.2381 24.0137 21.009 22.5753L26.2394 27.7123C26.4453 27.9178 26.6924 28 26.9807 28C27.2278 28 27.5161 27.9178 27.722 27.7123C28.0927 27.3014 28.0927 26.6438 27.722 26.2329ZM6.0592 14.4384C6.0592 9.79452 9.80695 6.05479 14.4607 6.05479C19.1145 6.05479 22.8623 9.79452 22.8623 14.4384C22.8623 19.0822 19.1145 22.8219 14.4607 22.8219C9.80695 22.8219 6.0592 19.0411 6.0592 14.4384Z" stroke="none"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M14.7457 5.3282C14.0022 5.11446 13.2157 5 12.4015 5C12.2296 5 12.0588 5.00511 11.8895 5.01518L10.4509 6.97689C11.5862 6.37483 12.878 6.02499 14.2521 6.00129L14.7457 5.3282ZM13.0585 7.62894C9.87909 8.24863 7.5 11.0292 7.5 14.3836C7.5 14.6426 7.51448 14.8985 7.5427 15.1504L13.0585 7.62894ZM7.97683 16.8961L14.8566 7.51456C15.8686 7.57953 16.8194 7.85975 17.6638 8.30994L9.59266 19.316C8.89414 18.6378 8.33923 17.8141 7.97683 16.8961ZM6.34942 16.7776C6.12204 16.018 6 15.2141 6 14.3836C6 13.8626 6.04717 13.353 6.13749 12.8588L4.25314 15.4284C4.49144 16.3727 4.89089 17.2551 5.42099 18.0437L6.34942 16.7776ZM6.96335 18.2781C7.41071 19.1257 7.99942 19.8888 8.69862 20.5352L8.49887 20.8076C7.68288 20.3787 6.94656 19.8199 6.31708 19.1594L6.96335 18.2781ZM17.141 6.45253C16.8055 6.22416 16.4523 6.01946 16.084 5.84081L15.874 6.12727C16.3089 6.20341 16.7322 6.31273 17.141 6.45253ZM13.3275 21.1841C12.3621 21.0332 11.464 20.6823 10.6762 20.1762L18.8131 9.08041C19.5054 9.65324 20.0826 10.359 20.5064 11.159C20.5221 11.2167 20.5373 11.2746 20.5518 11.3328L13.3275 21.1841ZM21.157 12.9614C21.2528 13.4201 21.3031 13.8957 21.3031 14.3836C21.3031 17.9947 18.5458 20.9409 15.0011 21.2418L21.157 12.9614ZM9.9145 5.37067C6.48201 6.42403 4 9.60441 4 13.3836L4.00016 13.4357L9.9145 5.37067Z" stroke="none"/>
+</symbol>
+
+<symbol id="dossierTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M2 9C2 7.89543 2.89543 7 4 7H8C9.10457 7 10 7.89543 10 9V10H27C27.5523 10 28 10.4477 28 11V13H6.32973C5.84861 13 5.43568 13.3426 5.34691 13.8155L3.28171 24.8155C3.16616 25.431 3.63831 26 4.26454 26H3C2.44772 26 2 25.5523 2 25V9Z" stroke="none"/>
+<path d="M5.72708 13.8721C5.78513 13.6528 5.98357 13.5 6.21044 13.5H29.1416C29.4697 13.5 29.7089 13.8107 29.6249 14.1279L26.7136 25.1279C26.6555 25.3472 26.4571 25.5 26.2302 25.5H3.2991C2.97097 25.5 2.73179 25.1893 2.81574 24.8721L5.72708 13.8721Z" fill="none"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M29.2607 17.2341L30.049 14.2559C30.1737 13.7846 29.9418 13.3205 29.5453 13.113L20.8378 26H23.3378L29.2607 17.2341ZM24.8378 26H26.1709C26.6247 26 27.0215 25.6945 27.1376 25.2559L28.2948 20.8837L24.8378 26ZM25.6216 13H28.1216L19.3378 26H16.8378L25.6216 13ZM24.1216 13H21.6216L12.8378 26H15.3378L24.1216 13ZM17.6216 13H20.1216L11.3378 26H8.83784L17.6216 13ZM16.1216 13H13.6216L4.83784 26H7.33784L16.1216 13ZM9.62162 13H12.1216L3.33784 26H3.20521C2.57898 26 2.10683 25.431 2.22239 24.8155L2.44717 23.6182L9.62162 13ZM8.12162 13H5.27041C5.26124 13 5.2521 13.0001 5.24299 13.0004L4.13187 14.6448L3.02434 20.544L8.12162 13Z" stroke="none"/>
+</symbol>
+
 </svg>
-- 
GitLab


From 2a63fd5752ad2ff88cb13f2122d6c1dabd8ccddd Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Tue, 2 Mar 2021 15:35:40 +0100
Subject: [PATCH 08/17] feat(post) : clean code

---
 src/app/post/components/post-card/post-card.component.ts | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/app/post/components/post-card/post-card.component.ts b/src/app/post/components/post-card/post-card.component.ts
index 317e19c03..2233a51ae 100644
--- a/src/app/post/components/post-card/post-card.component.ts
+++ b/src/app/post/components/post-card/post-card.component.ts
@@ -13,12 +13,7 @@ export class PostCardComponent implements OnInit {
   test: string;
   constructor() {}
 
-  ngOnInit(): void {
-    /*ùif (this.post) {
-      console.log(this.post);
-      this.test = this.post.html.replace(/<[^>]*>/g, '');
-    }*/
-  }
+  ngOnInit(): void {}
 
   getIconOfTag(tag: string): string {
     switch (tag) {
-- 
GitLab


From e13b299a239c03e0c9a5f6006c9a07dc3f59aefe Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Tue, 2 Mar 2021 16:12:42 +0100
Subject: [PATCH 09/17] feat(post) : fix responsive mobile

---
 .../post-card/post-card.component.scss        | 15 +++++++-
 .../post-list/post-list.component.html        | 19 +++++++++-
 .../post-list/post-list.component.scss        | 38 +++++++++++++++++++
 .../post-list/post-list.component.ts          |  5 ++-
 4 files changed, 73 insertions(+), 4 deletions(-)

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 fd0d45d24..59ab4c38b 100644
--- a/src/app/post/components/post-card/post-card.component.scss
+++ b/src/app/post/components/post-card/post-card.component.scss
@@ -1,8 +1,9 @@
 @import '../../../../assets/scss/color';
 @import '../../../../assets/scss/typography';
+@import '../../../../assets/scss/breakpoint';
 
 .post {
-  padding: 24px 6px;
+  padding: 16px 0px;
   border-bottom: 1px dashed $grey-3;
   &.bigNew {
     border: 0;
@@ -11,6 +12,9 @@
         object-fit: cover;
         height: 360px;
         width: 100%;
+        @media #{$large-phone} {
+          height: 147px;
+        }
       }
     }
   }
@@ -19,6 +23,9 @@
       object-fit: cover;
       height: 88px;
       width: 195px;
+      @media #{$large-phone} {
+        height: 70px;
+      }
     }
   }
   .tag {
@@ -29,10 +36,16 @@
     stroke: $secondary-color;
   }
   .title {
+    @media #{$large-phone} {
+      @include cn-bold-18;
+    }
     @include cn-bold-20;
     color: $grey-1;
   }
   .description {
+    @media #{$large-phone} {
+      display: none !important;
+    }
     @include cn-regular-16;
     color: $black;
     overflow: hidden;
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 89aef5777..c6dda1250 100644
--- a/src/app/post/components/post-list/post-list.component.html
+++ b/src/app/post/components/post-list/post-list.component.html
@@ -12,7 +12,19 @@
       </div>
       <app-post-card [class]="'bigNew'" [post]="bigNews"></app-post-card>
     </div>
-
+    <div fxLayout="column" fxLayoutAlign=" center" class="project-container mobile">
+      <div class="background-project-container">
+        <div class="project-content mobile" fxLayout="column">
+          <h2>appels à projets</h2>
+          <app-post-card
+            [post]="news"
+            [class]="'project'"
+            [ngClass]="{ 'last-child': last }"
+            *ngFor="let news of projectsNew; let last = last"
+          ></app-post-card>
+        </div>
+      </div>
+    </div>
     <div fxLayout="column">
       <div fxLayout="row" class="row-border">
         <h2>autres actualités</h2>
@@ -24,10 +36,13 @@
         <div fxLayout="column" class="columnPosts">
           <app-post-card [post]="news" *ngFor="let news of rightColumnPosts"></app-post-card>
         </div>
+        <div fxLayout="column" class="columnPostsMobile">
+          <app-post-card [post]="news" *ngFor="let news of postsMobileView"></app-post-card>
+        </div>
       </div>
     </div>
   </div>
-  <div fxLayout="column" fxLayoutAlign=" center" class="project-container">
+  <div fxLayout="column" fxLayoutAlign=" center" class="project-container desktop">
     <div class="background-project-container">
       <div class="project-content" fxLayout="column">
         <app-svg-icon [iconClass]="'icon-80'" [iconColor]="'inherit'" [type]="'post'" [icon]="'project'"></app-svg-icon>
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 cf2195aeb..1a579dc6f 100644
--- a/src/app/post/components/post-list/post-list.component.scss
+++ b/src/app/post/components/post-list/post-list.component.scss
@@ -1,6 +1,7 @@
 @import '../../../../assets/scss/color';
 @import '../../../../assets/scss/typography';
 @import '../../../../assets/scss/shapes';
+@import '../../../../assets/scss/breakpoint';
 
 .section-container {
   background: $grey-6;
@@ -19,16 +20,43 @@
   }
 }
 .list-container {
+  @media #{$tablet} {
+    width: 100%;
+  }
   width: 80%;
   h2 {
+    @media #{$large-phone} {
+      @include cn-bold-22;
+    }
     @include cn-bold-28;
     color: $grey-2;
   }
   .columnPosts {
+    @media #{$large-phone} {
+      display: none !important;
+    }
     width: 50%;
   }
+  .columnPostsMobile {
+    display: none !important;
+    @media #{$large-phone} {
+      display: flex !important;
+    }
+  }
 }
 .project-container {
+  &.desktop {
+    @media #{$tablet} {
+      display: none !important;
+    }
+  }
+  &.mobile {
+    display: none !important;
+    @media #{$tablet} {
+      display: flex !important;
+      width: 100%;
+    }
+  }
   width: 20%;
   height: 100%;
   min-width: 306px;
@@ -41,13 +69,23 @@
     background: $white;
     border-radius: 6px;
     .project-content {
+      @media #{$large-phone} {
+        padding: 10px 32px 0px 36px;
+      }
       padding: 18px 32px 26px 36px;
       fill: $secondary-color;
       stroke: $secondary-color;
+      &.mobile {
+        text-align: left;
+      }
       text-align: center;
       h2 {
+        @media #{$large-phone} {
+          @include cn-bold-22;
+        }
         @include cn-bold-26;
         color: $secondary-color;
+        margin-bottom: 0;
       }
     }
   }
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 bb399cb45..5b95ba4f8 100644
--- a/src/app/post/components/post-list/post-list.component.ts
+++ b/src/app/post/components/post-list/post-list.component.ts
@@ -10,15 +10,18 @@ import { PostService } from '../../services/post.service';
 })
 export class PostListComponent implements OnInit {
   constructor(private postService: PostService) {}
+  postsMobileView: Post[] = [];
   leftColumnPosts: Post[] = [];
   rightColumnPosts: Post[] = [];
   projectsNew: Post[] = [];
   bigNews: Post;
-  projectsNews: Post[];
+
   ngOnInit(): void {
     this.postService.getPosts().subscribe((news) => {
       news.posts.forEach((val, index) => {
         val = this.addAuthorToPost(val);
+        this.postsMobileView.push(val);
+
         if (index % 2 == 0) {
           this.leftColumnPosts.push(val);
         } else {
-- 
GitLab


From 6bce4fe40970b696a6df81c3863b736d790def9b Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Wed, 3 Mar 2021 14:53:35 +0100
Subject: [PATCH 10/17] feat(post) : fix tag logic

---
 .../post-card/post-card.component.html        |  4 ++--
 .../post-card/post-card.component.ts          | 23 -------------------
 .../post-list/post-list.component.html        |  7 +++++-
 src/app/post/enum/tagEnum.enum.ts             |  9 --------
 src/assets/post/sprite.svg                    | 14 +++++------
 5 files changed, 15 insertions(+), 42 deletions(-)
 delete mode 100644 src/app/post/enum/tagEnum.enum.ts

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 3dc507bda..272aac44e 100644
--- a/src/app/post/components/post-card/post-card.component.html
+++ b/src/app/post/components/post-card/post-card.component.html
@@ -1,11 +1,11 @@
 <div fxLayout="column" *ngIf="post" class="post" [ngClass]="class" fxLayoutGap="12px">
   <div fxLayout="column" fxLayoutGap="4px">
-    <div fxLayout="row" class="tag" fxLayoutAlign=" center" fxLayoutGap="12px" *ngIf="getIconOfTag(post.tags[0].slug)">
+    <div fxLayout="row" class="tag" fxLayoutAlign=" center" fxLayoutGap="12px" *ngIf="post.tags[0].slug != 'appels'">
       <app-svg-icon
         [iconClass]="'icon-32'"
         [iconColor]="'inherit'"
         [type]="'post'"
-        [icon]="getIconOfTag(post.tags[0].slug)"
+        [icon]="post.tags[0].slug"
       ></app-svg-icon>
       <span>{{ post.tags[0].name }}</span>
     </div>
diff --git a/src/app/post/components/post-card/post-card.component.ts b/src/app/post/components/post-card/post-card.component.ts
index 2233a51ae..e73dd03b3 100644
--- a/src/app/post/components/post-card/post-card.component.ts
+++ b/src/app/post/components/post-card/post-card.component.ts
@@ -1,5 +1,4 @@
 import { Component, Input, OnInit } from '@angular/core';
-import { TagEnum } from '../../enum/tagEnum.enum';
 import { Post } from '../../models/post.model';
 
 @Component({
@@ -10,29 +9,7 @@ import { Post } from '../../models/post.model';
 export class PostCardComponent implements OnInit {
   @Input() post: Post;
   @Input() class: string;
-  test: string;
   constructor() {}
 
   ngOnInit(): void {}
-
-  getIconOfTag(tag: string): string {
-    switch (tag) {
-      case TagEnum.aLaUne:
-        return 'a-la-une';
-      case TagEnum.formation:
-        return 'formationTag';
-      case TagEnum.projet:
-        return 'projetTag';
-      case TagEnum.ressource:
-        return 'ressourceTag';
-      case TagEnum.info:
-        return 'infoTag';
-      case TagEnum.etude:
-        return 'etudeTag';
-      case TagEnum.dossier:
-        return 'dossierTag';
-      default:
-        return null;
-    }
-  }
 }
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 c6dda1250..bf80827f2 100644
--- a/src/app/post/components/post-list/post-list.component.html
+++ b/src/app/post/components/post-list/post-list.component.html
@@ -45,7 +45,12 @@
   <div fxLayout="column" fxLayoutAlign=" center" class="project-container desktop">
     <div class="background-project-container">
       <div class="project-content" fxLayout="column">
-        <app-svg-icon [iconClass]="'icon-80'" [iconColor]="'inherit'" [type]="'post'" [icon]="'project'"></app-svg-icon>
+        <app-svg-icon
+          [iconClass]="'icon-80'"
+          [iconColor]="'inherit'"
+          [type]="'post'"
+          [icon]="'appel-a-projet'"
+        ></app-svg-icon>
         <h2>appels à projets</h2>
         <app-post-card
           [post]="news"
diff --git a/src/app/post/enum/tagEnum.enum.ts b/src/app/post/enum/tagEnum.enum.ts
deleted file mode 100644
index de26cf710..000000000
--- a/src/app/post/enum/tagEnum.enum.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export enum TagEnum {
-  aLaUne = 'a-la-une',
-  formation = 'formations',
-  projet = 'projets',
-  ressource = 'ressources',
-  info = 'infos',
-  etude = 'etudes',
-  dossier = 'dossiers',
-}
diff --git a/src/assets/post/sprite.svg b/src/assets/post/sprite.svg
index 5e60b294b..7632091da 100644
--- a/src/assets/post/sprite.svg
+++ b/src/assets/post/sprite.svg
@@ -1,6 +1,6 @@
 <svg xmlns="http://www.w3.org/2000/svg">
 
-<symbol id="project" viewBox="0 0 80 60" xmlns="http://www.w3.org/2000/svg">
+<symbol id="appel-a-projet" viewBox="0 0 80 60" xmlns="http://www.w3.org/2000/svg">
 <path d="M1.66016 23.2006C4.67429 23.0597 8.52282 22.3132 12.7892 21.1547C17.5608 19.8591 22.9197 18.0302 28.3314 15.8906C38.369 11.9223 48.6614 6.85659 55.7703 2.08884V2.14843V2.22928V2.31051V2.39211V2.47407V2.5564V2.6391V2.72216V2.80559V2.88938V2.97352V3.05802V3.14288V3.2281V3.31367V3.39959V3.48586V3.57248V3.65944V3.74676V3.83441V3.92241V4.01075V4.09943V4.18845V4.27781V4.3675V4.45752V4.54788V4.63856V4.72958V4.82092V4.91259V5.00458V5.0969V5.18954V5.2825V5.37577V5.46937V5.56327V5.6575V5.75203V5.84688V5.94203V6.03749V6.13326V6.22933V6.32571V6.42239V6.51937V6.61664V6.71422V6.81209V6.91025V7.0087V7.10745V7.20649V7.30581V7.40542V7.50532V7.6055V7.70596V7.8067V7.90772V8.00901V8.11059V8.21243V8.31455V8.41694V8.5196V8.62253V8.72573V8.82918V8.93291V9.03689V9.14114V9.24565V9.35041V9.45543V9.5607V9.66622V9.772V9.87803V9.9843V10.0908V10.1976V10.3046V10.4119V10.5194V10.6271V10.7351V10.8433V10.9517V11.0604V11.1693V11.2784V11.3878V11.4974V11.6072V11.7172V11.8275V11.938V12.0487V12.1596V12.2708V12.3821V12.4937V12.6054V12.7174V12.8296V12.942V13.0546V13.1675V13.2805V13.3937V13.5071V13.6207V13.7345V13.8485V13.9628V14.0771V14.1917V14.3065V14.4215V14.5366V14.6519V14.7674V14.8831V14.999V15.1151V15.2313V15.3477V15.4643V15.581V15.6979V15.815V15.9323V16.0497V16.1673V16.2851V16.403V16.521V16.6393V16.7577V16.8762V16.9949V17.1137V17.2327V17.3519V17.4712V17.5906V17.7102V17.83V17.9498V18.0698V18.19V18.3103V18.4307V18.5513V18.672V18.7928V18.9137V19.0348V19.156V19.2774V19.3988V19.5204V19.6421V19.7639V19.8858V20.0079V20.1301V20.2523V20.3747V20.4972V20.6198V20.7425V20.8654V20.9883V21.1113V21.2344V21.3576V21.481V21.6044V21.7279V21.8515V21.9752V22.099V22.2229V22.3468V22.4709V22.595V22.7192V22.8435V22.9679V23.0923V23.2169V23.3415V23.4661V23.5909V23.7157V23.8406V23.9655V24.0905V24.2156V24.3408V24.466V24.5912V24.7166V24.8419V24.9674V25.0929V25.2184V25.344V25.4696V25.5953V25.7211V25.8468V25.9726V26.0985V26.2244V26.3503V26.4763V26.6023V26.7284V26.8544V26.9806V27.1067V27.2328V27.359V27.4852V27.6115V27.7377V27.864V27.9903V28.1166V28.243V28.3693V28.4956V28.622V28.7484V28.8748V29.0012V29.1275V29.2539V29.3803V29.5067V29.6331V29.7595V29.8859V30.0123V30.1387V30.265V30.3914V30.5177V30.6441V30.7704V30.8967V31.023V31.1492V31.2754V31.4017V31.5279V31.654V31.7802V31.9063V32.0323V32.1584V32.2844V32.4104V32.5363V32.6622V32.7881V32.9139V33.0397V33.1654V33.2911V33.4168V33.5424V33.6679V33.7934V33.9188V34.0442V34.1696V34.2948V34.42V34.5452V34.6703V34.7953V34.9203V35.0452V35.17V35.2947V35.4194V35.544V35.6686V35.793V35.9174V36.0417V36.1659V36.2901V36.4141V36.5381V36.662V36.7858V36.9095V37.0331V37.1566V37.2801V37.4034V37.5266V37.6498V37.7728V37.8957V38.0186V38.1413V38.2639V38.3864V38.5088V38.6311V38.7533V38.8754V38.9973V39.1191V39.2408V39.3624V39.4839V39.6053V39.7265V39.8476V39.9685V40.0894V40.2101V40.3307V40.4511V40.5714V40.6916V40.8116V40.9315V41.0512V41.1708V41.2903V41.4096V41.5288V41.6478V41.7667V41.8854V42.004V42.1224V42.2406V42.3587V42.4766V42.5944V42.712V42.8294V42.9467V43.0638V43.1808V43.2975V43.4141V43.5306V43.6468V43.7629V43.8788V43.9945V44.11V44.2254V44.3406V44.4555V44.5703V44.6849V44.7993V44.9136V45.0276V45.1414V45.2551V45.3685V45.4818V45.5948V45.7076V45.8203V45.9327V46.0449V46.1569V46.2687V46.3803V46.4917V46.6029V46.7138V46.8245V46.9351V47.0453V47.1554V47.2653V47.3749V47.4843V47.5934V47.7024V47.8111V47.9195V48.0278V48.1358V48.2435V48.3511V48.4583V48.5654V48.6722V48.7787V48.885V48.9911V49.0969V49.2024V49.3078V49.4128V49.5176V49.6221V49.7264V49.8304V49.9342V50.0377V50.1409V50.2439V50.3465V50.449V50.5511V50.653V50.7546V50.8559V50.957V51.0578V51.1582V51.2585V51.3584V51.458V51.5574V51.6565V51.7552V51.8537V51.9519V52.0498V52.1474V52.2448V52.3418V52.4385V52.5349V52.631V52.7268V52.8223V52.9175V53.0124V53.1069V53.2012V53.2952V53.3888V53.4821V53.5751V53.6678V53.7601V53.8521V53.9439V54.0352V54.1263V54.217V54.3074V54.3975V54.4872V54.5766V54.5932C48.6675 50.7584 38.3441 46.5962 28.2733 43.3173C18.0609 39.9923 7.95384 37.5244 1.66016 37.2769V23.2006Z" fill="none" stroke-width="2"/>
 <path fill-rule="evenodd" clip-rule="evenodd" d="M56.7703 0.181641C42.7428 10.2013 12.6838 22.2249 0.660156 22.2249V38.2564C3.19182 38.2564 8.06936 39.0833 11.8822 39.8595L6.27117 53.4863C5.78047 56.4517 7.78661 59.2534 10.752 59.7441C13.7174 60.2349 16.5192 58.2287 17.0099 55.2633L19.8979 41.4627L19.6442 39.9086L19.5098 39.51L41.2658 9.45105H45.2737L21.5122 42.2809C34.1261 45.936 48.342 51.4756 56.7703 56.2918V28.5373L42.6898 47.8979H38.682L55.0188 25.106L56.7703 28.386V11.4099L32.9349 43.1831H28.9271L55.4659 7.44562L56.7703 10.1451V0.181641ZM25.4388 18.068H21.4309L12.6838 31.1271V37.1106L25.4388 18.068Z" stroke="none"/>
 <path fill-rule="evenodd" clip-rule="evenodd" d="M64.9531 28.002C64.9531 29.1368 65.919 30.0566 67.1105 30.0566L77.178 30.0566C78.3695 30.0566 79.3353 29.1368 79.3353 28.002C79.3353 26.8673 78.3695 25.9474 77.178 25.9474L67.1105 25.9474C65.919 25.9474 64.9531 26.8673 64.9531 28.002Z" stroke="none"/>
@@ -8,7 +8,7 @@
 <path fill-rule="evenodd" clip-rule="evenodd" d="M63.6036 39.4919C64.0749 38.3867 65.353 37.8728 66.4582 38.3441L75.7969 42.3267C76.9021 42.798 77.416 44.076 76.9447 45.1812C76.4734 46.2864 75.1953 46.8003 74.0901 46.329L64.7514 42.3464C63.6462 41.8751 63.1323 40.5971 63.6036 39.4919Z" stroke="none"/>
 </symbol>
 
-<symbol id="projetTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<symbol id="projets" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
 <mask id="path-1-inside-1" fill="white">
 <path fill-rule="evenodd" clip-rule="evenodd" d="M4 7C4 5.34315 5.34315 4 7 4C8.65685 4 10 5.34315 10 7V24C10 25.6569 8.65685 27 7 27C5.34315 27 4 25.6569 4 24V7ZM7 26C8.10457 26 9 25.1046 9 24C9 22.8954 8.10457 22 7 22C5.89543 22 5 22.8954 5 24C5 25.1046 5.89543 26 7 26Z"/>
 </mask>
@@ -18,7 +18,7 @@
 <path d="M9 24C9 25.1046 8.10457 26 7 26C5.89543 26 5 25.1046 5 24C5 22.8954 5.89543 22 7 22C8.10457 22 9 22.8954 9 24Z" stroke="none"/>
 </symbol>
 
-<symbol id="ressourceTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<symbol id="ressources" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
 <path d="M3.5 25V13.0495C7.32281 13.9728 11.7651 14.5 16.5 14.5C20.828 14.5 24.9112 14.0595 28.5 13.2789V25C28.5 25.2761 28.2761 25.5 28 25.5H4C3.72386 25.5 3.5 25.2761 3.5 25Z" fill="none"/>
 <path fill-rule="evenodd" clip-rule="evenodd" d="M20 6H13V8H20V6ZM13 4C11.8954 4 11 4.89543 11 6V9H22V6C22 4.89543 21.1046 4 20 4H13Z" stroke="none"/>
 <path d="M28.5 13.2602C27.6168 13.4803 26.8068 13.7326 26.0024 13.9831L25.9955 13.9852C24.3831 14.4874 22.7659 14.9905 20.5 15.2722V15C20.5 14.1716 19.8284 13.5 19 13.5H14C13.1716 13.5 12.5 14.1716 12.5 15V15.2709C9.84798 14.949 7.85358 14.3349 5.87723 13.7256L5.87212 13.724C5.09326 13.4839 4.31292 13.2433 3.5 13.0242V9C3.5 8.72386 3.72386 8.5 4 8.5H28C28.2761 8.5 28.5 8.72386 28.5 9V13.2602Z"/>
@@ -33,7 +33,7 @@
 <rect x="13.5" y="14.5" width="6" height="3" rx="0.5" fill="none"/>
 </symbol>
 
-<symbol id="infoTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<symbol id="infos" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
 <path d="M23 25.5H9.44949C10.0978 24.8647 10.5 23.9793 10.5 23V5.5H25.5V23C25.5 24.3807 24.3807 25.5 23 25.5Z" fill="none"/>
 <rect x="12" y="16" width="12" height="1" rx="0.5" stroke="none"/>
 <rect x="12" y="19" width="12" height="1" rx="0.5" stroke="none"/>
@@ -46,17 +46,17 @@
 <path d="M5.5 12.5H10.5V23C10.5 24.3807 9.38071 25.5 8 25.5C6.61929 25.5 5.5 24.3807 5.5 23V12.5Z" fill="none"/>
 </symbol>
 
-<symbol id="formationTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<symbol id="formations" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
 <path fill-rule="evenodd" clip-rule="evenodd" d="M3 28V24.4C3 22.1088 4.1007 20.0762 5.79995 18.7998C4.80938 17.7598 4.2 16.3513 4.2 14.8C4.2 11.5967 6.79675 9 10 9C13.2033 9 15.8 11.5967 15.8 14.8C15.8 16.3513 15.1906 17.7598 14.2001 18.7998C15.8993 20.0762 17 22.1088 17 24.4V28H3ZM13.4307 19.4769C13.1256 19.2639 12.7998 19.0785 12.4568 18.9244C12.7774 18.7331 13.0738 18.5054 13.3403 18.2471C14.2405 17.3746 14.8 16.1527 14.8 14.8C14.8 12.149 12.651 10 10 10C7.34903 10 5.2 12.149 5.2 14.8C5.2 16.1527 5.75951 17.3746 6.65971 18.2471C6.92623 18.5054 7.2226 18.7331 7.54316 18.9244C7.20024 19.0785 6.87441 19.2639 6.56931 19.4769C5.01609 20.5613 4 22.362 4 24.4V27H16V24.4C16 22.362 14.9839 20.5613 13.4307 19.4769Z" stroke="none"/>
 <path fill-rule="evenodd" clip-rule="evenodd" d="M2 6H30V22H16.5777C16.3879 21.4799 16.1381 20.9887 15.8369 20.5348L25.6379 7H24.1379L15.0488 19.5516C14.7868 19.2788 14.503 19.0273 14.2001 18.7998C15.1906 17.7598 15.8 16.3513 15.8 14.8C15.8 14.4589 15.7705 14.1246 15.7141 13.7996L20.6379 7H19.1379L15.2607 12.3543C14.8403 11.4515 14.1943 10.675 13.3952 10.0971L15.6379 7H14.1379L12.3353 9.48933C11.6208 9.17468 10.8308 9 10 9C9.70926 9 9.42352 9.02139 9.14426 9.06269L10.6379 7H9.13793L7.14742 9.74881C5.70291 10.5663 4.64387 11.9856 4.3108 13.666L3 15.4762V17.5476L4.28201 15.7772C4.46929 16.8805 4.96816 17.8775 5.68402 18.6744L5.28319 19.228C4.45784 19.9811 3.81311 20.9293 3.4223 22H2V6ZM29 7.19048V9.2619L20.5 21H19L29 7.19048ZM25.5 21H24L29 14.0952V16.1667L25.5 21ZM5.63793 7L3 10.6429V8.57143L4.13793 7H5.63793Z" stroke="none"/>
 </symbol>
 
-<symbol id="etudeTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<symbol id="etudes" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
 <path d="M27.722 26.2329L22.4916 21.0959C24.0154 19.2877 24.9215 16.9452 24.9215 14.4384C24.8803 8.68493 20.2265 4 14.4607 4C8.69498 4 4 8.68493 4 14.4384C4 20.1918 8.69498 24.8767 14.4607 24.8767C16.9318 24.8767 19.2381 24.0137 21.009 22.5753L26.2394 27.7123C26.4453 27.9178 26.6924 28 26.9807 28C27.2278 28 27.5161 27.9178 27.722 27.7123C28.0927 27.3014 28.0927 26.6438 27.722 26.2329ZM6.0592 14.4384C6.0592 9.79452 9.80695 6.05479 14.4607 6.05479C19.1145 6.05479 22.8623 9.79452 22.8623 14.4384C22.8623 19.0822 19.1145 22.8219 14.4607 22.8219C9.80695 22.8219 6.0592 19.0411 6.0592 14.4384Z" stroke="none"/>
 <path fill-rule="evenodd" clip-rule="evenodd" d="M14.7457 5.3282C14.0022 5.11446 13.2157 5 12.4015 5C12.2296 5 12.0588 5.00511 11.8895 5.01518L10.4509 6.97689C11.5862 6.37483 12.878 6.02499 14.2521 6.00129L14.7457 5.3282ZM13.0585 7.62894C9.87909 8.24863 7.5 11.0292 7.5 14.3836C7.5 14.6426 7.51448 14.8985 7.5427 15.1504L13.0585 7.62894ZM7.97683 16.8961L14.8566 7.51456C15.8686 7.57953 16.8194 7.85975 17.6638 8.30994L9.59266 19.316C8.89414 18.6378 8.33923 17.8141 7.97683 16.8961ZM6.34942 16.7776C6.12204 16.018 6 15.2141 6 14.3836C6 13.8626 6.04717 13.353 6.13749 12.8588L4.25314 15.4284C4.49144 16.3727 4.89089 17.2551 5.42099 18.0437L6.34942 16.7776ZM6.96335 18.2781C7.41071 19.1257 7.99942 19.8888 8.69862 20.5352L8.49887 20.8076C7.68288 20.3787 6.94656 19.8199 6.31708 19.1594L6.96335 18.2781ZM17.141 6.45253C16.8055 6.22416 16.4523 6.01946 16.084 5.84081L15.874 6.12727C16.3089 6.20341 16.7322 6.31273 17.141 6.45253ZM13.3275 21.1841C12.3621 21.0332 11.464 20.6823 10.6762 20.1762L18.8131 9.08041C19.5054 9.65324 20.0826 10.359 20.5064 11.159C20.5221 11.2167 20.5373 11.2746 20.5518 11.3328L13.3275 21.1841ZM21.157 12.9614C21.2528 13.4201 21.3031 13.8957 21.3031 14.3836C21.3031 17.9947 18.5458 20.9409 15.0011 21.2418L21.157 12.9614ZM9.9145 5.37067C6.48201 6.42403 4 9.60441 4 13.3836L4.00016 13.4357L9.9145 5.37067Z" stroke="none"/>
 </symbol>
 
-<symbol id="dossierTag" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+<symbol id="dossiers" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
 <path fill-rule="evenodd" clip-rule="evenodd" d="M2 9C2 7.89543 2.89543 7 4 7H8C9.10457 7 10 7.89543 10 9V10H27C27.5523 10 28 10.4477 28 11V13H6.32973C5.84861 13 5.43568 13.3426 5.34691 13.8155L3.28171 24.8155C3.16616 25.431 3.63831 26 4.26454 26H3C2.44772 26 2 25.5523 2 25V9Z" stroke="none"/>
 <path d="M5.72708 13.8721C5.78513 13.6528 5.98357 13.5 6.21044 13.5H29.1416C29.4697 13.5 29.7089 13.8107 29.6249 14.1279L26.7136 25.1279C26.6555 25.3472 26.4571 25.5 26.2302 25.5H3.2991C2.97097 25.5 2.73179 25.1893 2.81574 24.8721L5.72708 13.8721Z" fill="none"/>
 <path fill-rule="evenodd" clip-rule="evenodd" d="M29.2607 17.2341L30.049 14.2559C30.1737 13.7846 29.9418 13.3205 29.5453 13.113L20.8378 26H23.3378L29.2607 17.2341ZM24.8378 26H26.1709C26.6247 26 27.0215 25.6945 27.1376 25.2559L28.2948 20.8837L24.8378 26ZM25.6216 13H28.1216L19.3378 26H16.8378L25.6216 13ZM24.1216 13H21.6216L12.8378 26H15.3378L24.1216 13ZM17.6216 13H20.1216L11.3378 26H8.83784L17.6216 13ZM16.1216 13H13.6216L4.83784 26H7.33784L16.1216 13ZM9.62162 13H12.1216L3.33784 26H3.20521C2.57898 26 2.10683 25.431 2.22239 24.8155L2.44717 23.6182L9.62162 13ZM8.12162 13H5.27041C5.26124 13 5.2521 13.0001 5.24299 13.0004L4.13187 14.6448L3.02434 20.544L8.12162 13Z" stroke="none"/>
-- 
GitLab


From ec6041320999eeefc6a3232ce3f6f456c79f34e3 Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Wed, 3 Mar 2021 18:32:00 +0100
Subject: [PATCH 11/17] fix(post) : fix review ENUM logic + type properties

---
 .../post-card/post-card.component.html          |  8 +++++++-
 .../components/post-card/post-card.component.ts |  2 ++
 .../components/post-list/post-list.component.ts | 17 ++++++++---------
 src/app/post/enum/tag.enum.ts                   |  4 ++++
 src/app/post/services/post.service.ts           |  3 ++-
 5 files changed, 23 insertions(+), 11 deletions(-)
 create mode 100644 src/app/post/enum/tag.enum.ts

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 272aac44e..4ba85dbbe 100644
--- a/src/app/post/components/post-card/post-card.component.html
+++ b/src/app/post/components/post-card/post-card.component.html
@@ -1,6 +1,12 @@
 <div fxLayout="column" *ngIf="post" class="post" [ngClass]="class" fxLayoutGap="12px">
   <div fxLayout="column" fxLayoutGap="4px">
-    <div fxLayout="row" class="tag" fxLayoutAlign=" center" fxLayoutGap="12px" *ngIf="post.tags[0].slug != 'appels'">
+    <div
+      fxLayout="row"
+      class="tag"
+      fxLayoutAlign=" center"
+      fxLayoutGap="12px"
+      *ngIf="post.tags[0].slug != tagEnum.appels"
+    >
       <app-svg-icon
         [iconClass]="'icon-32'"
         [iconColor]="'inherit'"
diff --git a/src/app/post/components/post-card/post-card.component.ts b/src/app/post/components/post-card/post-card.component.ts
index e73dd03b3..a7d648e31 100644
--- a/src/app/post/components/post-card/post-card.component.ts
+++ b/src/app/post/components/post-card/post-card.component.ts
@@ -1,4 +1,5 @@
 import { Component, Input, OnInit } from '@angular/core';
+import { TagEnum } from '../../enum/tag.enum';
 import { Post } from '../../models/post.model';
 
 @Component({
@@ -9,6 +10,7 @@ import { Post } from '../../models/post.model';
 export class PostCardComponent implements OnInit {
   @Input() post: Post;
   @Input() class: string;
+  public tagEnum = TagEnum;
   constructor() {}
 
   ngOnInit(): void {}
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 5b95ba4f8..8a3a96883 100644
--- a/src/app/post/components/post-list/post-list.component.ts
+++ b/src/app/post/components/post-list/post-list.component.ts
@@ -1,6 +1,6 @@
 import { Component, OnInit } from '@angular/core';
+import { TagEnum } from '../../enum/tag.enum';
 import { Post } from '../../models/post.model';
-import { PostWithMeta } from '../../models/postWithMeta.model';
 import { PostService } from '../../services/post.service';
 
 @Component({
@@ -10,18 +10,17 @@ import { PostService } from '../../services/post.service';
 })
 export class PostListComponent implements OnInit {
   constructor(private postService: PostService) {}
-  postsMobileView: Post[] = [];
-  leftColumnPosts: Post[] = [];
-  rightColumnPosts: Post[] = [];
-  projectsNew: Post[] = [];
-  bigNews: Post;
+  public postsMobileView: Post[] = [];
+  public leftColumnPosts: Post[] = [];
+  public rightColumnPosts: Post[] = [];
+  public projectsNew: Post[] = [];
+  public bigNews: Post;
 
   ngOnInit(): void {
     this.postService.getPosts().subscribe((news) => {
       news.posts.forEach((val, index) => {
         val = this.addAuthorToPost(val);
         this.postsMobileView.push(val);
-
         if (index % 2 == 0) {
           this.leftColumnPosts.push(val);
         } else {
@@ -29,10 +28,10 @@ export class PostListComponent implements OnInit {
         }
       });
     });
-    this.postService.getPosts(['a-la-une']).subscribe((news) => {
+    this.postService.getPosts([TagEnum.aLaUne]).subscribe((news) => {
       this.bigNews = this.addAuthorToPost(news.posts[0]);
     });
-    this.postService.getPosts(['appels']).subscribe((news) => {
+    this.postService.getPosts([TagEnum.appels]).subscribe((news) => {
       let projectNews = news.posts;
       projectNews.forEach((news) => {
         news = this.addAuthorToPost(news);
diff --git a/src/app/post/enum/tag.enum.ts b/src/app/post/enum/tag.enum.ts
new file mode 100644
index 000000000..0b6c049d9
--- /dev/null
+++ b/src/app/post/enum/tag.enum.ts
@@ -0,0 +1,4 @@
+export enum TagEnum {
+  aLaUne = 'a-la-une',
+  appels = 'appels',
+}
diff --git a/src/app/post/services/post.service.ts b/src/app/post/services/post.service.ts
index 848e6a58e..688b9c31b 100644
--- a/src/app/post/services/post.service.ts
+++ b/src/app/post/services/post.service.ts
@@ -2,6 +2,7 @@ import { HttpClient } from '@angular/common/http';
 import { Injectable } from '@angular/core';
 import { Observable } from 'rxjs';
 import { map } from 'rxjs/operators';
+import { TagEnum } from '../enum/tag.enum';
 import { PostWithMeta } from '../models/postWithMeta.model';
 
 @Injectable({
@@ -14,7 +15,7 @@ export class PostService {
   public getPosts(tags?: string[]): Observable<PostWithMeta> {
     if (!tags) {
       return this.http
-        .get<PostWithMeta>(`${this.baseUrl}?include=tags,authors&filter=tag:-[appels,a-la-une]`)
+        .get<PostWithMeta>(`${this.baseUrl}?include=tags,authors&filter=tag:-[${TagEnum.aLaUne},${TagEnum.appels}]`)
         .pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
     }
     let tagsString = '';
-- 
GitLab


From d23156750356ebd3216a88e77b140fa6a7e916a0 Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Wed, 3 Mar 2021 18:36:45 +0100
Subject: [PATCH 12/17] fix(post) : fix review

---
 .../post/components/post-list/post-list.component.ts |  5 +----
 .../{post.component.html => news.component.html}     |  0
 .../{post.component.scss => news.component.scss}     |  0
 ...post.component.spec.ts => news.component.spec.ts} | 10 +++++-----
 src/app/post/news.component.ts                       | 12 ++++++++++++
 src/app/post/post-routing.module.ts                  |  4 ++--
 src/app/post/post.component.ts                       | 12 ------------
 src/app/post/post.module.ts                          |  4 ++--
 8 files changed, 22 insertions(+), 25 deletions(-)
 rename src/app/post/{post.component.html => news.component.html} (100%)
 rename src/app/post/{post.component.scss => news.component.scss} (100%)
 rename src/app/post/{post.component.spec.ts => news.component.spec.ts} (63%)
 create mode 100644 src/app/post/news.component.ts
 delete mode 100644 src/app/post/post.component.ts

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 8a3a96883..f7c373650 100644
--- a/src/app/post/components/post-list/post-list.component.ts
+++ b/src/app/post/components/post-list/post-list.component.ts
@@ -32,10 +32,7 @@ export class PostListComponent implements OnInit {
       this.bigNews = this.addAuthorToPost(news.posts[0]);
     });
     this.postService.getPosts([TagEnum.appels]).subscribe((news) => {
-      let projectNews = news.posts;
-      projectNews.forEach((news) => {
-        news = this.addAuthorToPost(news);
-      });
+      let projectNews = news.posts.map((news) => (news = this.addAuthorToPost(news)));
       this.projectsNew = projectNews;
     });
   }
diff --git a/src/app/post/post.component.html b/src/app/post/news.component.html
similarity index 100%
rename from src/app/post/post.component.html
rename to src/app/post/news.component.html
diff --git a/src/app/post/post.component.scss b/src/app/post/news.component.scss
similarity index 100%
rename from src/app/post/post.component.scss
rename to src/app/post/news.component.scss
diff --git a/src/app/post/post.component.spec.ts b/src/app/post/news.component.spec.ts
similarity index 63%
rename from src/app/post/post.component.spec.ts
rename to src/app/post/news.component.spec.ts
index 5716f2398..4ce0f0228 100644
--- a/src/app/post/post.component.spec.ts
+++ b/src/app/post/news.component.spec.ts
@@ -1,19 +1,19 @@
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 
-import { PostComponent } from './post.component';
+import { NewsComponent } from './news.component';
 
 describe('PostsComponent', () => {
-  let component: PostComponent;
-  let fixture: ComponentFixture<PostComponent>;
+  let component: NewsComponent;
+  let fixture: ComponentFixture<NewsComponent>;
 
   beforeEach(async () => {
     await TestBed.configureTestingModule({
-      declarations: [PostComponent],
+      declarations: [NewsComponent],
     }).compileComponents();
   });
 
   beforeEach(() => {
-    fixture = TestBed.createComponent(PostComponent);
+    fixture = TestBed.createComponent(NewsComponent);
     component = fixture.componentInstance;
     fixture.detectChanges();
   });
diff --git a/src/app/post/news.component.ts b/src/app/post/news.component.ts
new file mode 100644
index 000000000..ce2f45998
--- /dev/null
+++ b/src/app/post/news.component.ts
@@ -0,0 +1,12 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-news',
+  templateUrl: './news.component.html',
+  styleUrls: ['./news.component.scss'],
+})
+export class NewsComponent implements OnInit {
+  constructor() {}
+
+  ngOnInit(): void {}
+}
diff --git a/src/app/post/post-routing.module.ts b/src/app/post/post-routing.module.ts
index 2ec94d598..841c89d45 100644
--- a/src/app/post/post-routing.module.ts
+++ b/src/app/post/post-routing.module.ts
@@ -1,8 +1,8 @@
 import { NgModule } from '@angular/core';
 import { Routes, RouterModule } from '@angular/router';
-import { PostComponent } from './post.component';
+import { NewsComponent } from './news.component';
 
-const routes: Routes = [{ path: '', component: PostComponent }];
+const routes: Routes = [{ path: '', component: NewsComponent }];
 
 @NgModule({
   imports: [RouterModule.forChild(routes)],
diff --git a/src/app/post/post.component.ts b/src/app/post/post.component.ts
deleted file mode 100644
index 075daa3b5..000000000
--- a/src/app/post/post.component.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
-  selector: 'app-post',
-  templateUrl: './post.component.html',
-  styleUrls: ['./post.component.scss'],
-})
-export class PostComponent implements OnInit {
-  constructor() {}
-
-  ngOnInit(): void {}
-}
diff --git a/src/app/post/post.module.ts b/src/app/post/post.module.ts
index af61760cb..d51f1291c 100644
--- a/src/app/post/post.module.ts
+++ b/src/app/post/post.module.ts
@@ -1,6 +1,6 @@
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
-import { PostComponent } from './post.component';
+import { NewsComponent } from './news.component';
 import { PostRoutingModule } from './post-routing.module';
 import { PostHeaderComponent } from './components/post-header/post-header.component';
 import { PostListComponent } from './components/post-list/post-list.component';
@@ -9,7 +9,7 @@ import { SharedModule } from '../shared/shared.module';
 import { PostCardComponent } from './components/post-card/post-card.component';
 
 @NgModule({
-  declarations: [PostComponent, PostHeaderComponent, PostListComponent, PostDetailsComponent, PostCardComponent],
+  declarations: [NewsComponent, PostHeaderComponent, PostListComponent, PostDetailsComponent, PostCardComponent],
   imports: [CommonModule, PostRoutingModule, SharedModule],
 })
 export class PostModule {}
-- 
GitLab


From 166e07a9c7b61bdfa60f60c3ca8dbf601220839f Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Fri, 5 Mar 2021 15:26:44 +0100
Subject: [PATCH 13/17] feat(post) : load more news on scroll

---
 src/app/app.component.html                    |  4 +-
 src/app/app.component.scss                    |  5 +-
 src/app/app.component.ts                      |  7 ++-
 .../post-list/post-list.component.scss        |  2 +-
 .../post-list/post-list.component.ts          | 59 +++++++++++++++----
 src/app/post/services/post.service.ts         |  6 +-
 .../shared/service/windowScroll.service.ts    | 16 +++++
 src/styles.scss                               |  1 -
 8 files changed, 77 insertions(+), 23 deletions(-)
 create mode 100644 src/app/shared/service/windowScroll.service.ts

diff --git a/src/app/app.component.html b/src/app/app.component.html
index f4d4b7c94..aa331e09e 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -1,8 +1,8 @@
 <div class="app-container">
   <app-header></app-header>
-  <div class="app-body">
+  <div (scroll)="onScrollDown($event)" class="app-body">
     <router-outlet></router-outlet>
     <router-outlet name="print"></router-outlet>
+    <app-footer></app-footer>
   </div>
-  <app-footer></app-footer>
 </div>
diff --git a/src/app/app.component.scss b/src/app/app.component.scss
index 29e32a153..d79408e4e 100644
--- a/src/app/app.component.scss
+++ b/src/app/app.component.scss
@@ -3,17 +3,16 @@
 @import '../assets/scss/layout';
 
 .app-container {
-  height: 100%;
   display: block;
   flex-direction: column;
-  overflow-y: auto;
 }
 
 .app-body {
   flex: 1 1 auto;
-  overflow-y: hidden;
+  overflow-y: auto;
   overflow-x: hidden;
   position: relative;
+  height: calc(100vh - #{$header-height});
 }
 
 .motif {
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 13fba3cf1..20dbe35a7 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -3,6 +3,7 @@ import { ProfileService } from './profile/services/profile.service';
 import { AuthService } from './services/auth.service';
 import { RouterListenerService } from './services/routerListener.service';
 import { PrintService } from './shared/service/print.service';
+import { WindowScrollService } from './shared/service/windowscroll.service';
 
 @Component({
   selector: 'app-root',
@@ -16,10 +17,14 @@ export class AppComponent {
     public printService: PrintService,
     private authService: AuthService,
     private profilService: ProfileService,
-    private routerListenerService: RouterListenerService
+    private routerListenerService: RouterListenerService,
+    private windowScrollService: WindowScrollService
   ) {
     if (this.authService.isLoggedIn()) {
       this.profilService.getProfile();
     }
   }
+  public onScrollDown(event): void {
+    this.windowScrollService.scrollY.next(event);
+  }
 }
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 1a579dc6f..dd33d0cf9 100644
--- a/src/app/post/components/post-list/post-list.component.scss
+++ b/src/app/post/components/post-list/post-list.component.scss
@@ -23,7 +23,7 @@
   @media #{$tablet} {
     width: 100%;
   }
-  width: 80%;
+  width: 70%;
   h2 {
     @media #{$large-phone} {
       @include cn-bold-22;
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 f7c373650..8aa7a320a 100644
--- a/src/app/post/components/post-list/post-list.component.ts
+++ b/src/app/post/components/post-list/post-list.component.ts
@@ -1,6 +1,9 @@
 import { Component, OnInit } from '@angular/core';
+import { WindowScrollService } from '../../../shared/service/windowscroll.service';
 import { TagEnum } from '../../enum/tag.enum';
+import { Pagination } from '../../models/pagination.model';
 import { Post } from '../../models/post.model';
+import { PostWithMeta } from '../../models/postWithMeta.model';
 import { PostService } from '../../services/post.service';
 
 @Component({
@@ -9,29 +12,32 @@ import { PostService } from '../../services/post.service';
   styleUrls: ['./post-list.component.scss'],
 })
 export class PostListComponent implements OnInit {
-  constructor(private postService: PostService) {}
+  constructor(private postService: PostService, private windowScrollService: WindowScrollService) {
+    this.windowScrollService.scrollY$.subscribe((evt: any) => {
+      if (evt && evt.target.offsetHeight + evt.target.scrollTop >= evt.target.scrollHeight - 200) {
+        if (!this.isLoading) {
+          this.loadMore();
+        }
+      }
+    });
+  }
   public postsMobileView: Post[] = [];
   public leftColumnPosts: Post[] = [];
   public rightColumnPosts: Post[] = [];
   public projectsNew: Post[] = [];
   public bigNews: Post;
+  public pagination: Pagination;
+  public isLoading = false;
 
   ngOnInit(): void {
-    this.postService.getPosts().subscribe((news) => {
-      news.posts.forEach((val, index) => {
-        val = this.addAuthorToPost(val);
-        this.postsMobileView.push(val);
-        if (index % 2 == 0) {
-          this.leftColumnPosts.push(val);
-        } else {
-          this.rightColumnPosts.push(val);
-        }
-      });
+    this.isLoading = true;
+    this.postService.getPosts(1).subscribe((news) => {
+      this.setNews(news);
     });
-    this.postService.getPosts([TagEnum.aLaUne]).subscribe((news) => {
+    this.postService.getPosts(1, [TagEnum.aLaUne]).subscribe((news) => {
       this.bigNews = this.addAuthorToPost(news.posts[0]);
     });
-    this.postService.getPosts([TagEnum.appels]).subscribe((news) => {
+    this.postService.getPosts(1, [TagEnum.appels]).subscribe((news) => {
       let projectNews = news.posts.map((news) => (news = this.addAuthorToPost(news)));
       this.projectsNew = projectNews;
     });
@@ -45,4 +51,31 @@ export class PostListComponent implements OnInit {
     post.excerpt = post.html.replace(/<[^>]*>/g, '');
     return post;
   }
+
+  // Load more news on scroll event.
+  private loadMore(): void {
+    if (this.pagination.page < this.pagination.pages) {
+      this.isLoading = true;
+      this.postService.getPosts(this.pagination.next).subscribe((news) => {
+        this.setNews(news);
+      });
+    }
+  }
+
+  // Split news on two columns on desktop mode or one column in mobile mode.
+  private setNews(news: PostWithMeta): void {
+    this.pagination = news.meta.pagination;
+    const customIndex = this.postsMobileView.length; // For scroll loading, start with previous index.
+    news.posts.forEach((val, index) => {
+      val = this.addAuthorToPost(val);
+      index += customIndex;
+      if (index % 2 == 0) {
+        this.leftColumnPosts.push(val);
+      } else {
+        this.rightColumnPosts.push(val);
+      }
+      this.postsMobileView.push(val);
+    });
+    this.isLoading = false;
+  }
 }
diff --git a/src/app/post/services/post.service.ts b/src/app/post/services/post.service.ts
index 688b9c31b..38d9346d0 100644
--- a/src/app/post/services/post.service.ts
+++ b/src/app/post/services/post.service.ts
@@ -12,10 +12,12 @@ export class PostService {
   private readonly baseUrl = 'api/posts';
   constructor(private http: HttpClient) {}
 
-  public getPosts(tags?: string[]): Observable<PostWithMeta> {
+  public getPosts(page: number, tags?: string[]): Observable<PostWithMeta> {
     if (!tags) {
       return this.http
-        .get<PostWithMeta>(`${this.baseUrl}?include=tags,authors&filter=tag:-[${TagEnum.aLaUne},${TagEnum.appels}]`)
+        .get<PostWithMeta>(
+          `${this.baseUrl}?page=${page}&include=tags,authors&filter=tag:-[${TagEnum.aLaUne},${TagEnum.appels}]`
+        )
         .pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
     }
     let tagsString = '';
diff --git a/src/app/shared/service/windowScroll.service.ts b/src/app/shared/service/windowScroll.service.ts
new file mode 100644
index 000000000..ebdf325b8
--- /dev/null
+++ b/src/app/shared/service/windowScroll.service.ts
@@ -0,0 +1,16 @@
+import { Injectable } from '@angular/core';
+import { BehaviorSubject } from 'rxjs';
+
+@Injectable({
+  providedIn: 'root',
+})
+export class WindowScrollService {
+  scrollY = new BehaviorSubject(null);
+  scrollY$ = this.scrollY.asObservable();
+
+  constructor() {}
+
+  public updateScrollY(value: Event): void {
+    this.scrollY.next(value);
+  }
+}
diff --git a/src/styles.scss b/src/styles.scss
index 747d5da15..f68783050 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -61,7 +61,6 @@ a {
   margin: 0;
   padding-top: 30px;
   width: 100%;
-  height: 100%;
   &.medium-pt {
     padding: 25px 0 30px 0;
   }
-- 
GitLab


From a098bd342380f847d0c3f956ef7d13265e96973b Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Fri, 5 Mar 2021 15:29:05 +0100
Subject: [PATCH 14/17] fix(post) : fix responsive on mobile

---
 src/app/app.component.scss | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/app.component.scss b/src/app/app.component.scss
index d79408e4e..ba93e485c 100644
--- a/src/app/app.component.scss
+++ b/src/app/app.component.scss
@@ -12,7 +12,7 @@
   overflow-y: auto;
   overflow-x: hidden;
   position: relative;
-  height: calc(100vh - #{$header-height});
+  height: calc(var(--vh, 1vh) * 100 - #{$header-height});
 }
 
 .motif {
-- 
GitLab


From 1d288f7d73090167fa9a00360afb48f8fe58feb3 Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Fri, 5 Mar 2021 16:23:05 +0100
Subject: [PATCH 15/17] fix(post) : fix mr failed

---
 src/app/app.component.ts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 5f66a4eab..9457205bd 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -17,7 +17,6 @@ export class AppComponent {
     public printService: PrintService,
     private authService: AuthService,
     private profilService: ProfileService,
-    private routerListenerService: RouterListenerService,
     private windowScrollService: WindowScrollService
   ) {
     if (this.authService.isLoggedIn()) {
-- 
GitLab


From 69aca5547a36b9b5418769b0b4a8c03cecc1605d Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Fri, 5 Mar 2021 16:38:29 +0100
Subject: [PATCH 16/17] fix(post) : fix import problem

---
 src/app/app.component.ts                                 | 3 +--
 src/app/post/components/post-list/post-list.component.ts | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 9457205bd..b2a85d16f 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,9 +1,8 @@
 import { Component } from '@angular/core';
 import { ProfileService } from './profile/services/profile.service';
 import { AuthService } from './services/auth.service';
-import { RouterListenerService } from './services/routerListener.service';
 import { PrintService } from './shared/service/print.service';
-import { WindowScrollService } from './shared/service/windowscroll.service';
+import { WindowScrollService } from './shared/service/windowScroll.service';
 
 @Component({
   selector: 'app-root',
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 8aa7a320a..807c2b9c2 100644
--- a/src/app/post/components/post-list/post-list.component.ts
+++ b/src/app/post/components/post-list/post-list.component.ts
@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { WindowScrollService } from '../../../shared/service/windowscroll.service';
+import { WindowScrollService } from '../../../shared/service/windowScroll.service';
 import { TagEnum } from '../../enum/tag.enum';
 import { Pagination } from '../../models/pagination.model';
 import { Post } from '../../models/post.model';
-- 
GitLab


From a7317b464a6fa1ca45785f41a319dbd3c00eb0b9 Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Mon, 8 Mar 2021 10:18:31 +0100
Subject: [PATCH 17/17] fix(post) : fix alignement

---
 .../components/post-list/post-list.component.html     |  4 ++--
 .../components/post-list/post-list.component.scss     | 11 ++++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

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 bf80827f2..44514f087 100644
--- a/src/app/post/components/post-list/post-list.component.html
+++ b/src/app/post/components/post-list/post-list.component.html
@@ -1,5 +1,5 @@
 <div class="section-container" fxLayout="row" fxLayoutGap="32px">
-  <div fxLayout="column" class="list-container">
+  <div fxLayout="column" class="list-container" fxLayoutGap="16px">
     <div fxLayout="column">
       <div fxLayout="row" class="row-border" fxLayoutAlign="space-between center">
         <h2>à la une</h2>
@@ -26,7 +26,7 @@
       </div>
     </div>
     <div fxLayout="column">
-      <div fxLayout="row" class="row-border">
+      <div fxLayout="row" class="row-border otherNews">
         <h2>autres actualités</h2>
       </div>
       <div fxLayout="row" fxLayoutGap="33px">
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 dd33d0cf9..6478796f4 100644
--- a/src/app/post/components/post-list/post-list.component.scss
+++ b/src/app/post/components/post-list/post-list.component.scss
@@ -5,9 +5,13 @@
 
 .section-container {
   background: $grey-6;
+  margin-top: 40px;
   .row-border {
     border-bottom: 1px dashed $grey-4;
-    margin: 16px 0;
+    padding-bottom: 16px;
+    &.otherNews {
+      padding-top: 24px;
+    }
   }
   h2 {
     font-style: italic !important;
@@ -30,6 +34,7 @@
     }
     @include cn-bold-28;
     color: $grey-2;
+    margin: 0;
   }
   .columnPosts {
     @media #{$large-phone} {
@@ -70,9 +75,9 @@
     border-radius: 6px;
     .project-content {
       @media #{$large-phone} {
-        padding: 10px 32px 0px 36px;
+        padding: 38px 32px 14px 36px;
       }
-      padding: 18px 32px 26px 36px;
+      padding: 39px 32px 26px 36px;
       fill: $secondary-color;
       stroke: $secondary-color;
       &.mobile {
-- 
GitLab