Skip to content

Commit

Permalink
library - group albums by genre, subdirectory, samplerate
Browse files Browse the repository at this point in the history
  • Loading branch information
zeropointnine committed Aug 20, 2021
1 parent bcd6490 commit 22ab89b
Show file tree
Hide file tree
Showing 21 changed files with 597 additions and 168 deletions.
2 changes: 1 addition & 1 deletion scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ $app-standard-duration: 400ms;
color: $color-text;

// does nothing for chrome, safari
scrollbar-color: $color-listitem-selected $color-bg;
scrollbar-color: $color-listitem-selected-over $color-listitem-less;

// Mobile Chrome: Prevent light blue pressed state on tappable things
-webkit-tap-highlight-color: transparent;
Expand Down
10 changes: 10 additions & 0 deletions scss/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@
}
}

.expandIcon {
&:before {
background-image: url('./../img/icons/expand_more_white_24dp.svg');
}
}
.isExpanded .expandIcon:before {
background-image: url('./../img/icons/expand_less_white_24dp.svg');
}


// ---

.textButton {
Expand Down
173 changes: 125 additions & 48 deletions scss/library-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,48 +31,6 @@
color:$color-text-least;
}

#libraryOptionsView {
margin-left:auto;
display:flex;
}
#libraryBitrateButton {
&:before {
background-image: url('./../img/icons/filter_alt_white_24dp.svg');
}
&.badge {
&:after {
content: ' ';
display: block;
position: absolute;
left: 22px;
top: 4px;
width: 5px;
height: 5px;
background-color: $color-text;
border-radius: 5px;
border:2px solid $color-bg;
}
}
}
#librarySortButton {
margin-left: 4px;
&:before {
background-image: url('./../img/icons/sort_white_24dp.svg');
}
}
#libraryBitrateDropdown {
width:175px;
margin-right:4px;
}
#librarySortDropdown {
width:175px;
margin-right:4px;
}

.isDisabled #libraryOptionsView {
pointer-events: none;
}

#librarySpinner {
position:absolute;
left:50%;
Expand All @@ -83,7 +41,7 @@

// Wrapper of the main library content
#libraryContent {
margin-top:$space-unit;
margin-top:($space-unit * 1.5);
margin-left:auto;
margin-right:auto;
// width set programmatically so columns remain centered
Expand All @@ -94,28 +52,74 @@

// Precedes libraryGroup
.libraryGroupLabel {

position:relative;
&:before {
@include iconBefore();
background-position: 6px center;
background-image: url('./../img/icons/expand_less_white_24dp.svg');
}
&.isCollapsed{
&:before {
background-image: url('./../img/icons/expand_more_white_24dp.svg');
}
}

display:flex;
align-items: center;
margin-left: 6px;
margin-right: 6px;
padding-left:4px;
padding-left:28px;
padding-right:12px;
height:$icon-button-side;
border-top: 1px solid $color-listitem;
// border-left: 1px solid $color-listitem;
margin-bottom: 8px;
display:flex;

cursor:pointer;

.inner {
margin-left:6px;
line-height:36px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}

.folderIcon {
&:before {
background-image: url('./../img/icons/folder_white_24dp.svg');
}
}
.waveIcon {
&:before {
background-image: url('./../img/icons/sound-wave-1.svg');
}
}
.genreIcon {
&:before {
background-image: url('./../img/icons/category_white_24dp.svg');
}
}

.count {
margin-left: 10px;
padding-top:4px;
font-size: $font-size-smaller;
color: $color-text-least;
}
}


// Wraps library items.
// The list may have one or more groups.
.libraryGroup {
display:flex;
flex-wrap: wrap;
margin-bottom:8px;
&.isCollapsed{
display:none;
}
}

.libraryItem {
Expand Down Expand Up @@ -195,8 +199,81 @@
opacity:1;
}

.folderIcon {
// ---
// options-related

#libraryOptionsView {
margin-left:auto;
display:flex;
}

#libraryOptionsButtons {
position:relative;
height:$icon-button-side;
&:before {
content: ' ';
position:absolute;
width:100%;
height:100%;
background-color: $color-listitem;
opacity: 0;
}
&.isSelected {
&:before {
transition:opacity ($app-standard-duration / 2) $app-standard-ease;
opacity:1;
}
}
}

#libraryGroupButton {
&:before {
background-image: url('./../img/icons/category_white_24dp.svg');
}
}

#librarySortButton {
&:before {
background-image: url('./../img/icons/folder_white_24dp.svg');
background-image: url('./../img/icons/sort_white_24dp.svg');
}
}
}
#libraryBitrateButton {
&:before {
background-image: url('./../img/icons/filter_alt_white_24dp.svg');
}
&.badge {
&:after {
content: ' ';
display: block;
position: absolute;
left: 22px;
top: 4px;
width: 5px;
height: 5px;
background-color: $color-text;
border-radius: 5px;
border:2px solid $color-bg;
}
}
}
#libraryGroupDropdown,
#librarySortDropdown,
#libraryBitrateDropdown {
width:175px;
margin-right: 8px;

opacity:0;
transform: translate(38px);
transition:
transform ($app-standard-duration / 2) $app-standard-ease,
opacity ($app-standard-duration / 2) linear;
&.animIn {
opacity:1;
transform: translate(0);
}
}

.isDisabled #libraryOptionsView {
pointer-events: none;
}

1 change: 1 addition & 0 deletions scss/widgets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
height:36px;
position:relative;
width:150px; // must have hardcoded width; override this
z-index:9999;
display:none;

.dropdownTitle {
Expand Down
Loading

0 comments on commit 22ab89b

Please sign in to comment.