diff options
author | Arinde Eniola <eniolaarinde1@gmail.com> | 2016-05-02 14:34:27 +0300 |
---|---|---|
committer | Arinde Eniola <eniolaarinde1@gmail.com> | 2016-05-02 14:34:35 +0300 |
commit | c67331b2dbf000d632137f50dda296c146b0dd7b (patch) | |
tree | ba7e23a8b7d8b83ce2a73a81d52df3b06149ab1a | |
parent | 15a2c558022908e23f0ff6ac80a135899aa0899a (diff) |
redesign commits page
-rw-r--r-- | app/assets/stylesheets/pages/commit.scss | 8 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/commits.scss | 4 | ||||
-rw-r--r-- | app/views/projects/commits/_commit.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/commits/_commits.html.haml | 14 |
4 files changed, 22 insertions, 9 deletions
diff --git a/app/assets/stylesheets/pages/commit.scss b/app/assets/stylesheets/pages/commit.scss index 358d2f4ab9d..83c120d6068 100644 --- a/app/assets/stylesheets/pages/commit.scss +++ b/app/assets/stylesheets/pages/commit.scss @@ -2,6 +2,14 @@ display: block; } +.commit-header { + background-color: $background-color; + + .light { + margin-left: 10px; + } +} + .commit-author, .commit-committer { display: block; color: #999; diff --git a/app/assets/stylesheets/pages/commits.scss b/app/assets/stylesheets/pages/commits.scss index c8c6bbde084..bf1d1e883c9 100644 --- a/app/assets/stylesheets/pages/commits.scss +++ b/app/assets/stylesheets/pages/commits.scss @@ -1,3 +1,7 @@ +.gray-content-block { + background-color: #fff; +} + .commits-compare-switch { @include btn-default; @include btn-white; diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index c7d8c9a0d15..2efd7b16863 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -9,6 +9,7 @@ = cache(cache_key) do %li.commit.js-toggle-container{ id: "commit-#{commit.short_id}" } + = image_tag avatar_icon(commit.send(:author), 40), class: "avatar s40", alt:'' .commit-row-title %span.item-title = link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message" @@ -27,8 +28,8 @@ = preserve(markdown(escape_once(commit.description), pipeline: :single_line)) .commit-row-info - by - = commit_author_link(commit, avatar: true, size: 24) + = commit_author_link(commit, avatar: false) + authored .committed_ago #{time_ago_with_tooltip(commit.committed_date)} = link_to_browse_code(project, commit) diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml index 64e8da9201d..9421a7fa8e3 100644 --- a/app/views/projects/commits/_commits.html.haml +++ b/app/views/projects/commits/_commits.html.haml @@ -5,14 +5,14 @@ - commits.group_by { |c| c.committed_date.to_date }.sort.reverse.each do |day, commits| .row.commits-row - .col-md-2.hidden-xs.hidden-sm - %h5.commits-row-date - %i.fa.fa-calendar - %span= day.strftime('%d %b, %Y') - .light - = pluralize(commits.count, 'commit') - .col-md-10.col-sm-12 + .col-md-12.col-sm-12 %ul.content-list + %li.commit-header + .light + %span + = day.strftime('%d %b, %Y') + . + = pluralize(commits.count, 'commit') = render commits, project: project %hr.lists-separator |