-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
122 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<li class="post-card"> | ||
<app-likes [likesCount]="blogPost.likes"/> | ||
<section class="content"> | ||
<div class="content-head"> | ||
<div class="title"> | ||
<img [src]="blogPost.user.image || '../../../assets/images/avatars/default-avatar.png'" [alt]="blogPost.user.username"> | ||
<h3>{{ blogPost.user.username }}</h3> | ||
<p>{{ getTimeSince(blogPost.createdAt) }}</p> | ||
</div> | ||
<div class="comments"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="14" viewBox="0 0 24 24" fill="#5357B6"> | ||
<path fill-rule="evenodd" d="M12 2.25c-2.429 0-4.817.178-7.152.521C2.87 3.061 1.5 4.795 1.5 6.741v6.018c0 1.946 1.37 3.68 3.348 3.97.877.129 1.761.234 2.652.316V21a.75.75 0 0 0 1.28.53l4.184-4.183a.39.39 0 0 1 .266-.112c2.006-.05 3.982-.22 5.922-.506 1.978-.29 3.348-2.023 3.348-3.97V6.741c0-1.947-1.37-3.68-3.348-3.97A49.145 49.145 0 0 0 12 2.25ZM8.25 8.625a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Zm2.625 1.125a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875-1.125a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Z" clip-rule="evenodd" /> | ||
</svg> | ||
<p>{{ blogPost.comments.length }} comments</p> | ||
</div> | ||
<li class="post-card"> | ||
<app-likes [likesCount]="blogPost.likes"/> | ||
<section class="content"> | ||
<div class="content-head"> | ||
<div class="title"> | ||
<img [src]="blogPost.user.image || randomAvatarUrl" [alt]="blogPost.user.username"> | ||
<h3>{{ blogPost.user.username || 'Non' }}</h3> | ||
<p>{{ getTimeSince(blogPost.createdAt) }}</p> | ||
</div> | ||
<p>{{ blogPost.content }}</p> | ||
</section> | ||
</li> | ||
<div class="comments"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="14" viewBox="0 0 24 24" fill="#5357B6"> | ||
<path fill-rule="evenodd" d="M12 2.25c-2.429 0-4.817.178-7.152.521C2.87 3.061 1.5 4.795 1.5 6.741v6.018c0 1.946 1.37 3.68 3.348 3.97.877.129 1.761.234 2.652.316V21a.75.75 0 0 0 1.28.53l4.184-4.183a.39.39 0 0 1 .266-.112c2.006-.05 3.982-.22 5.922-.506 1.978-.29 3.348-2.023 3.348-3.97V6.741c0-1.947-1.37-3.68-3.348-3.97A49.145 49.145 0 0 0 12 2.25ZM8.25 8.625a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Zm2.625 1.125a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875-1.125a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Z" clip-rule="evenodd" /> | ||
</svg> | ||
<p>{{ blogPost.comments.length }} comments</p> | ||
</div> | ||
</div> | ||
<p>{{ blogPost.content }}</p> | ||
</section> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
src/app/views/auth/user-profile/user-profile.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<section> | ||
<h3>User Profile</h3> | ||
<form class="profile-form"> | ||
<form class="profile-form" (ngSubmit)="saveChanges()"> | ||
<div class="profile-image"> | ||
<img id="profile-img" #userAvatar src="../../../assets/images/avatars/image-juliusomo.png" alt="User Avatar" id="userAvatar"> | ||
<button mat-mini-fab color="primary" class="upload-btn" (click)="onUploadButtonClick()"> | ||
<img id="profile-img" #userAvatar [src]="user.image || '../../../assets/images/avatars/image-juliusomo.png'" alt="User Avatar" id="userAvatar"> | ||
<button mat-mini-fab color="primary" class="upload-btn" type="button" (click)="onUploadButtonClick()"> | ||
<mat-icon>add_a_photo</mat-icon> | ||
</button> | ||
<input #imageUpload type="file" id="imageUpload" accept="image/*" style="display: none;" (change)="onImageSelected($event)"> | ||
</div> | ||
<mat-form-field appearance="outline"> | ||
<mat-label>Username</mat-label> | ||
<input matInput placeholder="Enter your username"> | ||
<input matInput [(ngModel)]="user.username" name="username" placeholder="Enter your username"> | ||
</mat-form-field> | ||
<mat-form-field appearance="outline"> | ||
<mat-label>Email</mat-label> | ||
<input matInput placeholder="Enter your email" type="email"> | ||
<input matInput [(ngModel)]="user.email" name="email" placeholder="Enter your email" type="email"> | ||
</mat-form-field> | ||
<div class="button-group"> | ||
<button mat-raised-button color="primary" (click)="saveChanges()">Save Changes</button> | ||
<button mat-raised-button color="warn" (click)="logOut()">Log Out</button> | ||
<button mat-raised-button color="primary" type="submit">Save Changes</button> | ||
<button mat-raised-button color="warn" type="button" (click)="logOut()">Log Out</button> | ||
</div> | ||
</form> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.