Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LB-1377: Improve Playlist Page #3100

Merged
merged 17 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 117 additions & 30 deletions frontend/css/playlists.less
Original file line number Diff line number Diff line change
@@ -1,11 +1,48 @@
@playlistBackgroundColor: #fafafa;
@descriptionLines: 3;

#playlists-page .playlist-view-options {
display: flex;
margin-top: 0.8rem;
gap: 1rem;

.playlist-sort-controls {
display: flex;
align-items: center;
gap: 1rem;
}
}

#playlists-container {
display: flex;
flex-wrap: wrap;
padding-top: 1em;

&.list-view {
flex-direction: column;
}

/* Pure CSS multiline ellipsis by Sagi Shrieber:
http://hackingui.com/a-pure-css-solution-for-multiline-text-truncation/
*/
.description {
overflow: hidden;
position: relative;
line-height: 1.2em;
max-height: @descriptionLines * 1.2em;
text-align: justify;
padding-right: 2em;
display: -webkit-box;
line-clamp: @descriptionLines;
anshg1214 marked this conversation as resolved.
Show resolved Hide resolved
margin-top: 0.5rem;
-webkit-line-clamp: @descriptionLines;
-webkit-box-orient: vertical;

p {
margin-bottom: 0;
}
}

.playlist {
margin: 0.5em;
width: 15em;
Expand Down Expand Up @@ -40,34 +77,86 @@
margin: 0;
}
}
}
}

/* Pure CSS multiline ellipsis by Sagi Shrieber:
http://hackingui.com/a-pure-css-solution-for-multiline-text-truncation/
*/
.description {
overflow: hidden;
position: relative;
line-height: 1.2em;
max-height: @descriptionLines * 1.2em;
text-align: justify;
padding-right: 2em;
&:before {
content: "...";
position: absolute;
right: 1em;
bottom: 0;
.playlist-card-list-view {
display: flex;
flex-direction: row;
border: 1px solid #e2e8f0;
padding: 1rem;
margin: 0.5rem 0;
min-height: 8rem;
border-radius: 10px;
gap: 3rem;

@media (max-width: 640px) {
gap: 0;
}

&:hover {
cursor: pointer;
}

.playlist-card-container {
display: flex;
justify-content: space-between;
width: 100%;
gap: 0.8rem;

.playlist-info {
display: flex;
anshg1214 marked this conversation as resolved.
Show resolved Hide resolved
align-items: center;
gap: 2rem;

.playlist-index {
min-width: 2rem;
text-align: right;
font-weight: bold;
}
}
}

.playlist-info-content {
display: flex;
flex-direction: column;
margin-bottom: 1rem;

@media (min-width: 640px) {
margin-bottom: 0;
}

.playlist-title {
font-size: 1.75rem;
a {
font-weight: 500;
color: #353070;
text-decoration: none;
}
&:after {
content: "";
position: absolute;
right: 0;
width: 1em;
height: 1em;
margin-top: 0.2em;
background-color: inherit;
}
}

.playlist-more-info {
align-self: center;
anshg1214 marked this conversation as resolved.
Show resolved Hide resolved
flex-shrink: 0;

.playlist-stats {
display: flex;
flex-direction: column;

.playlist-date {
color: #6b7280;
display: flex;
align-items: center;
gap: 8px;
}
}
}

.playlist-actions {
align-self: center;
margin: 1rem;
}
}
}

Expand All @@ -81,6 +170,11 @@
height: initial !important;
color: white;
text-align: center;

&.list-view {
width: auto;
}

> div {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -137,10 +231,3 @@
align-self: center;
min-width: 3em;
}

.playlist-sort-controls {
display: flex;
align-items: center;
gap: 1rem;
margin-top: 0.8em;
}
Loading
Loading