Commit 8104fb67 authored by 神楽坂玲奈's avatar 神楽坂玲奈

社区热帖

parent 7be813f0
......@@ -84,31 +84,12 @@
</a>
</md-card>
<!--<md-card *ngFor="let item of ygopro.topics | async">-->
<!--<a [href]="item.url" target="_blank">-->
<!--<md-card-header>-->
<!--<img *ngIf="item.image_url" md-card-avatar [src]="item.image_url">-->
<!--<md-card-title>{{item.title}}</md-card-title>-->
<!--<md-card-subtitle>by {{item.last_poster_username}} / {{item.last_posted_at | date:"mediumDate"}}</md-card-subtitle>-->
<!--</md-card-header>-->
<!--</a>-->
<!---->
<!--<md-card-header>-->
<!--<img [src]="item.created_by.avatar_url" md-card-avatar class="example-header-image">-->
<!--<md-card-title>{{item.title}}</md-card-title>-->
<!--&lt;!&ndash;<md-card-subtitle>Dog Breed</md-card-subtitle>&ndash;&gt;-->
<!--</md-card-header>-->
<!--<img md-card-image [src]="item.image_url">-->
<!--<md-card-content>-->
<!--&lt;!&ndash;<p [innerHTML]="item.description">&ndash;&gt;-->
<!--&lt;!&ndash;The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.&ndash;&gt;-->
<!--&lt;!&ndash;A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally&ndash;&gt;-->
<!--&lt;!&ndash;bred for hunting.&ndash;&gt;-->
<!--&lt;!&ndash;</p>&ndash;&gt;-->
<!--</md-card-content>-->
<!--<md-card-actions>-->
<!--<button md-button>LIKE</button>-->
<!--<button md-button>SHARE</button>-->
<!--</md-card-actions>-->
<!--</md-card>-->
<md-card *ngFor="let item of ygopro.topics | async">
<a [href]="item.url" target="_blank">
<md-card-header>
<img *ngIf="item.image_url" md-card-avatar [src]="item.image_url">
<md-card-title>{{item.title}}</md-card-title>
<md-card-subtitle>by {{item.last_poster_username}} / {{item.last_posted_at | date:"mediumDate"}}</md-card-subtitle>
</md-card-header>
</a>
</md-card>
......@@ -115,7 +115,7 @@ export class YGOProService {
// console.log(doc['rss'].channel[0].item)
// return doc['rss'].channel[0].item;
// });
this.topics = this.http.get('https://ygobbs.com/top/quarterly.json').map(response => response.json().topic_list.topics.map(topic => ({
this.topics = this.http.get('https://ygobbs.com/top/quarterly.json').map(response => response.json().topic_list.topics.slice(0, 5).map(topic => ({
...topic,
url: new URL(`/t/${topic.slug}/${topic.id}`, 'https://ygobbs.com').toString(),
image_url: topic.image_url && new URL(topic.image_url, 'https://ygobbs.com').toString()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment