Skip to content

Commit

Permalink
Merge 82d8159 into 7c2da7c
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed Nov 29, 2018
2 parents 7c2da7c + 82d8159 commit 2907ad3
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 79 deletions.
4 changes: 2 additions & 2 deletions src/app/_components/footer/footer.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<footer>
<hr/>
<hr />
<div class="content">
<app-mailing-list></app-mailing-list>
</div>
</footer>
</footer>
36 changes: 7 additions & 29 deletions src/app/_components/mailing-list/mailing-list.component.html
Original file line number Diff line number Diff line change
@@ -1,41 +1,19 @@
<div id="mc_embed_signup">
<form
action="//mtlynch.us16.list-manage.com/subscribe/post?u=827c54a25e4f8abbb83d878c4&amp;id=c6ee22ca72"
method="post"
id="mc-embedded-subscribe-form"
name="mc-embedded-subscribe-form"
class="validate"
target="_blank"
ngNoForm
<form action="//mtlynch.us16.list-manage.com/subscribe/post?u=827c54a25e4f8abbb83d878c4&amp;id=c6ee22ca72" method="post"
id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" ngNoForm
novalidate>
<div id="mc_embed_signup_scroll">
<p>
KetoHub is brand new!<br/>
KetoHub is brand new!<br />
Subscribe to our newsletter to find out when we add new features.
</p>
<input
type="email"
value=""
name="EMAIL"
class="email"
id="mce-EMAIL"
placeholder="email address"
required>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
<div>
<input
type="submit"
value="Subscribe"
name="subscribe"
id="mc-embedded-subscribe"
class="button" />
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button" />
</div>
<div style="position: absolute; left: -5000px;" aria-hidden="true">
<input
type="text"
name="b_827c54a25e4f8abbb83d878c4_c6ee22ca72"
tabindex="-1"
value="" />
<input type="text" name="b_827c54a25e4f8abbb83d878c4_c6ee22ca72" tabindex="-1" value="" />
</div>
</div>
</form>
</div>
</div>
2 changes: 1 addition & 1 deletion src/app/_components/nav/nav.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<nav class="navbar navbar-light">
<a routerLink="/" routerLinkActive="active"><img src="assets/img/logo.png" alt="KetoHub logo" /></a>
</nav>
</nav>
23 changes: 8 additions & 15 deletions src/app/_components/recipe-card/recipe-card.component.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,30 @@
<div
[ngClass]="['card', getCardClass()]">
<div [ngClass]="['card', getCardClass()]">
<a [href]="recipe.url" target="_blank" rel="noopener">
<img
[src]="getDefaultThumbnailUrl()"
[srcset]="getThumbnailUrls()"
sizes="(max-width: 377px) 340px,
<img [src]="getDefaultThumbnailUrl()" [srcset]="getThumbnailUrls()" sizes="(max-width: 377px) 340px,
(max-width: 622px) 560px,
(max-width: 768px) 680px,
340px"
[attr.alt]="recipe.title"
class="img-responsive card-img-top img-fluid">
[attr.alt]="recipe.title" class="img-responsive card-img-top img-fluid">
</a>
<div class="card-block">
<h3 class="card-title">
<a [href]="recipe.url" target="_blank" rel="noopener">
<div innerHTML="{{ recipe.title | highlightedResult : searchKeywords }}"></div>
</a>
</h3>
<div
*ngIf="matchingIngredients(recipe.ingredients).length > 0"
class="card-text ingredients">
<div *ngIf="matchingIngredients(recipe.ingredients).length > 0" class="card-text ingredients">
<b>Ingredients</b>
<ul>
<li
*ngFor="let ingredient of matchingIngredients(recipe.ingredients)">
<li *ngFor="let ingredient of matchingIngredients(recipe.ingredients)">
<div innerHTML="{{ ingredient | capitalize | highlightedResult : searchKeywords}}"></div>
</li>
</ul>
</div>
<footer>
<small class="text-muted">
Published {{ recipe.publishedTime | timeSince }} ago on <a [href]="recipe.url" target="_blank" rel="noopener">{{ recipe.url | rootDomain }}</a>
Published {{ recipe.publishedTime | timeSince }} ago on <a [href]="recipe.url" target="_blank" rel="noopener">{{
recipe.url | rootDomain }}</a>
</small>
</footer>
</div>
</div>
</div>
42 changes: 11 additions & 31 deletions src/app/_components/recipe-list/recipe-list.component.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<div class="content">
<p>
<button type="button" class="btn btn-outline-primary" (click)="expandCategoryButtons = !expandCategoryButtons"
[attr.aria-expanded]="!expandCategoryButtons" aria-controls="categoryButtons">
[attr.aria-expanded]="!expandCategoryButtons" aria-controls="categoryButtons">
Meal filters
</button>
</p>
<div id="categoryButtons" [ngbCollapse]="!expandCategoryButtons">
<div class="btn-group-lg"
role="group" aria-label="Recipe categories">
<button type="button"
*ngFor="let item of categories"
(click)="selectCategory(item)"
[ngClass]="['btn recipe-categories', getCategoryClass(item)]">
<div class="btn-group-lg" role="group" aria-label="Recipe categories">
<button type="button" *ngFor="let item of categories" (click)="selectCategory(item)" [ngClass]="['btn recipe-categories', getCategoryClass(item)]">
{{ item }}s
</button>
</div>
Expand All @@ -23,36 +19,20 @@
<p>Showing {{ recipes.length | number:0 }} keto recipes</p>
</ng-template>
<div class="form-group" class="my-3">
<input type="text" id="keywords" placeholder="Search by recipe title or ingredient" class="form-control" [(ngModel)]="keywordsRaw" (ngModelChange)="updateSearchParams($event)">
<input type="text" id="keywords" placeholder="Search by recipe title or ingredient" class="form-control"
[(ngModel)]="keywordsRaw" (ngModelChange)="updateSearchParams($event)">
</div>
<div *ngIf="loaded">
<ngb-pagination
[boundaryLinks]="true"
[directionLinks]="true"
[collectionSize]="recipes.length"
[(page)]="currentPage"
[pageSize]="pageSize"
[maxSize]="maxPageButtons"
[ellipses]="false"
[rotate]="true">
<ngb-pagination [boundaryLinks]="true" [directionLinks]="true" [collectionSize]="recipes.length" [(page)]="currentPage"
[pageSize]="pageSize" [maxSize]="maxPageButtons" [ellipses]="false" [rotate]="true">
</ngb-pagination>
<div class="recipes">
<app-recipe-card
[recipe]="recipe"
[searchKeywords]="getKeywords()"
*ngFor="let recipe of recipes | range:currentPage:pageSize">
<app-recipe-card [recipe]="recipe" [searchKeywords]="getKeywords()" *ngFor="let recipe of recipes | range:currentPage:pageSize">
</app-recipe-card>
</div>
<div class="spacer"></div>
<ngb-pagination
[boundaryLinks]="true"
[directionLinks]="true"
[collectionSize]="recipes.length"
[(page)]="currentPage"
[pageSize]="pageSize"
[maxSize]="maxPageButtons"
[ellipses]="false"
[rotate]="true">
<ngb-pagination [boundaryLinks]="true" [directionLinks]="true" [collectionSize]="recipes.length" [(page)]="currentPage"
[pageSize]="pageSize" [maxSize]="maxPageButtons" [ellipses]="false" [rotate]="true">
</ngb-pagination>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

<router-outlet></router-outlet>

<app-footer></app-footer>
<app-footer></app-footer>

0 comments on commit 2907ad3

Please sign in to comment.