-
Notifications
You must be signed in to change notification settings - Fork 3
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
14 changed files
with
229 additions
and
71 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
113 changes: 100 additions & 13 deletions
113
frontend/instarecipes/src/app/index/recent/recent.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,17 +1,104 @@ | ||
<div> | ||
<video autoplay muted loop id="myVideo" | ||
style="position: fixed;z-index: -1; top: 10%; opacity:0.6; width: 100%; object-fit: cover;"> | ||
<source src="../../assets/images/backgrounds/index.mp4" type="video/mp4"> | ||
</video> | ||
<div class="container"> | ||
<!-- Recent recipes --> | ||
<h4>{{title}}</h4> | ||
<div id="recipes-container"> | ||
<div *ngFor="let recipe of recipes"> | ||
{{recipe?.title}} | ||
<br> | ||
{{recipe?.description}} | ||
<video autoplay muted loop id="myVideo" | ||
style="position: fixed;z-index: -1; top: 10%; opacity:0.6; width: 100%; object-fit: cover;"> | ||
<source src="../../assets/images/backgrounds/index.mp4" type="video/mp4"> | ||
</video> | ||
<div class="container"> | ||
<!-- Recent recipes --> | ||
<h3 class="my-4">Recent user's recipes</h3> | ||
<div #recipesContainer id="recipes-container"> | ||
<div *ngFor="let recipe of recipes; index as i"> | ||
<div *ngIf="isOdd(i); then elseBlock else thenBlock"></div> | ||
<ng-template #thenBlock> | ||
<div class="row"> | ||
<div class="col-md-7"> | ||
<a href="#"> | ||
<img class="img-fluid rounded mb-3 mb-md-0" [src]="image[i]"> | ||
</a> | ||
<div class="likes-comments-top-left"> | ||
<div class="row" style="margin-right: 0;margin-left: 0;"> | ||
<div class="col-3"> | ||
<img class="icon-fluid" src="../../assets/images/icons/like_pressed.png"> | ||
</div> | ||
<div class="col-3"> | ||
<p class="icon-fluid pub-date-text">{{recipe?.likes}}</p> | ||
</div> | ||
<div class="col-3"> | ||
<img class="icon-fluid" src="../../assets/images/icons/dialogue.png"> | ||
</div> | ||
<div class="col-3"> | ||
<p class="icon-fluid pub-date-text">{{recipe?.n_comments}}</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="bottom-text-image rounded mb-3 mb-md-0"> | ||
<h3 style="word-break: break-all;">{{recipe?.title}}</h3> | ||
</div> | ||
</div> | ||
<div class="col-md-4"> | ||
<h3>Introduction</h3> | ||
<p style="word-break: break-all;">{{recipe?.description}}</p> | ||
<a class="btn btn-primary" href="/recipes/{{recipe?.id}}">Read | ||
<span class="glyphicon glyphicon-chevron-right"></span> | ||
</a> | ||
</div> | ||
<div class="col-lg-1" style="width:50%;align-self: center;border-left:3px solid rgba(0, 0, 0, 0.2);"> | ||
<img class="d-flex mr-3 rounded-circle profile-border" style="width:100%;height:60px;" [src]="avatar[i]"> | ||
<p>@{{recipe?.username.username}}</p> | ||
</div> | ||
</div> | ||
</ng-template> | ||
<ng-template #elseBlock> | ||
<div #elseBlock class="row"> | ||
<div class="col-lg-1" style="width:50%;align-self: center;border-right:3px solid rgba(0, 0, 0, 0.2);"> | ||
<img class="d-flex mr-3 rounded-circle profile-border" style="width:100%;height:60px;" [src]="avatar[i]"> | ||
<p>@{{recipe?.username.username}}</p> | ||
</div> | ||
<div class="col-md-4"> | ||
<h3>Introduction</h3> | ||
<p style="word-break: break-all;">{{recipe?.description}}</p> | ||
<a class="btn btn-primary" href="/recipes/{{recipe?.id}}">Read | ||
<span class="glyphicon glyphicon-chevron-right\"></span> | ||
</a> | ||
</div> | ||
<div class="col-md-7"> | ||
<a href="#"> | ||
<img class="img-fluid rounded mb-3 mb-md-0" [src]="image[i]"> | ||
</a> | ||
<div class="likes-comments-top-right"> | ||
<div class="row" style="margin-right: 0;margin-left: 0;"> | ||
<div class="col-3"> | ||
<img class="icon-fluid" src="../../assets/images/icons/like_pressed.png"> | ||
</div> | ||
<div class="col-3"> | ||
<p class="icon-fluid pub-date-text">{{recipe?.likes}}</p> | ||
</div> | ||
<div class="col-3"> | ||
<img class="icon-fluid" src="../../assets/images/icons/dialogue.png"> | ||
</div> | ||
<div class="col-3"> | ||
<p class="icon-fluid pub-date-text">{{recipe?.n_comments}}</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="bottom-text-image rounded mb-3 mb-md-0"> | ||
<h3 style="word-break: break-all">{{recipe?.title}}</h3> | ||
</div> | ||
</div> | ||
</div> | ||
</ng-template> | ||
<hr> | ||
</div> | ||
</div> | ||
</div> | ||
<hr width="100%"> | ||
</div> | ||
|
||
<!-- Ajax load more button --> | ||
<div class="loadmore-container"> | ||
<div> | ||
<img #loadmore1 id="loadmore1" (click)="loadMore()" class="loadmore-button" src="../../assets/images/icons/loadmore_unpressed.png" alt="" /> | ||
<img #loadmore2 id="loadmore2" class="loadmore-button" src="../../assets/images/icons/spinner.gif" alt="" hidden /> | ||
</div> | ||
</div> | ||
|
||
</div> |
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
Oops, something went wrong.