| 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="profile-block-container"> |
| 11 | <div class="profile-block__left"> |
| 12 | <div class="profile-avatar" onclick="selectAvatar()"> |
| 13 | <img src="@{app.prepare_user_avatar_url(user.avatar)}"> |
| 14 | </div> |
| 15 | |
| 16 | @if user.full_name.len > 0 |
| 17 | <h4>@user.full_name</h4> |
| 18 | @end |
| 19 | <h3>@user.username</h3> |
| 20 | |
| 21 | @if is_page_owner |
| 22 | <a href="/@user.username/settings"> |
| 23 | <button class="edit-profile-button">%user_edit_profile</button> |
| 24 | </a> |
| 25 | @end |
| 26 | </div> |
| 27 | |
| 28 | <div class="profile-block__right"> |
| 29 | <div class="profile-repos-header"> |
| 30 | <h2>%user_pinned_repos</h2> |
| 31 | <a class="profile-repos-all" href="/@user.username/repos">%user_view_all_repos</a> |
| 32 | </div> |
| 33 | |
| 34 | @if repos.len > 0 |
| 35 | <div class="profile-repo-grid"> |
| 36 | @for repo in repos |
| 37 | <div class="profile-repo-card"> |
| 38 | <div class="profile-repo-card__header"> |
| 39 | <a class="profile-repo-card__title" href="/@user.username/@repo.name">@repo.name</a> |
| 40 | @if is_page_owner |
| 41 | @if repo.is_public |
| 42 | <span class="profile-repo-card__badge">%user_repo_public</span> |
| 43 | @else |
| 44 | <span class="profile-repo-card__badge profile-repo-card__badge--private">%user_repo_private</span> |
| 45 | @end |
| 46 | @end |
| 47 | </div> |
| 48 | @if repo.description.len > 0 |
| 49 | <p class="profile-repo-card__desc">@repo.description</p> |
| 50 | @end |
| 51 | <div class="profile-repo-card__footer"> |
| 52 | @if repo.lang_stats.len > 0 |
| 53 | <span class="profile-repo-card__lang"> |
| 54 | <span class="profile-repo-card__lang-dot" style="background-color:@{repo.lang_stats[0].color}"></span> |
| 55 | @repo.lang_stats[0].name |
| 56 | </span> |
| 57 | @end |
| 58 | @if repo.nr_stars > 0 |
| 59 | <span class="profile-repo-card__meta">★ @repo.nr_stars</span> |
| 60 | @end |
| 61 | </div> |
| 62 | </div> |
| 63 | @end |
| 64 | </div> |
| 65 | @else |
| 66 | <p class="profile-repos-empty">%user_no_repos</p> |
| 67 | @end |
| 68 | </div> |
| 69 | </div> |
| 70 | |
| 71 | <div class="profile-activity-heatmap"> |
| 72 | <div class="profile-activity-heatmap__header"> |
| 73 | <h2>@activity_total %user_contributions_in_year</h2> |
| 74 | <span class="profile-activity-heatmap__range">@activity_start_label — @activity_end_label</span> |
| 75 | </div> |
| 76 | <div class="profile-activity-heatmap__grid" role="img" aria-label="Contribution activity"> |
| 77 | @for _ in 0 .. activity_leading |
| 78 | <div class="profile-activity-heatmap__cell profile-activity-heatmap__cell--empty"></div> |
| 79 | @end |
| 80 | @for count in activity_buckets |
| 81 | <div class="profile-activity-heatmap__cell" data-level="@{activity_level(count, activity_max)}" title="@count %user_commits_label"></div> |
| 82 | @end |
| 83 | </div> |
| 84 | <div class="profile-activity-heatmap__legend"> |
| 85 | <span>%user_heatmap_less</span> |
| 86 | <div class="profile-activity-heatmap__cell" data-level="0"></div> |
| 87 | <div class="profile-activity-heatmap__cell" data-level="1"></div> |
| 88 | <div class="profile-activity-heatmap__cell" data-level="2"></div> |
| 89 | <div class="profile-activity-heatmap__cell" data-level="3"></div> |
| 90 | <div class="profile-activity-heatmap__cell" data-level="4"></div> |
| 91 | <span>%user_heatmap_more</span> |
| 92 | </div> |
| 93 | </div> |
| 94 | |
| 95 | <div class="profile-activities"> |
| 96 | <h2>%user_contribution_activity</h2> |
| 97 | |
| 98 | @for activity in activities |
| 99 | @if activity.name == 'joined' |
| 100 | <div class="activity"> |
| 101 | <h4>%user_activity_joined</h4> |
| 102 | <div class="activity-joined"> |
| 103 | <p>%user_activity_joined</p> |
| 104 | <p>%user_activity_on @user.created_at.ddmmy()</p> |
| 105 | </div> |
| 106 | </div> |
| 107 | @end |
| 108 | |
| 109 | @if activity.name == 'first_repo' |
| 110 | <div class="activity"> |
| 111 | <h4>%user_activity_first_repo</h4> |
| 112 | <div class="activity-first_repo"> |
| 113 | <p>%user_activity_first_repo</p> |
| 114 | <p>%user_activity_on @activity.created_at.ddmmy()</p> |
| 115 | </div> |
| 116 | </div> |
| 117 | @end |
| 118 | |
| 119 | @if activity.name == 'first_issue' |
| 120 | <div class="activity"> |
| 121 | <h4>%user_activity_first_issue</h4> |
| 122 | <div class="activity-first_issue"> |
| 123 | <p>%user_activity_first_issue</p> |
| 124 | <p>%user_activity_on @activity.created_at.ddmmy()</p> |
| 125 | </div> |
| 126 | </div> |
| 127 | @end |
| 128 | @end |
| 129 | </div> |
| 130 | </div> |
| 131 | |
| 132 | @js '/js/user.js' |
| 133 | @include 'layout/footer.html' |
| 134 | </body> |
| 135 | </html> |
| 136 | |