PageRenderTime 28ms CodeModel.GetById 17ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/frontend/src/app/news/news-list/news-list.component.html

https://bitbucket.org/kanishevv/ofnvrsk
HTML | 38 lines | 38 code | 0 blank | 0 comment | 0 complexity | 265ac587e02fba86849d5fb9e93a436f MD5 | raw file
 1<div class="news-items row" *ngIf="newslist.length !== 0">
 2  <div 
 3    *ngFor="let newsitem of newslist; let first = first;" 
 4      [ngClass]="{
 5        'col-xs-12 col-sm-12 col-md-12 col-lg-12 news-item_top': newsitem.important == 30,
 6        'col-xs-12 col-md-6 col-sm-12 news-item_middle': newsitem.important == 20,
 7        'col-xs-12 col-md-4 col-sm-12 news-item_low': newsitem.important == 10
 8      }"
 9      newsitem="newsitem"
10    >
11    <div class="news-item"
12      [ngClass]="{
13        'news-item_text': newsitem.cover == null,
14        'news-item_img news-item_trivial': newsitem.cover !== null && newsitem.non_trivial == 1
15      }"
16      routerLink="/news/item/{{newsitem.id}}"
17    >
18      <div class="news-item__image" *ngIf="newsitem.cover !== null" [ngStyle]="{ background:' url('+newsitem.cover+')'}"></div>
19      <div class="news-item__content">
20        <div [routerLink]="['/news/' + newsitem.category.slug]" class="news-detail__category">{{newsitem.category.name}}</div>
21        <h1>{{newsitem.name}}</h1>
22        <div *ngIf="newsitem.short_text !== null && newsitem.cover == null" [innerHTML]="newsitem.short_text.substring(0, 275)"></div>
23        <time class="time">
24            <svg class="time-icon"  viewBox="6366 382 16 16">
25                <path id="Path_13" data-name="Path 13" class="cls-1" d="M2.4,2.4A7.263,7.263,0,0,1,8,0a7.263,7.263,0,0,1,5.6,2.4A7.263,7.263,0,0,1,16,8a7.263,7.263,0,0,1-2.4,5.6A7.263,7.263,0,0,1,8,16a7.263,7.263,0,0,1-5.6-2.4A7.984,7.984,0,0,1,0,8,7.263,7.263,0,0,1,2.4,2.4Zm9.2,9.2.933-.933L9.2,7.333,8,2H6.667V8a1.21,1.21,0,0,0,.4.933.466.466,0,0,0,.267.133Z" transform="translate(6366 382)"/>
26            </svg>
27            <span id="dateTime">Опубликовано: {{ (newsitem.publish_at | amFromUnix | amTimeAgo)}} | {{ (newsitem.publish_at | amFromUnix) | amDateFormat: 'DD.MM.YYYY HH:mm'}}</span>
28        </time>
29      </div>
30    </div>
31  </div>
32</div>
33<div class="news-items__empty row" *ngIf="newslist.length == 0">
34    <div class="col-xs white">
35      <h1>Пока ничего нет</h1>
36      <p>На данной странице пока ничего нет.</p>
37    </div>
38</div>