diff --git a/front/readme.md b/front/readme.md index 7f14691..e3bd537 100644 --- a/front/readme.md +++ b/front/readme.md @@ -15,7 +15,7 @@ npm audit fix start the application: ``` -npx ng serve +npx ng serve --watch ``` diff --git a/front/src/app/app.module.ts b/front/src/app/app.module.ts index 6fdce0f..753a5ee 100644 --- a/front/src/app/app.module.ts +++ b/front/src/app/app.module.ts @@ -16,6 +16,7 @@ import { routing } from './app-routing.module'; import { CardListComponent } from './card-list/card-list.component'; import { AuthService } from './auth.service'; import { TopMenuComponent } from './top-menu/top-menu.component'; +import { ElementTypeComponent } from './element-type/element-type.component'; import { ElementGroupComponent } from './element-group/element-group.component'; import { ElementSaisonComponent } from './element-saison/element-saison.component'; import { ElementVideoComponent } from './element-video/element-video.component'; @@ -48,6 +49,7 @@ import { AppComponent } from './app.component'; declarations: [ AppComponent, TopMenuComponent, + ElementTypeComponent, ElementGroupComponent, ElementSaisonComponent, ElementVideoComponent, diff --git a/front/src/app/element-type/element-type.component.html b/front/src/app/element-type/element-type.component.html index bbdc7e9..3c0c6fd 100644 --- a/front/src/app/element-type/element-type.component.html +++ b/front/src/app/element-type/element-type.component.html @@ -1,4 +1,11 @@
- {{name}}
- {{description}} +
+ type image +
+
+ {{name}} +
+
+ {{description}} +
\ No newline at end of file diff --git a/front/src/app/element-type/element-type.component.less b/front/src/app/element-type/element-type.component.less index 139597f..894e940 100644 --- a/front/src/app/element-type/element-type.component.less +++ b/front/src/app/element-type/element-type.component.less @@ -1,2 +1,21 @@ + +.imgContainer { + text-align: center; + margin: 15px 0 0 0; +} + +img.miniature { + width: 80px; + height: 80px; + //border-radius: 50%; +} + +.title { + font-size: 24px; +} + +.description { + font-size: 12px; +} \ No newline at end of file diff --git a/front/src/app/element-type/element-type.component.ts b/front/src/app/element-type/element-type.component.ts index 999ca45..38f369d 100644 --- a/front/src/app/element-type/element-type.component.ts +++ b/front/src/app/element-type/element-type.component.ts @@ -22,8 +22,9 @@ export class ElementTypeComponent implements OnInit { // input parameters @Input() id_type:number = -1; - error:string = "" + imageSource:string = "" name:string = "" + error:string = "" description:string = "" constructor(private router: Router, private typeService: TypeService) { @@ -38,10 +39,44 @@ export class ElementTypeComponent implements OnInit { self.error = ""; self.name = response.name self.description = response.description + console.log("plouf : '" + self.name + "'"); + switch (self.name) { + case "Documentary": + self.imageSource = "assets/images/type_documentary.svg"; + break; + case "Movie": + self.imageSource = "assets/images/type_film.svg"; + break; + case "Annimation": + self.imageSource = "assets/images/type_annimation.svg"; + break; + case "Short Films": + self.imageSource = "assets/images/type_film-short.svg"; + break; + case "tv show": + self.imageSource = "assets/images/type_tv-show.svg"; + break; + case "Anniation tv show": + self.imageSource = "assets/images/type_tv-show-annimation.svg"; + break; + case "Theater": + self.imageSource = "assets/images/type_theater.svg"; + break; + case "One man show": + self.imageSource = "assets/images/type_one-man-show.svg"; + break; + case "Concert": + self.imageSource = "assets/images/type_concert.svg"; + break; + case "Opera": + self.imageSource = "assets/images/type_opera.svg"; + break; + } }).catch(function(response) { self.error = "Can not get the data"; - self.name = "" - self.description = "" + self.name = ""; + self.description = ""; + self.imageSource = ""; }); } } diff --git a/front/src/app/home/home.component.html b/front/src/app/home/home.component.html index 4e5d0b6..9b640ec 100644 --- a/front/src/app/home/home.component.html +++ b/front/src/app/home/home.component.html @@ -1,11 +1,7 @@
-
-
- - {{data.name}} - -
+
+
\ No newline at end of file diff --git a/front/src/assets/images/type_annimation.svg b/front/src/assets/images/type_annimation.svg new file mode 100644 index 0000000..e16fb2b --- /dev/null +++ b/front/src/assets/images/type_annimation.svg @@ -0,0 +1,115 @@ + + + + +Created by potrace 1.15, written by Peter Selinger 2001-2017 + + + + + + + + + + + + + + + + + + diff --git a/front/src/assets/images/type_concert.svg b/front/src/assets/images/type_concert.svg new file mode 100644 index 0000000..f674391 --- /dev/null +++ b/front/src/assets/images/type_concert.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file diff --git a/front/src/assets/images/type_documentary.svg b/front/src/assets/images/type_documentary.svg new file mode 100644 index 0000000..86e5f9a --- /dev/null +++ b/front/src/assets/images/type_documentary.svg @@ -0,0 +1,77 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/front/src/assets/images/type_film-short.svg b/front/src/assets/images/type_film-short.svg new file mode 100644 index 0000000..dbe0708 --- /dev/null +++ b/front/src/assets/images/type_film-short.svg @@ -0,0 +1,132 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/front/src/assets/images/type_film.svg b/front/src/assets/images/type_film.svg new file mode 100644 index 0000000..69237ec --- /dev/null +++ b/front/src/assets/images/type_film.svg @@ -0,0 +1,118 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/front/src/assets/images/type_one-man-show.svg b/front/src/assets/images/type_one-man-show.svg new file mode 100644 index 0000000..5e8b935 --- /dev/null +++ b/front/src/assets/images/type_one-man-show.svg @@ -0,0 +1,84 @@ + + + +image/svg+xml + + + + + + \ No newline at end of file diff --git a/front/src/assets/images/type_opera.svg b/front/src/assets/images/type_opera.svg new file mode 100644 index 0000000..31d2eff --- /dev/null +++ b/front/src/assets/images/type_opera.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/front/src/assets/images/type_theater.svg b/front/src/assets/images/type_theater.svg new file mode 100644 index 0000000..46ad104 --- /dev/null +++ b/front/src/assets/images/type_theater.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file diff --git a/front/src/assets/images/type_tv-show-annimation.svg b/front/src/assets/images/type_tv-show-annimation.svg new file mode 100644 index 0000000..2179d4f --- /dev/null +++ b/front/src/assets/images/type_tv-show-annimation.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file diff --git a/front/src/assets/images/type_tv-show.svg b/front/src/assets/images/type_tv-show.svg new file mode 100644 index 0000000..fd5012f --- /dev/null +++ b/front/src/assets/images/type_tv-show.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + +