25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

75 lines
2.8 KiB

  1. <ion-content>
  2. <button (click)="back()"
  3. class="close-article-button active">
  4. <ion-icon name="close"></ion-icon>
  5. </button>
  6. <div class="image-holder">
  7. <figure>
  8. <img [src]="newsDetails.image">
  9. </figure>
  10. <button *ngIf="newsDetails.type === 'VIDEO'">
  11. <ion-icon name="play"></ion-icon>
  12. </button>
  13. </div>
  14. <section class="content">
  15. <h4> {{ newsDetails.heading }} </h4>
  16. <div class="details">
  17. {{ newsDetails.description }}
  18. </div>
  19. </section>
  20. <section class="comments">
  21. <header> Comments </header>
  22. <ul>
  23. <li *ngFor="let comment of newsDetails.comments">
  24. <p> {{ comment.comment }} <label> - {{ comment.user }} </label> </p>
  25. <button (click)="comment.isLiked = !comment.isLiked"
  26. [ngClass]="{'active' : comment.isLiked}">
  27. <ion-icon *ngIf="!comment.isLiked" name="heart-outline"></ion-icon>
  28. <ion-icon *ngIf="comment.isLiked" name="heart"></ion-icon>
  29. <span> {{ comment.isLiked ? comment.likes + 1 : comment.likes }} </span>
  30. </button>
  31. </li>
  32. <div class="input-holder" id="comment-input">
  33. <input type="text" placeholder="Type your comment" [(ngModel)]="myComment">
  34. <button (click)="postComment()"> <ion-icon name="send"></ion-icon> </button>
  35. </div>
  36. </ul>
  37. </section>
  38. <section class="action-buttons">
  39. <section class="shortcuts">
  40. <button class="wide-button" (click)="newsDetails.isLiked = !newsDetails.isLiked"
  41. [ngClass]="{'active' : newsDetails.isLiked}">
  42. <ion-icon *ngIf="!newsDetails.isLiked" name="heart-outline"></ion-icon>
  43. <ion-icon *ngIf="newsDetails.isLiked" name="heart"></ion-icon>
  44. <span> {{ newsDetails.isLiked ? newsDetails.likes + 1 : newsDetails.likes }} </span>
  45. </button>
  46. <button>
  47. <ion-icon name="share-social-outline"></ion-icon>
  48. </button>
  49. </section>
  50. <section class="shortcuts">
  51. <button (click)="newsDetails.isBookmarked = !newsDetails.isBookmarked"
  52. [ngClass]="{'active' : newsDetails.isBookmarked}">
  53. <ion-icon *ngIf="!newsDetails.isBookmarked" name="bookmark-outline"></ion-icon>
  54. <ion-icon *ngIf="newsDetails.isBookmarked" name="bookmark"></ion-icon>
  55. </button>
  56. <button class="wide-button" (click)="scrollToAddComment()">
  57. <ion-icon name="chatbubble-outline"></ion-icon>
  58. <span> {{ newsDetails.comments.length }} </span>
  59. </button>
  60. </section>
  61. </section>
  62. </ion-content>