- empty_repo = @project.empty_repo?
.project-home-panel.clearfix{:class => ("empty-project" if empty_repo)}
  .project-identicon-holder
    = project_icon(@project, alt: '', class: 'project-avatar avatar s90')
  .lead
    - if @project.description.present?
      = markdown(@project.description, pipeline: :description)


  .project-repo-buttons
    .inline.star.js-toggler-container{class: @show_star ? 'on' : ''}
      - if current_user
        = link_to_toggle_star('Star this project.', false)
        = link_to_toggle_star('Unstar this project.', true)
      - else
        = link_to new_user_session_path, class: 'btn star-btn has_tooltip', title: 'You must sign in to star a project' do
          %span
            = icon('star')
            Star
          %span.count
            = @project.star_count
    - unless empty_repo
      - if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
        .inline.fork-buttons.prepend-left-10
          - if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
            = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn' do
              = link_to_toggle_fork
          - else
            = link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn' do
              = link_to_toggle_fork
      - elsif forked_from_project = @project.forked_from_project
        = link_to project_path(forked_from_project), class: 'btn' do
          = icon("code-fork fw")
          Forked from
          = forked_from_project.namespace.try(:name)
      - if can? current_user, :download_code, @project
        .inline.prepend-left-10
          = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: @ref, format: 'zip'), class: 'btn', rel: 'nofollow' do
            %i.fa.fa-download

  = render "shared/clone_panel"