diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 556fb1eff9d48a66e6ac757dae24baa51a06d425..9b85e5e1b9a7b32d1d1860bf83368e27910561fc 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 0000000000000000000000000000000000000000..11f24be812b5d3336a4faa305b3a7cbfb1cb3388 --- /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 0000000000000000000000000000000000000000..90f92b94c0e46f064508801e1d57403a5fb1c26d --- /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 0000000000000000000000000000000000000000..adf283aa1d0ed592aa5ebe4e48d79803b57405d6 --- /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 0000000000000000000000000000000000000000..6d9a4faabbac6b5578463cf7364c21fd7670cd5c --- /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 0000000000000000000000000000000000000000..e24dbb9e61cf8f527c6c88daaf47f0df0129f8e7 --- /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 0000000000000000000000000000000000000000..a2ba8e0b6838fb77e83d1644ca8dd73734b087eb --- /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 0000000000000000000000000000000000000000..4927d262b6ce2a9499bd42389d73b44c654b0f6b --- /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 0000000000000000000000000000000000000000..0c1d36f47d64cb8d77f8fb052d288336d055849f --- /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 0000000000000000000000000000000000000000..6d3bff0c2353b6ddd0779ccbcb55e1d3ac851f2e --- /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 0000000000000000000000000000000000000000..2d39c24944619ae92c499e826d476de93f005a4c --- /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 0000000000000000000000000000000000000000..b8742d7227de4ed3b6f8d809d4d9b8decd5b5f15 --- /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 80b37d9e9130e697c080fb8e3e85addde46d7b77..2ec94d5983886a32f5bf1d35937aa1867a1139e4 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 0000000000000000000000000000000000000000..eaa0bc1a68751325d3696477540b3c6193478fd3 --- /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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 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 9702efa6e406b3c43a379cbcedbf4c5884337cc5..5716f2398965a6b9beab9530a20d4b87afecb575 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 0000000000000000000000000000000000000000..075daa3b54b5c84325b3dd15da35573192a17a61 --- /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 0000000000000000000000000000000000000000..a18cc43dd2e94b28fa829fd4f3c32759d616f5c5 --- /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 0000000000000000000000000000000000000000..71b500c4d2b621f51e74a256b30f66985f0df084 --- /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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 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 0000000000000000000000000000000000000000..b941a2fe1f61ed122337458eb6de292afac0513a --- /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 0000000000000000000000000000000000000000..ae2acfc6ed000ba368b8cfe2e5fed096b6ae9d94 --- /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 2c30d20674b6a9d56b47b4f85851777fc4f20620..0000000000000000000000000000000000000000 --- 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 73d77fc5559743f6752fce4b2f1eda8e89f77932..0000000000000000000000000000000000000000 --- 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 32e4a4b79febd892e70235bc72def4fe5ebab9b0..0000000000000000000000000000000000000000 --- 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 {}