Skip to content

Commit

Permalink
Run time now always shows, not just on hover
Browse files Browse the repository at this point in the history
Also, rearranged some CSS
  • Loading branch information
Ben Carlsson committed Apr 9, 2014
1 parent 206caa0 commit 01cc15e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/split-inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ $(function() {
$('.split').hover(
function() {
$('#inspect-' + this.id.split('-')[1]).fadeTo(0, 1);
$('#time').fadeTo(0, 1);
$('#time').addClass('bar');
},
function() {
$('#inspect-' + this.id.split('-')[1]).fadeTo(0, 0);
$('#time').fadeTo(0, 0);
$('#time').removeClass('bar');
}
);
});
37 changes: 20 additions & 17 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,13 @@ footer a:hover {
width: 100%;
}

.split, .inspect{
.split, .inspect {
display: block;
color: #fff;
text-decoration: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
Expand All @@ -173,15 +179,6 @@ footer a:hover {
background: rgb(243, 123, 29);
}

.split, .inspect {
display: block;
color: #fff;
text-decoration: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

.split .title, .inspect .title {
padding: 0.5em 0 0 0.5em;
}
Expand All @@ -202,22 +199,28 @@ footer a:hover {
display: block;
}

#time, .inspect, .inspect .bar {
.inspect {
color: #aaa;
}

#time, .inspect .bar {
#time {
border-right: 1px solid;
color: #aaa;
text-align: center;
margin-bottom: .3em;
}

.bar {
border-color: #aaa;
border-left: 1px solid;
border-right: 1px solid;
position: relative;
z-index: 1;
color: #aaa;
overflow: hidden;
position: relative;
text-align: center;
margin-bottom: .3em;
}

#time:before, #time:after, .inspect .bar:before, .inspect .bar:after {
.bar:before, .bar:after {
position: absolute;
top: 51%;
overflow: hidden;
Expand All @@ -227,7 +230,7 @@ footer a:hover {
background-color: #aaa;
}

#time:before, .inspect .bar:before {
.bar:before {
margin-left: -50%;
text-align: right;
}
2 changes: 1 addition & 1 deletion app/views/runs/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- colors = [:blue, :purple, :green, :red, :orange, :yellow]
- c = 0
- percentage = 0
#time{style: 'opacity: 0;'}
#time
 
= render partial: 'shared/time', locals: {run: @run, time: @run.time}
 
Expand Down

0 comments on commit 01cc15e

Please sign in to comment.