| 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 | <div class="repos-header"> |
| 11 | <div class="avatar"> |
| 12 | <img src="@{app.prepare_user_avatar_url(user.avatar)}"> |
| 13 | </div> |
| 14 | <h1>@{user.username}'s repositories</h1> |
| 15 | </div> |
| 16 | |
| 17 | @if repos.len > 0 |
| 18 | <div class="repo-list"> |
| 19 | @for repo in repos |
| 20 | <div class="repo-card"> |
| 21 | <div class="repo-card__header"> |
| 22 | <div class="repo-card__heading"> |
| 23 | <a class="repo-card__title" href="/@user.username/@repo.name">@repo.name</a> |
| 24 | @if repo.is_public |
| 25 | <span class="repo-card__badge">Public</span> |
| 26 | @else |
| 27 | <span class="repo-card__badge repo-card__badge--private">Private</span> |
| 28 | @end |
| 29 | </div> |
| 30 | @if repo.latest_commit_at > 0 || repo.created_at > 0 |
| 31 | <div class="repo-card__dates"> |
| 32 | @if repo.created_at > 0 |
| 33 | <span>Created @{repo.created_str()}</span> |
| 34 | @end |
| 35 | <span>Last activity @{repo.last_activity_str()}</span> |
| 36 | </div> |
| 37 | @end |
| 38 | </div> |
| 39 | @if repo.description.len > 0 |
| 40 | <p class="repo-card__desc">@repo.description</p> |
| 41 | @end |
| 42 | <div class="repo-card__footer"> |
| 43 | <div class="repo-card__footer-left"> |
| 44 | @if repo.lang_stats.len > 0 |
| 45 | <span class="repo-card__lang"> |
| 46 | <span class="repo-card__lang-dot" style="background-color:@{repo.lang_stats[0].color}"></span> |
| 47 | @repo.lang_stats[0].name |
| 48 | </span> |
| 49 | @end |
| 50 | </div> |
| 51 | @if repo.activity_buckets.len > 0 |
| 52 | <svg class="repo-card__activity" viewBox="0 0 120 28" preserveAspectRatio="none"> |
| 53 | <polyline fill="none" stroke="#39d353" stroke-width="1.5" points="@{repo.activity_svg_points()}"/> |
| 54 | </svg> |
| 55 | @end |
| 56 | </div> |
| 57 | </div> |
| 58 | @end |
| 59 | </div> |
| 60 | @else |
| 61 | <p class="repos-empty">No repositories yet.</p> |
| 62 | @end |
| 63 | </div> |
| 64 | |
| 65 | @include '../layout/footer.html' |
| 66 | </body> |
| 67 | </html> |
| 68 | |