No Description

event.html 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!--
  2. Generated template for the EventPage page.
  3. See http://ionicframework.com/docs/components/#navigation for more info on
  4. Ionic pages and navigation.
  5. -->
  6. <ion-header>
  7. <ion-navbar color="primary">
  8. <ion-title><img src="assets/imgs/ss-small.png" class='top-logo'>
  9. </ion-title>
  10. </ion-navbar>
  11. </ion-header>
  12. <ion-content>
  13. <ion-card *ngFor="let p of eventPosts">
  14. <img [src]="p.jetpack_featured_media_url"/>
  15. <ion-card-content>
  16. <h2>{{ p.title.rendered }}</h2>
  17. </ion-card-content>
  18. <ion-row>
  19. <ion-col>
  20. <button ion-button icon-start color='dark' block (click)="openLink(p.guid.rendered)">
  21. <ion-icon name="thumbs-up"></ion-icon>
  22. Read
  23. </button>
  24. </ion-col>
  25. <ion-col>
  26. <button ion-button icon-start color='success' block>
  27. <ion-icon name="text"></ion-icon>
  28. <div>Join</div>
  29. </button>
  30. </ion-col>
  31. </ion-row>
  32. </ion-card>
  33. <ion-refresher (ionRefresh)="refreshEvent($event)">
  34. <ion-refresher-content></ion-refresher-content>
  35. </ion-refresher>
  36. <!--
  37. <event-chart></event-chart> -->
  38. <!--
  39. <img src="assets/imgs/run-event.jpg" width="100%" /> -->
  40. <div>
  41. <ion-list-header *ngIf="allRunners" text-center>
  42. Total users: {{ format(allRunners.tuser + '') }} / activities: {{ format(allRunners.tact +'') }}
  43. </ion-list-header>
  44. <auth-detail [authId]="po.athId" showStyle='norank' *ngIf="po"></auth-detail>
  45. <!--
  46. <auth-detail [authId]="229815" showStyle='norank'></auth-detail> -->
  47. <ion-segment [(ngModel)]="eventSeg" color="secondary">
  48. <ion-segment-button value="contributors">
  49. Top Contributors
  50. </ion-segment-button>
  51. <ion-segment-button value="today">
  52. Top Today
  53. </ion-segment-button>
  54. <ion-segment-button value="activities">
  55. Recents
  56. </ion-segment-button>
  57. </ion-segment>
  58. <div [ngSwitch]="eventSeg">
  59. <div *ngSwitchCase="'contributors'">
  60. <ion-list>
  61. <auth-detail [authId]="t._id.athId" [rank]="i" *ngFor="let t of tops; let i = index" showStyle='full'
  62. (click)="openLink('https://www.strava.com/athletes/'+t._id.athId)"
  63. ></auth-detail>
  64. </ion-list></div>
  65. <div *ngSwitchCase="'today'">
  66. <ion-list>
  67. <auth-detail [authId]="t._id.athId" [rank]="i" [cals]="t.cals" *ngFor="let t of todayTops; let i = index" showStyle='today' (click)="openLink('https://www.strava.com/athletes/'+t._id.athId)"></auth-detail>
  68. </ion-list></div>
  69. <div *ngSwitchCase="'activities'">
  70. <ion-list>
  71. <ion-item *ngFor="let a of acts" (click)="openLink('https://www.strava.com/activities/'+a.id)">
  72. <auth-detail [authId]="a.athId" showStyle='short'></auth-detail>
  73. <p>
  74. {{ a.name }}</p>
  75. <ion-note item-end text-right>
  76. {{ format2(a.distance.slice(0,-2)) }} km <br>
  77. {{ format(a.calories + "") }} cals</ion-note>
  78. </ion-item>
  79. </ion-list>
  80. </div>
  81. </div>
  82. </div>
  83. </ion-content>