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

audio player first pass #48

Closed
wants to merge 1 commit into from
Closed
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
361 changes: 361 additions & 0 deletions lute/static/css/player-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,361 @@
.audio-player-container {
margin: 0 20px 30px 20px;

border: 2px solid #d7e6f4;
border-radius: 5px;
padding: 0.9rem;
background-color: aliceblue;

--audio-color-1: #5abaf4;
}

.audio-player-top-container {
display: grid;
grid-template-columns: min-content 2.2fr min-content;
align-items: center;

gap: 2%;
}

.play-btn-container {
padding: 0.9rem;
background-color: #ddf3fc;
border-radius: 50%;
}

.audio-player-timeline-container {
width: 100%;
/* for marker overlay */
position: relative;
}

.audio-player-timeline-container-grid {
display: grid;
grid-template-columns: 1fr min-content;
align-items: center;
gap: 2%;
background-color: #ddf3fc;
padding-left: 0.8rem;
padding-top: 0.8rem;
padding-bottom: 0.8rem;
padding-right: 0.8rem;
border-radius: 5px;
}

#myfile {
display: none;
}

.audio-label {
cursor: pointer;
}

#play-btn {
/* background-image: url("/static/icn/play.svg"); */
/* background-size: 70%; */
/* content: ""; */
background: url("/static/icn/play.svg");

/* mask-size: cover; */
/* background-color: var(--audio-color-1); */
height: 72px;
width: 72px;
/* height: 100%; */
display: block;
/* transform: scale(60%); */
/* background-color: #565656; */
}

#volume-on-btn {
background: url("/static/icn/volume-up.svg");
height: 32px;
width: 32px;
display: block;
}

#playback-rate-btn {
background: url("/static/icn/speed.svg");
height: 48px;
width: 48px;
display: block;
position: relative;
font-family: inherit;
}

#playback-rate-btn span {
position: absolute;
bottom: 0;

left: 50%;
transform: translate(-50%, 0);
font-family: inherit;
}

#rewind-btn {
background: url("/static/icn/rewind.svg");
height: 28px;
width: 28px;
}

#ff-btn {
background: url("/static/icn/ff.svg");
height: 28px;
width: 28px;
}

#bkm-save-btn {
background: url("/static/icn/bookmark-save.svg");
height: 28px;
width: 28px;
}

#bkm-delete-btn {
background: url("/static/icn/bookmark-delete.svg");
height: 28px;
width: 28px;
}

#bkm-prev-btn {
background: url("/static/icn/bookmark-prev.svg");
height: 28px;
width: 28px;
}

#bkm-next-btn {
background: url("/static/icn/bookmark-next.svg");
height: 28px;
width: 28px;
}

#play-btn,
#volume-on-btn,
#volume-off-btn,
#rewind-btn,
#ff-btn,
#playback-rate-btn,
#bkm-save-btn,
#bkm-delete-btn,
#bkm-prev-btn,
#bkm-next-btn {
background-position: center;
background-repeat: no-repeat;
background-size: cover;
border: none;
padding: 0;
border-radius: 50%;

flex-shrink: 0;
}

.volume::-moz-range-thumb {
background-position: center;
background-repeat: no-repeat;
background-size: cover;
border: none;
padding: 0;
}

.volume::-webkit-slider-thumb {
background-position: center;
background-repeat: no-repeat;
background-size: cover;
border: none;
padding: 0;
}

/* #play-btn { */
/* width: 64px; */
/* height: 64px; */
/* /~ background-color: #3f3f3f; ~/ */
/* border: 4px solid var(--audio-color-1); */
/* background: none; */
/* /~ filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0.75)); ~/ */
/* } */
/* #play-btn svg { */
/* stroke: #9de6d8; */
/* stroke-width: 2.5; */
/* transform: scale(70%); */
/* } */

.timeline {
-webkit-appearance: none;
width: 100%;
height: 1.1rem;
margin: 0;
background-color: #fff;
border-radius: 5px;
background-size: 0% 100%;
background-image: linear-gradient(var(--audio-color-1), var(--audio-color-1));
background-repeat: no-repeat;
}

