Commit 5e7f7f8d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Redesign project home page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 62c8bc22
...@@ -15,48 +15,31 @@ ...@@ -15,48 +15,31 @@
} }
.project-home-panel { .project-home-panel {
margin-top: 10px; text-align: center;
margin-bottom: 15px; margin-bottom: 20px;
position: relative;
padding-left: 65px;
min-height: 50px;
.project-identicon-holder { .project-identicon-holder {
position: absolute; margin-bottom: 15px;
left: 0;
top: -14px;
.avatar { .avatar, .identicon {
width: 50px; margin: 0 auto;
height: 50px; float: none;
} }
.identicon { .identicon {
font-size: 26px; @include border-radius(50%);
line-height: 50px;
} }
} }
.project-home-row { .lead {
@extend .clearfix;
margin-bottom: 15px;
&.project-home-row-top {
margin-bottom: 15px;
}
.project-home-desc {
color: $gray;
float: left;
font-size: 16px;
line-height: 1.3;
margin-right: 250px;
// Render Markdown-generated HTML inline for this block
p { p {
display: inline; display: inline;
} }
} }
.git-clone-holder {
max-width: 600px;
margin: 0 auto;
} }
.visibility-level-label { .visibility-level-label {
...@@ -67,22 +50,19 @@ ...@@ -67,22 +50,19 @@
} }
.project-repo-buttons { .project-repo-buttons {
margin-top: -3px; margin-top: 25px;
position: absolute; margin-bottom: 25px;
right: 0;
width: 265px;
text-align: right;
.btn { .btn {
@extend .btn-info;
font-weight: bold; font-weight: bold;
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 16px;
padding: 8px 12px;
.count { .count {
padding-left: 10px; padding-left: 7px;
border-left: 1px solid #ccc;
display: inline-block; display: inline-block;
margin-left: 10px; margin-left: 7px;
} }
} }
} }
...@@ -307,3 +287,15 @@ table.table.protected-branches-list tr.no-border { ...@@ -307,3 +287,15 @@ table.table.protected-branches-list tr.no-border {
float: left; float: left;
margin-right: 10px; margin-right: 10px;
} }
.project-stats {
text-align: center;
ul.nav-pills { display:inline-block; }
li { display:inline; }
a { float:left; }
}
pre.light-well {
border-color: #f1f1f1;
}
- empty_repo = @project.empty_repo? - empty_repo = @project.empty_repo?
.project-home-panel.clearfix{:class => ("empty-project" if empty_repo)} .project-home-panel.clearfix{:class => ("empty-project" if empty_repo)}
.project-identicon-holder .project-identicon-holder
= project_icon(@project, alt: '', class: 'avatar project-avatar') = project_icon(@project, alt: '', class: 'project-avatar avatar s90')
.project-home-row.project-home-row-top .lead
.project-home-desc
- if @project.description.present? - if @project.description.present?
= markdown(@project.description, pipeline: :description) = markdown(@project.description, pipeline: :description)
- if can?(current_user, :admin_project, @project)
&ndash;
= link_to 'Edit', edit_namespace_project_path
- elsif !empty_repo && @repository.readme
- readme = @repository.readme
&ndash;
= link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)) do
= readme.name
.project-repo-buttons .project-repo-buttons
.inline.star.js-toggler-container{class: @show_star ? 'on' : ''} .inline.star.js-toggler-container{class: @show_star ? 'on' : ''}
- if current_user - if current_user
...@@ -35,3 +28,5 @@ ...@@ -35,3 +28,5 @@
- else - else
= link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn btn-sm btn-default' do = link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn btn-sm btn-default' do
= link_to_toggle_fork = link_to_toggle_fork
= render "shared/clone_panel"
...@@ -4,30 +4,28 @@ ...@@ -4,30 +4,28 @@
= render "home_panel" = render "home_panel"
.center.well .center.light-well
%h3 %h3.page-title
The repository for this project is empty The repository for this project is empty
%h4 %p
You can You can
= link_to namespace_project_new_blob_path(@project.namespace, @project, 'master'), class: 'btn btn-new btn-lg' do = link_to namespace_project_new_blob_path(@project.namespace, @project, 'master'), class: 'btn btn-new' do
add a file add a file
&nbsp;or do a push via the command line. &nbsp;or do a push via the command line.
.well %h3.page-title
= render "shared/clone_panel" Command line instructions
%h4
%strong Command line instructions
%div.git-empty %div.git-empty
%fieldset %fieldset
%legend Git global setup %h5 Git global setup
%pre.dark %pre.light-well
:preserve :preserve
git config --global user.name "#{git_user_name}" git config --global user.name "#{git_user_name}"
git config --global user.email "#{git_user_email}" git config --global user.email "#{git_user_email}"
%fieldset %fieldset
%legend Create a new repository %h5 Create a new repository
%pre.dark %pre.light-well
:preserve :preserve
git clone #{ content_tag(:span, default_url_to_repo, class: 'clone')} git clone #{ content_tag(:span, default_url_to_repo, class: 'clone')}
cd #{@project.path} cd #{@project.path}
...@@ -37,8 +35,8 @@ ...@@ -37,8 +35,8 @@
git push -u origin master git push -u origin master
%fieldset %fieldset
%legend Existing folder or Git repository %h5 Existing folder or Git repository
%pre.dark %pre.light-well
:preserve :preserve
cd existing_folder cd existing_folder
git init git init
......
...@@ -7,10 +7,40 @@ ...@@ -7,10 +7,40 @@
= render 'shared/no_password' = render 'shared/no_password'
= render "home_panel" = 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 %hr
%section.col-md-8 %section
= render 'section' - if readme = @repository.readme
%aside.col-md-4.project-side %article.readme-holder#README
= render 'aside' .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
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
:"data-container" => "body"} :"data-container" => "body"}
= gitlab_config.protocol.upcase = gitlab_config.protocol.upcase
= text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control input-sm", readonly: true = text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control input-sm", readonly: true
- if project.kind_of?(Project) && project.empty_repo? - if project.kind_of?(Project)
.input-group-addon .input-group-addon
.visibility-level-label.has_tooltip{'data-title' => "#{visibility_level_label(project.visibility_level)} project" } .visibility-level-label.has_tooltip{'data-title' => "#{visibility_level_label(project.visibility_level)} project" }
= visibility_level_icon(project.visibility_level) = visibility_level_icon(project.visibility_level)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment