From 6bbb618f12fe845fc6dc2e13ac68539de7922a71 Mon Sep 17 00:00:00 2001 From: Takiguchi Date: Thu, 8 Aug 2019 20:25:27 +0200 Subject: [PATCH] Refactor the post-card component html. --- .../core/post-card/post-card.component.html | 27 +++++++++++++++++ .../app/core/post-card/post-card.component.ts | 30 ++----------------- 2 files changed, 30 insertions(+), 27 deletions(-) create mode 100644 src/main/ts/src/app/core/post-card/post-card.component.html diff --git a/src/main/ts/src/app/core/post-card/post-card.component.html b/src/main/ts/src/app/core/post-card/post-card.component.html new file mode 100644 index 0000000..bbbb314 --- /dev/null +++ b/src/main/ts/src/app/core/post-card/post-card.component.html @@ -0,0 +1,27 @@ +
+ + + + + + + +

{{post.title}}

+
+ + + {{post.description}} + +
+ + +
+
diff --git a/src/main/ts/src/app/core/post-card/post-card.component.ts b/src/main/ts/src/app/core/post-card/post-card.component.ts index 350d99f..fdf0cab 100755 --- a/src/main/ts/src/app/core/post-card/post-card.component.ts +++ b/src/main/ts/src/app/core/post-card/post-card.component.ts @@ -3,35 +3,11 @@ import { Post } from '../entities'; @Component({ selector: 'app-post-card', - template: ` -
-
- Article - -
-
-
-
-

{{post.title}}

-

{{post.description}}

-
-
- - Article écrit par {{post.author.name}} - ({{post.creationDate | date:'yyyy-MM-dd HH:mm:ss'}}) -
-
`, + templateUrl: './post-card.component.html', styles: [` - div.card { + .post-card { margin-bottom: 50px; - } - .card .card-data { - padding: 15px; - background-color: #f5f5f5; + cursor: pointer; } .creation-date-area { color: #bdbdbd;