Skip to content

Commit

Permalink
shrink controls width when controls are hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesjwarren committed Jul 27, 2015
1 parent a54224a commit 3adae01
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/less/default/modules/controls.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
width: 129px;
}

.no-controls.controls {
min-width: 70px;
}

fm-slider {
display: inline-block;
height: max(@thumb-height, @track-height);
Expand Down
10 changes: 10 additions & 0 deletions app/less/default/modules/footer.less
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,14 @@
right: 0;
width: @controls-width;
}

.no-controls {
&.track {
right: 70px;
}

&.controls {
width: 70px;
}
}
}
4 changes: 2 additions & 2 deletions app/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

<div ng-controller="PlayerCtrl">

<fm-track class="track" ng-show="track.track.uri" data-spotify-track="track.track" data-user="track.user" data-timer="trackPositionTimer"></fm-track>
<fm-track class="track" ng-show="track.track.uri" data-spotify-track="track.track" data-user="track.user" data-timer="trackPositionTimer" ng-class="{ 'no-controls': !isAuthenticated() }"></fm-track>

<div class="controls" ng-show="track.track.uri">
<div class="controls" ng-show="track.track.uri" ng-class="{ 'no-controls': !isAuthenticated() }">

<div class="playing-animation"
ng-switch="paused">
Expand Down

0 comments on commit 3adae01

Please sign in to comment.