.volume {
-webkit-appearance: none;
width: 100%;
height: 0.6em;
margin: 0;
background-color: #fff;
border-radius: 5px;
background-size: 100% 100%;
background-image: linear-gradient(var(--audio-color-1), var(--audio-color-1));
background-repeat: no-repeat;
/* margin-bottom: 1.1rem; */
}

.timeline::-webkit-slider-runnable-track,
.volume::-webkit-slider-runnable-track {
-webkit-appearance: none;
box-shadow: none;
border: none;
/* background: transparent; */
}

.timeline::-moz-range-track,
.volume::-moz-range-track {
box-shadow: none;
border: none;
/* background: transparent; */
}

.volume-container {
grid-column: 1/-1;
/* display: flex; */
/* align-items: center; */
/* flex: 0.2; */
}

.rewind-container {
display: grid;
grid-template-columns: 1fr min-content;
/* justify-content: space-between; */
/* align-items: center; */
/* width: max-content; */
/* gap: 1.2rem; */
}

/* .rewind-btn-container { */
/* display: flex; */
/* gap: 0.3rem; */
/* } */

#rewind-option {
border: none;
border-radius: 5px;
width: 90%;
height: 1.6rem;
padding: 0.2rem 0 0.2rem 0.8rem;
font-family: inherit;
}

.audio-player-right-container {
display: grid;
grid-template-columns: 1fr 1fr;
/* padding: 0.7rem 0.7rem 0.7rem 0; */
grid-template-columns: max-content max-content;
align-items: center;
justify-items: center;
row-gap: 0.6rem;
column-gap: 0.8rem;
}

.duration-container {
display: flex;
justify-content: space-between;
}

/* .timeline::-webkit-slider-thumb { */
/* -webkit-appearance: none; */
/* width: 1em; */
/* height: 1em; */
/* border-radius: 50%; */
/* /~ cursor: pointer; ~/ */
/* /~ opacity: 0; ~/ */
/* /~ transition: all 0.1s; ~/ */
/* background-color: #a94672; */
/* } */

/* .timeline::-webkit-slider-thumb:hover { */
/* background-color: #943f65; */
/* } */

/* .timeline:hover::-webkit-slider-thumb { */
/* opacity: 1; */
/* } */

.timeline::-moz-range-thumb {
width: 1px;
height: 1em;
opacity: 0;
}

.timeline::-webkit-slider-thumb {
-webkit-appearance: none;
width: 1px;
height: 1em;
opacity: 0;
}

.volume::-moz-range-thumb {
width: 20px;
height: 20px;
background-image: url("/static/icn/volume-up.svg");
border: 2px solid #89c2f9;
background-size: 80%;
border-radius: 5px;
}

.volume::-webkit-slider-thumb {
-webkit-appearance: none;
width: 20px;
height: 20px;
background-image: url("/static/icn/volume-up.svg");
border: 2px solid #89c2f9;
background-size: 80%;
border-radius: 5px;
}

/* .timeline::-moz-range-thumb:hover { */
/* background-color: #7cbefc; */
/* } */

/* .timeline:hover::-moz-range-thumb { */
/* opacity: 1; */
/* } */

/* .marker { */
/* /~ background-color: red; ~/ */
/* height: 1rem; */
/* position: absolute; */
/* top: 0.1rem; */
/* left: 3%; */
/* /~ background: linear-gradient( ~/ */
/* /~ to right, ~/ */
/* /~ transparent 10%, ~/ */
/* /~ #ff6464 10%, ~/ */
/* /~ #ff6464 12%, ~/ */
/* /~ transparent 12%, ~/ */
/* /~ transparent 64%, ~/ */
/* /~ green 64%, ~/ */
/* /~ green 66%, ~/ */
/* /~ transparent 66% ~/ */
/* /~ ); ~/ */
/* width: 2%; */
/* user-select: none; */
/* pointer-events: none; */
/* } */

/* marker -> 27 */

/* transparent = 26 */
/* marker start = 26 */
/* marker end = 28 */
/* transparent = 28 */

.bookmark-container {
display: grid;
grid-template-columns: 1fr 1fr;
}

.bookmar-jump-container {
justify-self: end;
}
13 changes: 13 additions & 0 deletions lute/static/icn/bookmark-delete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions lute/static/icn/bookmark-next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions lute/static/icn/bookmark-prev.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading