Repositories

grarr

(mirrored on github)

Wim Looman <wim@nemo157.com>
5c998a Unify path and filename css
Wim Looman committed at 2016-03-04 11:29:47

Modified src/render/diff.rs

@@ -20,22 +20,22 @@ renderers! {
div.block-header {
@match (delta.status.0, delta.new_file.as_ref(), delta.old_file.as_ref()) {
(git2::Delta::Added, Some(ref new_file), _) => {
h3 { span { "Added " span.filename ^new_file.to_string_lossy() } }
h3 { span { "Added " span.path ^new_file.to_string_lossy() } }
},
(git2::Delta::Deleted, _, Some(ref old_file)) => {
h3 { span { "Deleted " span.filename ^old_file.to_string_lossy() } }
h3 { span { "Deleted " span.path ^old_file.to_string_lossy() } }
},
(git2::Delta::Modified, Some(ref new_file), Some(ref old_file)) if old_file == new_file => {
h3 { span { "Modified " span.filename ^new_file.to_string_lossy() } }
h3 { span { "Modified " span.path ^new_file.to_string_lossy() } }
},
(git2::Delta::Modified, Some(ref new_file), Some(ref old_file)) if old_file != new_file => {
h3 { span { "Modified " span.filename ^new_file.to_string_lossy() "(Previously " span.filename ^old_file.to_string_lossy() ")" } }
h3 { span { "Modified " span.path ^new_file.to_string_lossy() "(Previously " span.path ^old_file.to_string_lossy() ")" } }
},
(git2::Delta::Renamed, Some(ref new_file), Some(ref old_file)) => {
h3 { span { "Renamed " span.filename ^old_file.to_string_lossy() " to " span.filename ^new_file.to_string_lossy() } }
h3 { span { "Renamed " span.path ^old_file.to_string_lossy() " to " span.path ^new_file.to_string_lossy() } }
},
(git2::Delta::Copied, Some(ref new_file), Some(ref old_file)) => {
h3 { span { "Copied " span.filename ^old_file.to_string_lossy() " to " span.filename ^new_file.to_string_lossy() } }
h3 { span { "Copied " span.path ^old_file.to_string_lossy() " to " span.path ^new_file.to_string_lossy() } }
},
(status, ref new_file, ref old_file) => ^(format!("{:?} ({:?} -> {:?}) (should not happen)", status, old_file, new_file))
}

Modified src/render/tree.rs

@@ -36,9 +36,9 @@ renderers! {
Tree(root: &'a str, path: &'a Path, tree: &'a git2::Tree<'a>, commit: &'a ReferencedCommit<'a>) {
div.block {
div.block-header {
h2.path span {
^FAM::FixedWidth(FA::Sitemap) " "
^Components(root, path.components())
h2 {
^FAM::FixedWidth(FA::File) " "
span.path ^Components(root, path.components())
" at "
^super::Reference(commit)
}
@@ -59,9 +59,9 @@ renderers! {
Blob(root: &'a str, path: &'a Path, blob: &'a git2::Blob<'a>, commit: &'a ReferencedCommit<'a>) {
div.block {
div.block-header {
h2.path span {
h2 {
^FAM::FixedWidth(FA::File) " "
^Components(root, path.components())
span.path ^Components(root, path.components())
" at "
^super::Reference(commit)
}

Modified src/static/css/layout.css

@@ -74,7 +74,7 @@ a {
padding: 0.1rem 0.3rem;
}
.filename {
.path {
font-family: monospace;
}
@@ -159,10 +159,6 @@ blockquote {
padding: 0 0.8rem;
}
.path {
font-family: monospace;
}
.commits {
flex-grow: 1;
}

Modified src/static/css/theme-solarized-dark.css

@@ -16,7 +16,8 @@ a:hover { color: #3797db }
.expander + label:hover { color: #268bd2; }
.email, .user { color: #d33682; }
.agent, .filename { color: #6c71c4; }
.agent, .path { color: #6c71c4; }
.path a { color: #497ecb }
.ref { color: #2aa198; }
.id { color: #cb4b16; }
.timestamp { color: #b58900; }

Modified src/static/css/theme-solarized-light.css

@@ -16,7 +16,8 @@ a:hover { color: #3797db }
.expander + label:hover { color: #268bd2; }
.email, .user { color: #d33682; }
.agent, .filename { color: #6c71c4; }
.agent, .path { color: #6c71c4; }
.path a { color: #497ecb }
.ref { color: #2aa198; }
.id { color: #cb4b16; }
.timestamp { color: #b58900; }