asm-products/verba

View on GitHub
app/views/layouts/_side_bar.html.haml

Summary

Maintainability
Test Coverage
.col-sm-3.user-profile
  .verba-brand-side
    = image_tag("https://d1015h9unskp4y.cloudfront.net/attachments/bae8bafd-4081-4b2b-b6f4-c9d4c367ded8/verba.png", class: "verba-logo-small")

  .username
    = @profile.user.username
    - if @profile.user == current_user
      %a{href: edit_user_path(@profile.user), class: "user-settings-button"}
        %i.fa.fa-cog
        .user-settings-button__explanation
          Settings
  .stats-container
    .stat
      .number
        = @profile.latest_post.word_count
      words on latest post
    .stat
      .number
        = @profile.posts_count
      posts written
    .stat
      .number
        = @profile.streak
      day streak

    .sidebar-links
      = link_to "Stats and achievements", stats_path(@profile.user), class: "link__small"
      = link_to "Writers", users_path, class: "link__small"


    .log-out
      = link_to "Log out", logout_path, method: :post, class: "button-light"