From df51b029abb92c78c168c9f9e18f5a90c7da32f6 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 10 Sep 2015 13:14:25 +0200 Subject: [PATCH] Improve project fork page Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/pages/projects.scss | 26 ++++++++-------------- app/views/projects/forks/new.html.haml | 21 ++++++++--------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index d3c84595701..53004fca350 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -203,26 +203,18 @@ ul.nav.nav-projects-tabs { } .fork-namespaces { - .thumbnail { + .fork-thumbnail { + text-align: center; + margin-bottom: $gl-padding; - &.fork-exists-thumbnail { - border-color: #EEE; - - .caption { - color: #999; - } + .caption { + padding: $gl-padding 0; + min-height: 30px; } - &.fork-thumbnail { - border-color: #AAA; - - &:hover { - background-color: $hover; - } - } - - a { - text-decoration: none; + img { + @include border-radius(50%); + max-width: 100px; } } } diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml index b7a2ed68e25..cd5f3a5d39e 100644 --- a/app/views/projects/forks/new.html.haml +++ b/app/views/projects/forks/new.html.haml @@ -10,21 +10,22 @@ - group.each do |namespace| .col-md-2.col-sm-3 - if fork = namespace.find_fork_of(@project) - .thumbnail.fork-exists-thumbnail + .fork-thumbnail = link_to project_path(fork), title: "Visit project fork", class: 'has_tooltip' do - = image_tag namespace_icon(namespace, 200) + = image_tag namespace_icon(namespace, 100) .caption - %h4=namespace.human_name - %p - = namespace.path + %strong + = namespace.human_name + %div.text-primary + Already forked + - else - .thumbnail.fork-thumbnail + .fork-thumbnail = link_to namespace_project_fork_path(@project.namespace, @project, namespace_key: namespace.id), title: "Fork here", method: "POST", class: 'has_tooltip' do - = image_tag namespace_icon(namespace, 200) + = image_tag namespace_icon(namespace, 100) .caption - %h4=namespace.human_name - %p - = namespace.path + %strong + = namespace.human_name %p.light Fork is a copy of a project repository.