Skip to content

Instantly share code, notes, and snippets.

@langan
Last active June 14, 2019 16:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save langan/d6a0d3c5a4084538391519cdff38ff61 to your computer and use it in GitHub Desktop.
Save langan/d6a0d3c5a4084538391519cdff38ff61 to your computer and use it in GitHub Desktop.
<mat-toolbar color="primary">
<span>Blog List</span>
</mat-toolbar>
<div class="page-wrapper">
<div fxLayout="row wrap" fxLayoutGap="16px">
<mat-card fxFlex="calc(33% - 16px)" *ngFor="let post of posts$ | async">
<mat-card-header>
<mat-card-title>{{ post.title.rendered }}</mat-card-title>
<mat-card-subtitle>{{ post.date_gmt | date }}</mat-card-subtitle>
</mat-card-header>
<img matCardImage [src]="post['_embedded']['wp:featuredmedia'][0]['media_details'].sizes['medium'].source_url">
<mat-card-content [innerHTML]="post.excerpt.rendered"></mat-card-content>
<mat-card-actions align="start">
<a mat-button [href]="post.link">View</a>
</mat-card-actions>
</mat-card>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment