From 13fbf4889287f20bd6804e47e20d6535043443b6 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 24 Feb 2014 09:31:36 +0200 Subject: [PATCH] Proper class names for diff files --- app/assets/stylesheets/sections/commits.scss | 6 +++--- app/views/projects/commits/_diffs.html.haml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss index 89054cb..f3b2e52 100644 --- a/app/assets/stylesheets/sections/commits.scss +++ b/app/assets/stylesheets/sections/commits.scss @@ -10,11 +10,11 @@ } } -.file { +.diff-file { border: 1px solid #CCC; margin-bottom: 1em; - .header { + .diff-header { @extend .clearfix; background: #DDD; border-bottom: 1px solid #CCC; @@ -46,7 +46,7 @@ font-family: $monospace_font; } } - .content { + .diff-content { overflow: auto; overflow-y: hidden; background: #FFF; diff --git a/app/views/projects/commits/_diffs.html.haml b/app/views/projects/commits/_diffs.html.haml index ebd5e4e..da585ef 100644 --- a/app/views/projects/commits/_diffs.html.haml +++ b/app/views/projects/commits/_diffs.html.haml @@ -44,8 +44,8 @@ - file = project.repository.blob_at(@commit.id, diff.new_path) - file = project.repository.blob_at(@commit.parent_id, diff.old_path) unless file - next unless file - .file{id: "diff-#{i}"} - .header + .diff-file{id: "diff-#{i}"} + .diff-header - if diff.deleted_file %span= diff.old_path @@ -70,7 +70,7 @@ %span.commit-short-id= @commit.short_id(6) - .content + .diff-content -# Skipp all non non-supported blobs - next unless file.respond_to?('text?') - if file.text? -- libgit2 0.21.2