plz / templates / discussions.html
59 lines · 55 sloc · 2.12 KB · d230c5a6e59810a96cb2862c844cc11574f7eb07
Raw
1<!DOCTYPE html>
2<html>
3 <head>
4 @include 'layout/head.html'
5 </head>
6 <body>
7 @include 'layout/header.html'
8
9 <div class="content">
10 @include 'layout/repo_menu.html'
11
12 <div class="issues-header">
13 <h1 class="issues-header__title">%discussions</h1>
14 @if ctx.logged_in
15 <a class="issues-header__new" href="/@repo.user_name/@repo.name/discussions/new">%discussion_new</a>
16 @end
17 </div>
18
19 @if rows.len == 0
20 <div class="issues-empty">%discussion_none</div>
21 @else
22 <ul class="issue-list">
23 @for r in rows
24 <li class="issue-row">
25 <svg class="issue-row__icon" viewBox="0 0 16 16" aria-hidden="true">
26 <path fill="#0969da" d="M1.5 2.75A.75.75 0 0 1 2.25 2h11.5a.75.75 0 0 1 .75.75v8.5a.75.75 0 0 1-.75.75H5.06l-2.573 2.573A.75.75 0 0 1 1.5 13.94Z"/>
27 </svg>
28 <div class="issue-row__body">
29 <div class="issue-row__heading">
30 <a class="issue-row__title" href="/@repo.user_name/@repo.name/discussions/@r.item.id">@{r.item.formatted_title()}</a>
31 <span class="issue-label">@{r.item.category_label()}</span>
32 @if r.item.is_answered
33 <span class="issue-label issue-label--answered">%discussion_answered</span>
34 @end
35 @if r.item.is_locked
36 <span class="issue-label">%discussion_locked</span>
37 @end
38 </div>
39 <div class="issue-row__meta">
40 <span>#@r.item.id</span>
41 <span>%discussion_opened @{r.item.relative_time()} %pr_by</span>
42 <a class="issue-row__author" href="/@r.user.username">@r.user.username</a>
43 </div>
44 </div>
45 @if r.item.comments_count > 0
46 <a class="issue-row__comments" href="/@repo.user_name/@repo.name/discussions/@r.item.id" title="%pr_comments_title">
47 <svg viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M1 2.75A1.75 1.75 0 0 1 2.75 1h10.5A1.75 1.75 0 0 1 15 2.75v8.5A1.75 1.75 0 0 1 13.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H2.75A1.75 1.75 0 0 1 1 11.25Z"/></svg>
48 @r.item.comments_count
49 </a>
50 @end
51 </li>
52 @end
53 </ul>
54 @end
55 </div>
56
57 @include 'layout/footer.html'
58 </body>
59</html>
60