cyp/app/app.css

655 lines
11 KiB
CSS
Raw Normal View History

2019-03-27 00:07:52 +08:00
*,
*::before,
*::after {
box-sizing: inherit;
}
2019-03-26 19:35:47 +08:00
html {
2019-03-29 23:28:26 +08:00
background-color: var(--fg);
2019-03-26 19:35:47 +08:00
}
2019-03-20 05:56:39 +08:00
body {
2019-04-03 01:19:46 +08:00
display: flex;
flex-direction: column;
2019-03-27 00:07:52 +08:00
box-sizing: border-box;
2019-03-26 22:40:23 +08:00
font-family: lato, sans-serif;
2019-04-01 04:02:26 +08:00
line-height: 1.25;
2019-03-29 23:28:26 +08:00
background-color: var(--bg);
color: var(--fg);
2019-04-01 17:18:28 +08:00
text-shadow: var(--shadow);
2019-03-26 17:09:26 +08:00
max-width: 800px;
margin: 0 auto;
overflow: hidden;
2019-03-20 05:56:39 +08:00
height: 100vh;
}
2019-03-25 22:49:23 +08:00
body > header,
body > footer {
2019-03-22 23:17:10 +08:00
box-shadow: 0 0 3px #000;
}
2019-03-26 22:40:23 +08:00
input,
select,
button {
color: inherit;
2019-04-01 04:02:26 +08:00
font: inherit;
2019-03-26 22:40:23 +08:00
}
button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
2019-04-03 01:19:46 +08:00
display: flex;
flex-direction: row;
align-items: center;
display: inline-flex;
2019-03-26 22:40:23 +08:00
background-color: transparent;
padding: 0;
border: none;
line-height: 1;
cursor: pointer;
2019-03-29 05:52:57 +08:00
flex-shrink: 0;
2019-03-26 22:40:23 +08:00
}
2019-03-26 19:35:47 +08:00
@font-face {
font-family: 'Lato';
src: url('font/LatoLatin-Regular.woff2') format('woff2');
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: 'Lato';
src: url('font/LatoLatin-bold.woff2') format('woff2');
font-style: bold;
font-weight: normal;
}
2019-03-28 22:23:28 +08:00
.icon {
width: 24px;
}
.icon path:not([fill]),
.icon polygon:not([fill]),
.icon circle:not([fill]) {
fill: currentColor;
}
2019-04-03 01:19:46 +08:00
.flex-row {
display: flex;
flex-direction: row;
align-items: center;
}
.flex-column {
display: flex;
flex-direction: column;
}
.long-line {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.multiline {
display: flex;
flex-direction: row;
align-items: center;
}
.multiline h2 {
font-weight: normal;
}
2019-03-21 17:32:58 +08:00
main {
flex-grow: 1;
2019-03-25 22:49:23 +08:00
overflow: hidden;
2019-03-21 17:32:58 +08:00
}
nav ul {
2019-03-20 05:56:39 +08:00
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-direction: row;
2019-04-03 01:19:46 +08:00
align-items: center;
2019-03-20 05:56:39 +08:00
}
2019-03-29 05:52:57 +08:00
nav ul .icon {
2019-03-29 23:28:26 +08:00
display: block;
margin: 4px auto;
2019-03-29 05:52:57 +08:00
}
2019-03-21 17:32:58 +08:00
nav ul li {
2019-03-20 05:56:39 +08:00
text-align: center;
2019-03-26 19:35:47 +08:00
flex: 1 0 0;
2019-03-29 03:28:55 +08:00
cursor: pointer;
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
2019-03-20 05:56:39 +08:00
}
2019-03-22 22:35:04 +08:00
nav ul li.active {
2019-03-29 23:28:26 +08:00
border-top-color: var(--primary);
2019-03-22 22:35:04 +08:00
}
2019-03-22 23:17:10 +08:00
#player {
display: flex;
flex-direction: row;
2019-03-29 05:52:57 +08:00
align-items: center;
2019-03-22 23:17:10 +08:00
}
2019-03-21 17:32:58 +08:00
#player:not([data-state=play]) .pause {
display: none;
}
#player[data-state=play] .play {
display: none;
2019-03-20 05:56:39 +08:00
}
2019-03-22 22:35:04 +08:00
#player:not([data-flags~=random]) .random,
#player:not([data-flags~=repeat]) .repeat {
2019-03-21 17:32:58 +08:00
opacity: 0.5;
2019-03-20 05:56:39 +08:00
}
2019-04-01 04:02:26 +08:00
#player .art {
margin-right: var(--icon-spacing);
}
#player h2 {
font-size: 125%;
margin-top: 0;
}
2019-03-29 05:52:57 +08:00
#player .info {
flex-grow: 1;
2019-04-01 04:02:26 +08:00
overflow: hidden;
}
#player .title,
#player .subtitle {
2019-03-29 05:52:57 +08:00
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#player .controls {
white-space: nowrap;
text-align: center;
}
#player .controls .icon {
2019-04-01 04:02:26 +08:00
width: 32px;
margin: 8px;
2019-03-27 00:07:52 +08:00
}
#player .misc {
display: flex;
flex-direction: column;
2019-04-01 04:02:26 +08:00
align-self: stretch;
justify-content: space-around;
2019-03-27 00:07:52 +08:00
}
#player .misc .icon {
2019-04-01 04:02:26 +08:00
width: 32px;
2019-03-26 22:40:23 +08:00
}
2019-03-25 22:49:23 +08:00
.component {
height: 100%;
display: flex;
flex-direction: column;
}
2019-04-01 17:18:28 +08:00
.component header {
display: flex;
2019-04-03 01:19:46 +08:00
flex-direction: row;
align-items: center;
padding: 8px;
}
.component header button {
font-size: var(--font-size-large);
font-weight: bold;
}
.component header button .icon {
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
}
2019-03-26 19:35:47 +08:00
.component ul {
flex-grow: 1;
overflow: auto;
list-style: none;
margin: 0;
padding: 0;
}
2019-03-30 19:57:01 +08:00
.component li {
2019-03-26 19:35:47 +08:00
display: flex;
flex-direction: row;
2019-03-26 22:40:23 +08:00
align-items: center;
2019-03-26 19:35:47 +08:00
}
2019-04-01 04:02:26 +08:00
.component li .info {
2019-03-26 19:35:47 +08:00
flex-grow: 1;
2019-04-01 04:02:26 +08:00
overflow: hidden;
}
.component li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
filter: drop-shadow(var(--shadow));
2019-04-01 04:02:26 +08:00
}
.component li .info h2 {
font-size: var(--font-size-large);
2019-03-26 19:35:47 +08:00
margin: 0;
2019-04-01 04:02:26 +08:00
}
.component li .info h2,
.component li .info div {
white-space: nowrap;
2019-03-26 19:35:47 +08:00
overflow: hidden;
text-overflow: ellipsis;
}
2019-04-01 04:02:26 +08:00
.component li:not(.has-art) {
padding: 8px;
2019-03-29 05:52:57 +08:00
}
2019-04-03 01:19:46 +08:00
.component li button .icon {
width: 32px;
}
2019-03-30 19:57:01 +08:00
.component li:nth-child(odd) {
2019-03-29 05:52:57 +08:00
background-color: #555;
2019-03-28 22:23:28 +08:00
}
2019-03-25 22:49:23 +08:00
#queue {
height: 100%;
display: flex;
flex-direction: column;
}
2019-04-01 17:18:28 +08:00
#queue header {
display: flex;
2019-04-03 01:19:46 +08:00
flex-direction: row;
align-items: center;
padding: 8px;
}
#queue header button {
font-size: var(--font-size-large);
font-weight: bold;
}
#queue header button .icon {
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
}
2019-03-22 23:17:10 +08:00
#queue ul {
2019-03-25 22:49:23 +08:00
flex-grow: 1;
overflow: auto;
2019-03-22 23:17:10 +08:00
list-style: none;
margin: 0;
padding: 0;
}
2019-03-30 19:57:01 +08:00
#queue li {
2019-03-26 19:35:47 +08:00
display: flex;
flex-direction: row;
2019-03-26 22:40:23 +08:00
align-items: center;
2019-03-26 19:35:47 +08:00
}
2019-04-01 04:02:26 +08:00
#queue li .info {
2019-03-26 19:35:47 +08:00
flex-grow: 1;
2019-04-01 04:02:26 +08:00
overflow: hidden;
}
#queue li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
filter: drop-shadow(var(--shadow));
2019-04-01 04:02:26 +08:00
}
#queue li .info h2 {
font-size: var(--font-size-large);
2019-03-26 19:35:47 +08:00
margin: 0;
2019-04-01 04:02:26 +08:00
}
#queue li .info h2,
#queue li .info div {
white-space: nowrap;
2019-03-26 19:35:47 +08:00
overflow: hidden;
text-overflow: ellipsis;
}
2019-04-01 04:02:26 +08:00
#queue li:not(.has-art) {
padding: 8px;
2019-03-29 05:52:57 +08:00
}
2019-04-03 01:19:46 +08:00
#queue li button .icon {
width: 32px;
}
2019-03-30 19:57:01 +08:00
#queue li:nth-child(odd) {
2019-03-29 05:52:57 +08:00
background-color: #555;
2019-03-28 22:23:28 +08:00
}
2019-04-01 04:02:26 +08:00
#queue .current {
color: var(--primary);
2019-03-22 22:35:04 +08:00
}
2019-03-25 22:49:23 +08:00
#library {
height: 100%;
display: flex;
flex-direction: column;
}
2019-04-01 17:18:28 +08:00
#library header {
display: flex;
2019-04-03 01:19:46 +08:00
flex-direction: row;
align-items: center;
padding: 8px;
}
#library header button {
font-size: var(--font-size-large);
font-weight: bold;
}
#library header button .icon {
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
}
2019-03-25 22:49:23 +08:00
#library ul {
flex-grow: 1;
overflow: auto;
list-style: none;
margin: 0;
padding: 0;
}
2019-03-30 19:57:01 +08:00
#library li {
2019-03-26 19:35:47 +08:00
display: flex;
flex-direction: row;
2019-03-26 22:40:23 +08:00
align-items: center;
2019-03-26 19:35:47 +08:00
}
2019-04-01 04:02:26 +08:00
#library li .info {
2019-03-26 19:35:47 +08:00
flex-grow: 1;
2019-04-01 04:02:26 +08:00
overflow: hidden;
}
#library li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
filter: drop-shadow(var(--shadow));
2019-04-01 04:02:26 +08:00
}
#library li .info h2 {
font-size: var(--font-size-large);
2019-03-26 19:35:47 +08:00
margin: 0;
2019-04-01 04:02:26 +08:00
}
#library li .info h2,
#library li .info div {
white-space: nowrap;
2019-03-26 19:35:47 +08:00
overflow: hidden;
text-overflow: ellipsis;
}
2019-04-01 04:02:26 +08:00
#library li:not(.has-art) {
padding: 8px;
2019-03-29 05:52:57 +08:00
}
2019-04-03 01:19:46 +08:00
#library li button .icon {
width: 32px;
}
2019-03-30 19:57:01 +08:00
#library li:nth-child(odd) {
2019-03-29 05:52:57 +08:00
background-color: #555;
2019-03-28 22:23:28 +08:00
}
2019-04-03 01:19:46 +08:00
#library header {
white-space: pre;
}
#library .search {
order: 1;
}
#library .search.open ~ * {
display: none;
2019-03-28 22:23:28 +08:00
}
2019-04-01 04:02:26 +08:00
#library .art img,
#library .art .icon {
2019-03-31 06:15:32 +08:00
width: 64px;
2019-04-01 17:18:28 +08:00
}
#library .art .icon {
filter: drop-shadow(var(--shadow));
2019-04-01 04:02:26 +08:00
}
#library .group {
cursor: pointer;
}
#library .group h2 {
font-weight: normal;
2019-03-31 05:05:33 +08:00
}
2019-03-30 06:36:06 +08:00
#library .tiles {
display: grid;
2019-03-30 19:57:01 +08:00
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
grid-gap: 2px;
2019-03-30 06:36:06 +08:00
}
#library .tiles li {
2019-03-30 19:57:01 +08:00
text-align: center;
cursor: pointer;
background-color: rgba(255, 255, 255, 0.08);
2019-03-30 06:36:06 +08:00
height: 200px;
}
2019-03-30 19:57:01 +08:00
#library .tiles li h2 {
font-size: 150%;
margin: 4px 0;
}
2019-03-26 19:35:47 +08:00
#fs {
height: 100%;
display: flex;
flex-direction: column;
}
2019-04-01 17:18:28 +08:00
#fs header {
display: flex;
2019-04-03 01:19:46 +08:00
flex-direction: row;
align-items: center;
padding: 8px;
}
#fs header button {
font-size: var(--font-size-large);
font-weight: bold;
}
#fs header button .icon {
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
}
2019-03-26 19:35:47 +08:00
#fs ul {
flex-grow: 1;
overflow: auto;
list-style: none;
margin: 0;
padding: 0;
}
2019-03-30 19:57:01 +08:00
#fs li {
2019-03-26 19:35:47 +08:00
display: flex;
flex-direction: row;
2019-03-26 22:40:23 +08:00
align-items: center;
2019-03-26 19:35:47 +08:00
}
2019-04-01 04:02:26 +08:00
#fs li .info {
2019-03-26 19:35:47 +08:00
flex-grow: 1;
2019-04-01 04:02:26 +08:00
overflow: hidden;
}
#fs li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
filter: drop-shadow(var(--shadow));
2019-04-01 04:02:26 +08:00
}
#fs li .info h2 {
font-size: var(--font-size-large);
2019-03-26 19:35:47 +08:00
margin: 0;
2019-04-01 04:02:26 +08:00
}
#fs li .info h2,
#fs li .info div {
white-space: nowrap;
2019-03-26 19:35:47 +08:00
overflow: hidden;
text-overflow: ellipsis;
}
2019-04-01 04:02:26 +08:00
#fs li:not(.has-art) {
padding: 8px;
2019-03-29 05:52:57 +08:00
}
2019-04-03 01:19:46 +08:00
#fs li button .icon {
width: 32px;
}
2019-03-30 19:57:01 +08:00
#fs li:nth-child(odd) {
2019-03-29 05:52:57 +08:00
background-color: #555;
2019-03-28 22:23:28 +08:00
}
2019-04-03 01:19:46 +08:00
#fs header {
white-space: pre;
}
#fs .search {
order: 1;
}
#fs .search.open ~ * {
display: none;
2019-03-28 22:23:28 +08:00
}
2019-03-29 23:28:26 +08:00
#fs .group {
cursor: pointer;
}
2019-04-01 04:02:26 +08:00
#fs .info {
display: flex;
flex-direction: row;
align-items: center;
}
#fs .info h2 {
font-weight: normal;
}
2019-03-28 22:23:28 +08:00
#playlists {
height: 100%;
display: flex;
flex-direction: column;
}
2019-04-01 17:18:28 +08:00
#playlists header {
display: flex;
2019-04-03 01:19:46 +08:00
flex-direction: row;
align-items: center;
padding: 8px;
}
#playlists header button {
font-size: var(--font-size-large);
font-weight: bold;
}
#playlists header button .icon {
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
}
2019-03-28 22:23:28 +08:00
#playlists ul {
flex-grow: 1;
overflow: auto;
list-style: none;
margin: 0;
padding: 0;
}
2019-03-30 19:57:01 +08:00
#playlists li {
2019-03-28 22:23:28 +08:00
display: flex;
flex-direction: row;
align-items: center;
}
2019-04-01 04:02:26 +08:00
#playlists li .info {
2019-03-28 22:23:28 +08:00
flex-grow: 1;
2019-04-01 04:02:26 +08:00
overflow: hidden;
}
#playlists li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
filter: drop-shadow(var(--shadow));
2019-04-01 04:02:26 +08:00
}
#playlists li .info h2 {
font-size: var(--font-size-large);
2019-03-28 22:23:28 +08:00
margin: 0;
2019-04-01 04:02:26 +08:00
}
#playlists li .info h2,
#playlists li .info div {
white-space: nowrap;
2019-03-28 22:23:28 +08:00
overflow: hidden;
text-overflow: ellipsis;
}
2019-04-01 04:02:26 +08:00
#playlists li:not(.has-art) {
padding: 8px;
2019-03-29 05:52:57 +08:00
}
2019-04-03 01:19:46 +08:00
#playlists li button .icon {
width: 32px;
}
2019-03-30 19:57:01 +08:00
#playlists li:nth-child(odd) {
2019-03-29 05:52:57 +08:00
background-color: #555;
2019-03-26 19:35:47 +08:00
}
2019-04-01 04:02:26 +08:00
#playlists .info {
display: flex;
flex-direction: row;
align-items: center;
}
#playlists .info h2 {
font-weight: normal;
2019-03-28 22:23:28 +08:00
}
2019-03-31 05:05:33 +08:00
#yt {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
2019-04-01 17:18:28 +08:00
#yt header {
display: flex;
2019-04-03 01:19:46 +08:00
flex-direction: row;
align-items: center;
padding: 8px;
}
#yt header button {
font-size: var(--font-size-large);
font-weight: bold;
}
#yt header button .icon {
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
}
2019-03-31 05:05:33 +08:00
#yt ul {
flex-grow: 1;
overflow: auto;
list-style: none;
margin: 0;
padding: 0;
}
#yt li {
display: flex;
flex-direction: row;
align-items: center;
}
2019-04-01 04:02:26 +08:00
#yt li .info {
2019-03-31 05:05:33 +08:00
flex-grow: 1;
2019-04-01 04:02:26 +08:00
overflow: hidden;
}
#yt li .info .icon {
color: var(--primary);
margin-right: var(--icon-spacing);
2019-04-01 17:18:28 +08:00
filter: drop-shadow(var(--shadow));
2019-04-01 04:02:26 +08:00
}
#yt li .info h2 {
font-size: var(--font-size-large);
2019-03-31 05:05:33 +08:00
margin: 0;
2019-04-01 04:02:26 +08:00
}
#yt li .info h2,
#yt li .info div {
white-space: nowrap;
2019-03-31 05:05:33 +08:00
overflow: hidden;
text-overflow: ellipsis;
}
2019-04-01 04:02:26 +08:00
#yt li:not(.has-art) {
padding: 8px;
2019-03-31 05:05:33 +08:00
}
2019-04-03 01:19:46 +08:00
#yt li button .icon {
width: 32px;
}
2019-03-31 05:05:33 +08:00
#yt li:nth-child(odd) {
background-color: #555;
}
#yt .go {
width: 96px;
height: 96px;
}
#yt .go:disabled {
position: relative;
}
#yt .go:disabled::before {
content: "";
display: block;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
border-top: 3px solid var(--primary);
border-radius: 50%;
animation: rotate linear 3s infinite;
}
#yt p {
margin: 16px 8px;
white-space: pre-wrap;
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
2019-04-01 17:18:28 +08:00
.search {
display: flex;
2019-04-03 01:19:46 +08:00
flex-direction: row;
2019-04-01 17:18:28 +08:00
align-items: center;
margin-left: auto;
2019-04-03 01:19:46 +08:00
transition: all 300ms;
width: 32px;
max-width: 20ch;
2019-04-01 17:18:28 +08:00
}
2019-04-01 04:02:26 +08:00
.search .icon {
width: 32px;
2019-04-01 17:18:28 +08:00
cursor: pointer;
2019-04-01 04:02:26 +08:00
}
.search input {
border: none;
2019-04-03 01:19:46 +08:00
outline: none;
2019-04-01 04:02:26 +08:00
color: inherit;
background-color: inherit;
border-bottom: 1px solid var(--fg);
2019-04-01 17:18:28 +08:00
width: 0;
2019-04-01 04:02:26 +08:00
padding: 0;
2019-04-03 01:19:46 +08:00
flex-grow: 1;
2019-04-01 04:02:26 +08:00
}
2019-04-03 01:19:46 +08:00
.search.open {
flex: 1;
2019-04-01 17:18:28 +08:00
}
.art {
margin-right: var(--icon-spacing);
}
.art .icon,
.art img {
vertical-align: top;
2019-04-01 04:02:26 +08:00
}
2019-03-29 23:28:26 +08:00
:root {
--primary: dodgerblue;
--fg: #fff;
--bg: #333;
2019-04-01 17:18:28 +08:00
--shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
2019-04-01 04:02:26 +08:00
--font-size-large: 112.5%;
--icon-spacing: 4px;
2019-03-29 23:28:26 +08:00
}