extends ../layouts/main
block content

  include ../comment/components/comment

  section.uk-section.uk-section-default
    .uk-container
      div(uk-grid)
        .uk-width-auto
          +renderProfileIcon(userProfile, userProfile.displayName || userProfile.username, 'large')
        .uk-width-expand
          h1(style="line-height: 1em;").uk-margin-remove= userProfile.displayName || userProfile.username || userProfile.email

          if Array.isArray(userProfile.badges) && (userProfile.badges.length > 0)
            div(uk-grid).uk-grid-small
              if userProfile.flags.isAdmin
                .uk-width-auto
                  alert.uk-label.uk-label-danger Admin
              if userProfile.flags.isModerator
                .uk-width-auto
                  alert.uk-label.uk-label-danger Moderator

              each badge in userProfile.badges
                .uk-width-auto
                  alert.uk-label= badge

      h2 Recent Comments
      ul.uk-list
        each comment in commentHistory
          li
            +renderComment(comment, { })