From e95baf8b8e86c243ef0a1c858360fdf7e1ea515a Mon Sep 17 00:00:00 2001 From: cofrizot Date: Mon, 18 Sep 2023 17:18:38 +0200 Subject: [PATCH] Add the CodeInput and Output components --- .idea/.gitignore | 5 +++++ .idea/modules.xml | 8 +++++++ .idea/sandkasten-web.iml | 12 +++++++++++ .idea/vcs.xml | 6 ++++++ sandkasten/angular.json | 3 +++ sandkasten/src/app/app.component.css | 14 +++++++++++++ sandkasten/src/app/app.component.html | 7 ++++++- sandkasten/src/app/app.component.spec.ts | 2 +- sandkasten/src/app/app.module.ts | 8 ++++++- .../app/code-input/code-input.component.css | 5 +++++ .../app/code-input/code-input.component.html | 3 +++ .../code-input/code-input.component.spec.ts | 21 +++++++++++++++++++ .../app/code-input/code-input.component.ts | 10 +++++++++ .../app/code-output/code-output.component.css | 0 .../code-output/code-output.component.html | 1 + .../code-output/code-output.component.spec.ts | 21 +++++++++++++++++++ .../app/code-output/code-output.component.ts | 10 +++++++++ .../src/app/footer/footer.component.css | 0 .../src/app/footer/footer.component.html | 1 + .../src/app/footer/footer.component.spec.ts | 21 +++++++++++++++++++ sandkasten/src/app/footer/footer.component.ts | 10 +++++++++ 21 files changed, 165 insertions(+), 3 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/modules.xml create mode 100644 .idea/sandkasten-web.iml create mode 100644 .idea/vcs.xml create mode 100644 sandkasten/src/app/code-input/code-input.component.css create mode 100644 sandkasten/src/app/code-input/code-input.component.html create mode 100644 sandkasten/src/app/code-input/code-input.component.spec.ts create mode 100644 sandkasten/src/app/code-input/code-input.component.ts create mode 100644 sandkasten/src/app/code-output/code-output.component.css create mode 100644 sandkasten/src/app/code-output/code-output.component.html create mode 100644 sandkasten/src/app/code-output/code-output.component.spec.ts create mode 100644 sandkasten/src/app/code-output/code-output.component.ts create mode 100644 sandkasten/src/app/footer/footer.component.css create mode 100644 sandkasten/src/app/footer/footer.component.html create mode 100644 sandkasten/src/app/footer/footer.component.spec.ts create mode 100644 sandkasten/src/app/footer/footer.component.ts diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..e2b5157 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/sandkasten-web.iml b/.idea/sandkasten-web.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/sandkasten-web.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/sandkasten/angular.json b/sandkasten/angular.json index 8a359a3..58c24f0 100644 --- a/sandkasten/angular.json +++ b/sandkasten/angular.json @@ -94,5 +94,8 @@ } } } + }, + "cli": { + "analytics": false } } diff --git a/sandkasten/src/app/app.component.css b/sandkasten/src/app/app.component.css index e69de29..6f55f37 100644 --- a/sandkasten/src/app/app.component.css +++ b/sandkasten/src/app/app.component.css @@ -0,0 +1,14 @@ +.code_container { + display: grid; + grid-template-columns: 1fr 1fr; + + color: white; +} + +.code_container .code_input { + background: red; +} + +.code_container .code_output { + background: blue; +} diff --git a/sandkasten/src/app/app.component.html b/sandkasten/src/app/app.component.html index b036bff..2d60ea4 100644 --- a/sandkasten/src/app/app.component.html +++ b/sandkasten/src/app/app.component.html @@ -1 +1,6 @@ - \ No newline at end of file + +
+ + +
+ diff --git a/sandkasten/src/app/app.component.spec.ts b/sandkasten/src/app/app.component.spec.ts index 3be5208..d3e5fe5 100644 --- a/sandkasten/src/app/app.component.spec.ts +++ b/sandkasten/src/app/app.component.spec.ts @@ -5,7 +5,7 @@ import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [RouterTestingModule], - declarations: [AppComponent]Ensuite, dans le texte du cours, je vous explique les concepts du chap + declarations: [AppComponent] })); it('should create the app', () => { diff --git a/sandkasten/src/app/app.module.ts b/sandkasten/src/app/app.module.ts index 31ac3d7..d19b568 100644 --- a/sandkasten/src/app/app.module.ts +++ b/sandkasten/src/app/app.module.ts @@ -4,11 +4,17 @@ import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { HeaderComponent } from './header/header.component'; +import { CodeInputComponent } from './code-input/code-input.component'; +import { CodeOutputComponent } from './code-output/code-output.component'; +import { FooterComponent } from './footer/footer.component'; @NgModule({ declarations: [ AppComponent, - HeaderComponent + HeaderComponent, + CodeInputComponent, + CodeOutputComponent, + FooterComponent ], imports: [ BrowserModule, diff --git a/sandkasten/src/app/code-input/code-input.component.css b/sandkasten/src/app/code-input/code-input.component.css new file mode 100644 index 0000000..0f6cfd3 --- /dev/null +++ b/sandkasten/src/app/code-input/code-input.component.css @@ -0,0 +1,5 @@ +.code_input .code_input_textarea { + background-color: #cccccc; + min-height: 80vh; + width: 100%; +} diff --git a/sandkasten/src/app/code-input/code-input.component.html b/sandkasten/src/app/code-input/code-input.component.html new file mode 100644 index 0000000..7862cef --- /dev/null +++ b/sandkasten/src/app/code-input/code-input.component.html @@ -0,0 +1,3 @@ +
+ +
diff --git a/sandkasten/src/app/code-input/code-input.component.spec.ts b/sandkasten/src/app/code-input/code-input.component.spec.ts new file mode 100644 index 0000000..39d907b --- /dev/null +++ b/sandkasten/src/app/code-input/code-input.component.spec.ts @@ -0,0 +1,21 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CodeInputComponent } from './code-input.component'; + +describe('CodeInputComponent', () => { + let component: CodeInputComponent; + let fixture: ComponentFixture; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [CodeInputComponent] + }); + fixture = TestBed.createComponent(CodeInputComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/sandkasten/src/app/code-input/code-input.component.ts b/sandkasten/src/app/code-input/code-input.component.ts new file mode 100644 index 0000000..d07091f --- /dev/null +++ b/sandkasten/src/app/code-input/code-input.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-code-input', + templateUrl: './code-input.component.html', + styleUrls: ['./code-input.component.css'] +}) +export class CodeInputComponent { + +} diff --git a/sandkasten/src/app/code-output/code-output.component.css b/sandkasten/src/app/code-output/code-output.component.css new file mode 100644 index 0000000..e69de29 diff --git a/sandkasten/src/app/code-output/code-output.component.html b/sandkasten/src/app/code-output/code-output.component.html new file mode 100644 index 0000000..47bdf6e --- /dev/null +++ b/sandkasten/src/app/code-output/code-output.component.html @@ -0,0 +1 @@ +

code-output works!

diff --git a/sandkasten/src/app/code-output/code-output.component.spec.ts b/sandkasten/src/app/code-output/code-output.component.spec.ts new file mode 100644 index 0000000..2e0c61e --- /dev/null +++ b/sandkasten/src/app/code-output/code-output.component.spec.ts @@ -0,0 +1,21 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CodeOutputComponent } from './code-output.component'; + +describe('CodeOutputComponent', () => { + let component: CodeOutputComponent; + let fixture: ComponentFixture; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [CodeOutputComponent] + }); + fixture = TestBed.createComponent(CodeOutputComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/sandkasten/src/app/code-output/code-output.component.ts b/sandkasten/src/app/code-output/code-output.component.ts new file mode 100644 index 0000000..4cd492c --- /dev/null +++ b/sandkasten/src/app/code-output/code-output.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-code-output', + templateUrl: './code-output.component.html', + styleUrls: ['./code-output.component.css'] +}) +export class CodeOutputComponent { + +} diff --git a/sandkasten/src/app/footer/footer.component.css b/sandkasten/src/app/footer/footer.component.css new file mode 100644 index 0000000..e69de29 diff --git a/sandkasten/src/app/footer/footer.component.html b/sandkasten/src/app/footer/footer.component.html new file mode 100644 index 0000000..28c0d7d --- /dev/null +++ b/sandkasten/src/app/footer/footer.component.html @@ -0,0 +1 @@ +

footer works!

diff --git a/sandkasten/src/app/footer/footer.component.spec.ts b/sandkasten/src/app/footer/footer.component.spec.ts new file mode 100644 index 0000000..832b03a --- /dev/null +++ b/sandkasten/src/app/footer/footer.component.spec.ts @@ -0,0 +1,21 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FooterComponent } from './footer.component'; + +describe('FooterComponent', () => { + let component: FooterComponent; + let fixture: ComponentFixture; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [FooterComponent] + }); + fixture = TestBed.createComponent(FooterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/sandkasten/src/app/footer/footer.component.ts b/sandkasten/src/app/footer/footer.component.ts new file mode 100644 index 0000000..98c515e --- /dev/null +++ b/sandkasten/src/app/footer/footer.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-footer', + templateUrl: './footer.component.html', + styleUrls: ['./footer.component.css'] +}) +export class FooterComponent { + +}