Tweaked a few UI elements :/

This commit is contained in:
Josef Citrine 2016-08-07 15:41:58 +01:00
parent b586c31a77
commit 9b6babed31
7 changed files with 43 additions and 24 deletions

View file

@ -1,7 +1,7 @@
<ul class="tabs fixed"> <md-tabs class="about-tabs" md-selected="selectedTab" md-border-bottom>
<li ui-sref-active="active"><a ui-sref=".about">About Pony.fm</a></li> <md-tab ui-sref=".about" name="about">About Pony.fm</md-tab>
<li ui-sref-active="active"><a ui-sref=".faq">FAQ</a></li> <md-tab ui-sref=".faq" name="faq">FAQ</md-tab>
<li ui-sref-active="active"><a ui-sref=".mlpforums-advertising-program">MLP Forums Advertising Program</a></li> <md-tab ui-sref=".mlpforums-advertising-program" name="advertising">MLP Forums Advertising Program</md-tab>
</ul> </md-tabs>
<ui-view class="static-page fixed-tabs"></ui-view> <ui-view class="static-page fixed-tabs"></ui-view>

View file

@ -1,16 +1,11 @@
<ul class="dropdowns"> <div layout="row">
<li class="dropdown filterable" ng-class="{'has-filter': !query.filters.sort.isDefault}"> <md-input-container flex="100" flex-sm="50" flex-gt-sm="25">
<a class="dropdown-toggle btn btn-default" bs-dropdown> <label>Order by</label>
Order: <strong>{{query.filters.sort.title}}</strong> <md-select ng-model="filter" md-on-close="handleSingularDropdown('sort', filter)">
</a> <md-option ng-repeat="filter in ::filters.sort.values track by $index" value="{{filter}}">{{::filter.title}}</md-option>
<a class="btn btn-default" pfm-eat-click ng-click="clearFilter('sort')"><i class="material-icons">remove</i></a> </md-select>
<ul class="dropdown-menu"> </md-input-container>
<li ng-repeat="filter in ::filters.sort.values track by $index" ng-class="{selected: filter == query.filters.sort}"> </div>
<a pfm-eat-click href="#" ng-click="setFilter('sort', filter)">{{::filter.title}}</a>
</li>
</ul>
</li>
</ul>
<div class="pagination" ng-if="totalPages > 1"> <div class="pagination" ng-if="totalPages > 1">
<ul> <ul>

View file

@ -27,10 +27,23 @@ module.exports = angular.module('ponyfm').controller "playlists", [
$scope.query = playlists.mainQuery $scope.query = playlists.mainQuery
$scope.filters = playlists.filters $scope.filters = playlists.filters
filterDropdown = (newVar, oldVar) ->
if newVar instanceof Array && oldVar instanceof Array
if 'any' in newVar
if !('any' in oldVar)
newVar = ['any']
else if newVar.length > oldVar.length
anyIndex = newVar.indexOf('any')
newVar.splice(anyIndex, 1)
$scope.handleSingularDropdown = (filter, value) ->
$scope.clearFilter filter
$scope.setFilter filter, JSON.parse(value)
$scope.setFilter = (filter, value) -> $scope.setFilter = (filter, value) ->
$scope.query.setFilter filter, value $scope.query.setFilter filter, value
$state.transitionTo 'content.playlists.list', {filter: $scope.query.toFilterString()} $state.transitionTo 'content.playlists.list', {filter: $scope.query.toFilterString()}
$scope.clearFilter = (filter) -> $scope.clearFilter = (filter) ->
$scope.query.clearFilter filter $scope.query.clearFilter filter
$state.transitionTo 'content.playlists.list', {filter: $scope.query.toFilterString()} $state.transitionTo 'content.playlists.list', {filter: $scope.query.toFilterString()}

View file

@ -100,6 +100,7 @@
left: 64px; left: 64px;
width: 100%; width: 100%;
width: ~"calc(100% - 64px)"; width: ~"calc(100% - 64px)";
outline: 0;
.bar { .bar {
z-index: 500; z-index: 500;

View file

@ -643,7 +643,7 @@ html {
.counter { .counter {
position: absolute; position: absolute;
bottom: 8px; bottom: 8px;
right: 90px; right: 5px;
font-size: 8pt; font-size: 8pt;
color: #fff; color: #fff;
background: #b885bd; background: #b885bd;

View file

@ -359,6 +359,10 @@ header {
} }
} }
.about-tabs {
margin-bottom: 20px;
}
.checkboxes md-input-container { .checkboxes md-input-container {
margin-top: 8px; margin-top: 8px;
margin-bottom: 0; margin-bottom: 0;

View file

@ -444,13 +444,19 @@
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.info {
margin-left: 0;
margin-top: 15px;
text-align: center;
}
} }
} }
.info { .cover {
margin-left: 0; display: block !important;
margin-top: 15px; margin-left: auto;
text-align: center; margin-right: auto;
} }
.buttons { .buttons {