From 5e7f7f8d31cce732533e36b7be756b824b748f74 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 7 Jul 2015 15:22:56 +0200 Subject: Redesign project home page Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/show.html.haml | 42 +++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) (limited to 'app/views/projects/show.html.haml') diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 2259dea0865..d7b1704f036 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -7,10 +7,40 @@ = render 'shared/no_password' = render "home_panel" -= render 'shared/show_aside' +.project-stats + %ul.nav.nav-pills + %li + = link_to namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref) do + = pluralize(number_with_delimiter(@repository.commit_count), 'commit') + %li + = link_to namespace_project_branches_path(@project.namespace, @project) do + = pluralize(number_with_delimiter(@repository.branch_names.count), 'branch') + %li + = link_to namespace_project_tags_path(@project.namespace, @project) do + = pluralize(number_with_delimiter(@repository.tag_names.count), 'tag') + - if @repository.changelog + %li + = link_to changelog_url(@project) do + Changelog + - if @repository.license + %li + = link_to license_url(@project) do + License + - if @repository.contribution_guide + %li + = link_to contribution_guide_url(@project) do + Contribution guide -.row - %section.col-md-8 - = render 'section' - %aside.col-md-4.project-side - = render 'aside' +%hr +%section + - if readme = @repository.readme + %article.readme-holder#README + .clearfix + %small.pull-right + = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)), class: 'light' do + %i.fa.fa-file + = readme.name + .wiki + = render_readme(readme) + - else + %h4 Add README to this repository -- cgit v1.2.1