nnwhen edits
This commit is contained in:
parent
5fdb84a3bb
commit
498710da35
14 changed files with 1926 additions and 2042 deletions
733
res/asset-css-scritch.css
Normal file
733
res/asset-css-scritch.css
Normal file
|
@ -0,0 +1,733 @@
|
|||
:root {
|
||||
--backgroundColor: #181a1b;
|
||||
--primaryColor: #ffffff;
|
||||
--primaryAltColor: #e3beb3;
|
||||
--secondaryColor: #181a1b;
|
||||
--highlightColor: #8383834d;
|
||||
--primaryTextColor: #c8beb5;
|
||||
--primaryAltTextColor: #838383;
|
||||
--previewStripeColor1: #3c362e;
|
||||
--previewStripeColor2: #242627;
|
||||
--linkColor: #f18d74;
|
||||
--overlayTextColor: #ffffff;
|
||||
--overlayBackgroundColor: #00000080;
|
||||
--font: sans-serif;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
/* basic layout */
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--primaryTextColor);
|
||||
background-color: var(--backgroundColor);
|
||||
font-family: var(--font);
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--linkColor);
|
||||
}
|
||||
|
||||
#mainContainer {
|
||||
position: relative;
|
||||
display: grid;
|
||||
justify-content: space-evenly;
|
||||
width: 100%;
|
||||
max-width: 960px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#mainContainer.vertical {
|
||||
grid-template-columns: auto;
|
||||
}
|
||||
|
||||
a[href]:not([tabindex="-1"]):focus-visible,
|
||||
area[href]:not([tabindex="-1"]):focus-visible,
|
||||
input:not([disabled]):not([tabindex="-1"]):focus-visible,
|
||||
select:not([disabled]):not([tabindex="-1"]):focus-visible,
|
||||
textarea:not([disabled]):not([tabindex="-1"]):focus-visible,
|
||||
button:not([disabled]):not([tabindex="-1"]):focus-visible,
|
||||
iframe:not([tabindex="-1"]):focus-visible,
|
||||
[tabindex]:not([tabindex="-1"]):focus-visible,
|
||||
[contentEditable="true"]:not([tabindex="-1"]):focus-visible {
|
||||
outline: 2px solid rgb(83, 186, 255);
|
||||
outline-offset: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/*** title ***/
|
||||
|
||||
#titleContainer {
|
||||
height: 0;
|
||||
}
|
||||
#titleContainer.active {
|
||||
height: auto;
|
||||
}
|
||||
#title {
|
||||
margin: 20px 20px 4px 20px;
|
||||
font-size: 26px;
|
||||
display: none;
|
||||
}
|
||||
#titleContainer.active #title {
|
||||
display: block;
|
||||
}
|
||||
#mainContainer.vertical #title {
|
||||
margin: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#mainContainer.title-span #title {
|
||||
margin: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#mainContainer:not(.vertical).title-span #titleContainer {
|
||||
grid-column: 1/3;
|
||||
}
|
||||
|
||||
@media (max-width: 590px) {
|
||||
#mainContainer #title {
|
||||
margin: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#mainContainer.title-span.title-span #titleContainer {
|
||||
grid-column: 1;
|
||||
}
|
||||
#mainContainer {
|
||||
grid-template-columns: auto;
|
||||
}
|
||||
#mainContainer #mediaColumn {
|
||||
grid-row: 2;
|
||||
grid-column: 1;
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*** media column ***/
|
||||
|
||||
#mediaColumn {
|
||||
display: flex;
|
||||
grid-row: 1/3;
|
||||
grid-column: 2;
|
||||
flex-direction: column;
|
||||
position: sticky;
|
||||
top: 10px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
#mainContainer.vertical #mediaColumn {
|
||||
grid-row: 2;
|
||||
grid-column: 1;
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
#mainContainer.title-span #mediaColumn {
|
||||
grid-row: 2/3;
|
||||
}
|
||||
|
||||
.info-overlaid #mediaColumn,
|
||||
.info-overlaid-toggle #mediaColumn {
|
||||
max-width: 480px;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
#mediaContainer {
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
display: flex;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
#mediaContainer > * {
|
||||
width: 100%;
|
||||
/* display: none; */
|
||||
visibility: hidden;
|
||||
margin-right: -100%;
|
||||
}
|
||||
#mediaContainer .active {
|
||||
/* display: block; */
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
#mediaContainer .active {
|
||||
/* display: block; */
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
#mediaInfoContainer {
|
||||
display: none;
|
||||
overflow-y: auto;
|
||||
background-color: var(--highlightColor);
|
||||
border-radius: 8px;
|
||||
}
|
||||
#mediaInfoContainer.active {
|
||||
display: block;
|
||||
padding: 10px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.info-overlaid #mediaInfoContainer,
|
||||
.info-overlaid-toggle #mediaInfoContainer {
|
||||
padding: 30px;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
backdrop-filter: blur(3px);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: var(--overlayTextColor);
|
||||
background-color: var(--overlayBackgroundColor);
|
||||
border-radius: 0;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s;
|
||||
}
|
||||
.info-overlaid #mediaInfoContainer.active,
|
||||
.info-overlaid-toggle #mediaInfoContainer.active {
|
||||
opacity: 1;
|
||||
}
|
||||
.info-overlaid #mediaInfo,
|
||||
.info-overlaid-toggle #mediaInfo {
|
||||
margin: auto;
|
||||
position: relative;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.info-below #mediaInfoContainer {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s;
|
||||
}
|
||||
.info-below #mediaInfoContainer.active {
|
||||
opacity: 1;
|
||||
}
|
||||
.info-none #mediaInfoContainer {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*** content column ***/
|
||||
|
||||
#contentColumn {
|
||||
min-width: 270px;
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
#contentContainer {
|
||||
padding: 0 10px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* player controls */
|
||||
|
||||
#audio {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
user-select: none;
|
||||
}
|
||||
#player {
|
||||
width: 100%;
|
||||
display: none;
|
||||
}
|
||||
#audio.native {
|
||||
height: 70px;
|
||||
}
|
||||
#audio.native #player {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#audio.native #player.video {
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#bigButton {
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
background-color: var(--primaryColor);
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 0 0;
|
||||
flex-basis: 54px;
|
||||
margin-left: 0;
|
||||
cursor: pointer;
|
||||
margin-top: 26px;
|
||||
margin-right: 22px;
|
||||
}
|
||||
|
||||
#bigButton:not(.loading):after {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 14px inset transparent;
|
||||
border-bottom: 14px inset transparent;
|
||||
border-left: 23px solid var(--secondaryColor);
|
||||
border-right: 0;
|
||||
margin-left: 5px;
|
||||
}
|
||||
#bigButton:not(.loading).pause:after {
|
||||
content: "";
|
||||
border: 0;
|
||||
border-left: 8px solid var(--secondaryColor);
|
||||
border-right: 8px solid var(--secondaryColor);
|
||||
height: 24px;
|
||||
margin: 4px auto;
|
||||
width: 2px;
|
||||
padding: 3px;
|
||||
left: 0;
|
||||
}
|
||||
#bigButton.loading:after {
|
||||
content: "\25cc";
|
||||
color: var(--secondaryColor);
|
||||
speak: never;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
font-size: 40px;
|
||||
animation: pulse 1s infinite;
|
||||
}
|
||||
#bigButton.looped:before {
|
||||
content: attr(loopcount);
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
right: -6px;
|
||||
color: var(--secondaryColor);
|
||||
background-color: var(--primaryColor);
|
||||
border: 2px solid var(--backgroundColor);
|
||||
border-radius: 20px;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#controls {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex: 1 0;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#controls .title {
|
||||
flex: 1 0;
|
||||
font-weight: 600;
|
||||
align-self: end;
|
||||
font-size: 28px;
|
||||
line-height: 28px;
|
||||
width: 100px;
|
||||
word-break: break-word;
|
||||
overflow: hidden;
|
||||
/* height: 60px; */
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
user-select: none;
|
||||
flex-basis: 8px;
|
||||
}
|
||||
|
||||
#controls .riser {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
#controls .time {
|
||||
font-size: 12px;
|
||||
align-self: end;
|
||||
color: var(--primaryAltTextColor);
|
||||
user-select: none;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#controls #scrubberTrackContainer {
|
||||
flex-basis: 100%;
|
||||
height: 16px;
|
||||
position: relative;
|
||||
padding: 4px 0;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
touch-action: none;
|
||||
}
|
||||
#controls #scrubberTrackFull {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
background: repeating-linear-gradient(
|
||||
135deg,
|
||||
var(--previewStripeColor1),
|
||||
var(--previewStripeColor1) 8px,
|
||||
var(--previewStripeColor2) 8px,
|
||||
var(--previewStripeColor2) 16px
|
||||
);
|
||||
border-radius: 12px;
|
||||
}
|
||||
#controls #scrubberTrackContainer #scrubberTrackPreview {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
#controls #scrubberTrackContainer.preview #scrubberTrackPreview {
|
||||
border: 2px solid var(--backgroundColor);
|
||||
box-sizing: content-box;
|
||||
top: -2px;
|
||||
left: -2px;
|
||||
margin-right: -4px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
#controls #scrubberTrack {
|
||||
background-color: var(--primaryAltColor);
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12px;
|
||||
position: relative;
|
||||
}
|
||||
#scrubberFill {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
background-color: var(--primaryColor);
|
||||
content: "";
|
||||
}
|
||||
#controls #scrubber {
|
||||
box-sizing: content-box;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: var(--primaryColor);
|
||||
border: 2px solid var(--backgroundColor);
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto -2px;
|
||||
}
|
||||
|
||||
#controls #nextTrack,
|
||||
#controls #prevTrack,
|
||||
#controls #loopSwitch {
|
||||
border: none;
|
||||
margin-right: 20px;
|
||||
flex: 0 0;
|
||||
background: none;
|
||||
color: var(--primaryColor);
|
||||
padding: 0;
|
||||
align-self: start;
|
||||
cursor: pointer;
|
||||
}
|
||||
#controls #loopSwitch {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#controls .spacer {
|
||||
flex: 1 1;
|
||||
}
|
||||
|
||||
#controls #volumeContainer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#controls #volumeContainer #volumeTrackContainer {
|
||||
flex: 1 0;
|
||||
cursor: pointer;
|
||||
width: 0px;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
align-self: start;
|
||||
transition: width 0.2s;
|
||||
touch-action: none;
|
||||
}
|
||||
#controls #volumeContainer.hover #volumeTrackContainer {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
#controls #volumeContainer #volumeTrackContainer #volumeTrack {
|
||||
background-color: var(--primaryAltColor);
|
||||
width: 80px;
|
||||
height: 6px;
|
||||
border-radius: 10px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#controls #volumeContainer #volumeTrackContainer #volumeFill {
|
||||
background-color: var(--primaryColor);
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10px;
|
||||
border: 2px solid var(--backgroundColor);
|
||||
box-sizing: content-box;
|
||||
margin: -2px;
|
||||
}
|
||||
|
||||
#controls #volumeContainer #volumeIcon {
|
||||
flex: 0 0;
|
||||
align-self: start;
|
||||
cursor: pointer;
|
||||
margin-left: 6px;
|
||||
cursor: pointer;
|
||||
color: var(--primaryColor);
|
||||
}
|
||||
|
||||
#audio.native #controls,
|
||||
#audio.native #bigButton {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* track list */
|
||||
|
||||
#tracks {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.track {
|
||||
display: flex;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
flex-wrap: wrap;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.track.locked {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.track.active:before {
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0.3;
|
||||
background-color: var(--highlightColor);
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
.track.active .main {
|
||||
background-color: var(--highlightColor);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.track .main {
|
||||
display: flex;
|
||||
flex: 1 0 100%;
|
||||
padding: 6px;
|
||||
border-radius: 6px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.track .playButton {
|
||||
margin-right: 12px;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
background-color: var(--primaryColor);
|
||||
color: var(--secondaryColor);
|
||||
border-radius: 3px;
|
||||
flex: 0 0 26px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.track .playButton:not(.loading, .error, .locked):after {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 0px;
|
||||
height: 0;
|
||||
border-top: 6px inset transparent;
|
||||
border-bottom: 6px inset transparent;
|
||||
border-left: 10px solid var(--secondaryColor);
|
||||
border-right: 0;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
left: 1px;
|
||||
}
|
||||
.track .playButton:not(.loading, .error, .locked).pause:after {
|
||||
content: "";
|
||||
border: 0;
|
||||
border-left: 4px solid var(--secondaryColor);
|
||||
border-right: 4px solid var(--secondaryColor);
|
||||
height: 12px;
|
||||
margin: 4px auto;
|
||||
width: 2px;
|
||||
padding: 1px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.track .playButton.loading.loading:after {
|
||||
content: "\1f506";
|
||||
color: var(--secondaryColor);
|
||||
speak: never;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
font-size: 20px;
|
||||
animation: pulse 1s infinite;
|
||||
}
|
||||
.track .playButton.error {
|
||||
opacity: 0.5;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.track .playButton.locked {
|
||||
cursor: default;
|
||||
}
|
||||
.track .playButton.locked:after {
|
||||
content: "\1f512";
|
||||
color: var(--secondaryColor);
|
||||
speak: never;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.track.looped .playButton:before {
|
||||
content: attr(loopcount);
|
||||
display: block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
right: -6px;
|
||||
color: var(--secondaryColor);
|
||||
background-color: var(--primaryColor);
|
||||
border: 2px solid var(--backgroundColor);
|
||||
border-radius: 20px;
|
||||
font-weight: 600;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.track.active.looped .playButton:before {
|
||||
border-color: var(--secondaryColor);
|
||||
}
|
||||
|
||||
.track .title {
|
||||
word-break: break-word;
|
||||
}
|
||||
.track .details {
|
||||
display: flex;
|
||||
margin-top: 2px;
|
||||
align-items: center;
|
||||
flex-basis: 100%;
|
||||
}
|
||||
.track .number {
|
||||
margin-right: 4px;
|
||||
color: var(--primaryAltTextColor);
|
||||
}
|
||||
.track .duration {
|
||||
margin-left: 14px;
|
||||
color: var(--primaryAltTextColor);
|
||||
font-size: 14px;
|
||||
flex: 0 0 30px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.track .spacer {
|
||||
flex: 1 1;
|
||||
}
|
||||
.track .toggleInfo {
|
||||
margin-left: 8px;
|
||||
margin-right: 4px;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
color: var(--primaryAltTextColor);
|
||||
}
|
||||
.track.active .toggleInfo {
|
||||
color: var(--primaryColor);
|
||||
}
|
||||
.hide-info .track .toggleInfo {
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
.track .infoContainer {
|
||||
width: 100%;
|
||||
transition: height 0.5s;
|
||||
}
|
||||
.track .infoContainer:not(.active) {
|
||||
height: 0px !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
.hide-info .track .infoContainer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.track .info {
|
||||
padding: 10px;
|
||||
padding-left: 45px;
|
||||
}
|
||||
|
||||
/* description */
|
||||
|
||||
#description {
|
||||
display: none;
|
||||
padding: 8px;
|
||||
margin-top: 24px;
|
||||
word-break: break-word;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
#description.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*** layered style ***/
|
||||
|
||||
#mainContainer.overlaid {
|
||||
width: fit-content;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#mainContainer.overlaid #contentColumn {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
backdrop-filter: blur(5px);
|
||||
width: 100%;
|
||||
max-width: unset !important;
|
||||
padding: 0 14px;
|
||||
}
|
||||
|
||||
#mainContainer.overlaid #tracks {
|
||||
overflow-y: auto;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue