123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628 |
- #container {
- --base-color: white;
- --highlight-color: red;
- position: relative;
- color: var(--base-color);
- font-family: sans;
- }
- /* components {{{ */
- /* background switcher {{{ */
- #background {
- background-color: black;
- }
- #background div {
- position: absolute;
- height: 100%;
- width: 100%;
- opacity: 0;
- transition: opacity 0.5s linear;
- }
- #background div.show {
- opacity: 1;
- }
- /* }}} */
- /* progress bar {{{ */
- .progress-bar {
- position: relative;
- height: 5px;
- }
- .progress-bar .bg {
- position: absolute;
- width: 100%;
- height: 5px;
- background-color: var(--base-color);
- opacity: 0.5;
- }
- .progress-bar .shade {
- position: absolute;
- height: 5px;
- background-color: var(--base-color);
- animation-timing-function: linear;
- animation-play-state: paused;
- }
- @keyframes progress {
- from {
- width: 0%;
- }
- to {
- width: 100%;
- }
- }
- /* }}} */
- /* }}} */
- /* main layout {{{ */
- /* base {{{ */
- #container {
- display: grid;
- grid-template-columns: [start] auto [right] 300px [end];
- grid-template-rows: [top] 50px [header] auto [game] 180px [bottom];
- height: 450px;
- width: 800px;
- margin: 0 auto;
- overflow: hidden;
- }
- #container > div {
- overflow: hidden;
- position: relative;
- transition: top 0.5s, left 0.5s, opacity 0.5s;
- opacity: 0;
- }
- #container #background {
- opacity: 1;
- grid-column: start / end;
- grid-row: top / bottom;
- }
- #loading {
- grid-column: start / end;
- grid-row: top / bottom;
- align-self: center;
- justify-self: center;
- }
- #song-info {
- grid-column: start / right;
- grid-row: header / game;
- left: -500px;
- }
- #song-list {
- grid-column: right / end;
- grid-row: top / bottom;
- left: 300px;
- }
- #folder-info {
- grid-column: start / right;
- grid-row: top / header;
- left: -500px;
- }
- #game {
- top: 180px;
- grid-column: start / end;
- grid-row: game / bottom;
- }
- #score {
- grid-column: start / right;
- grid-row: header / bottom;
- left: -500px;
- }
- #loader {
- top: -50px;
- grid-column: right / end;
- grid-row: top / header;
- }
- #ready {
- grid-column: start / end;
- grid-row: top / bottom;
- align-self: center;
- justify-self: center;
- }
- /* }}} */
- /* loading {{{ */
- #container.loading #loading {
- opacity: 1;
- }
- #container.loading #loading.finished {
- opacity: 0;
- }
- #container.loading #song-info,
- #container.loading #folder-info {
- top: 50px;
- left: 0;
- }
- #container.loading #song-list {
- left: 50px;
- }
- /* }}} */
- /* select {{{ */
- #container.select #song-info,
- #container.select #folder-info {
- opacity: 1;
- top: 0;
- left: 0;
- }
- #container.select #song-list {
- opacity: 1;
- left: 0;
- }
- /* }}} */
- /* game {{{ */
- #container.game #folder-info {
- opacity: 1;
- top: 0;
- left: 0;
- }
- #container.game #song-info {
- opacity: 1;
- top: -150px;
- left: 0;
- }
- #container.game.game-loading #loader {
- opacity: 1;
- top: 0;
- }
- #container #ready {
- overflow: hidden;
- max-height: 0;
- transition: max-height 0s ease 0.5s, top 0.5s, left 0.5s, opacity 0.5s;
- }
- #container.game.game-loading #ready {
- opacity: 1;
- max-height: 100%;
- transition: max-height 0s, top 0.5s, left 0.5s, opacity 0.5s;
- }
- #container.game.game-playing #game {
- opacity: 1;
- top: 0;
- }
- #container.game.game-finished #score {
- opacity: 1;
- left: 0;
- }
- /* }}} */
- /* }}} */
- /* sub layouts {{{ */
- /* select-screen {{{ */
- /* folder-info {{{ */
- #folder-info {
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- #folder-info .left:hover,
- #folder-info .right:hover {
- text-shadow: 0px 0px 5px var(--base-color);
- }
- /* }}} */
- /* song-info {{{ */
- #song-info {
- display: grid;
- }
- .song-info {
- align-self: end;
- margin-left: 20px;
- text-shadow: 0px 0px 5px var(--base-color);
- }
- .song-info .genre {
- font-size: 12px;
- }
- .song-info .creator {
- font-size: 20px;
- line-height: 0.5;
- }
- .song-info .title {
- font-size: 30px;
- }
- /* }}} */
- /* song-list {{{ */
- .song-list {
- margin-left: 20px;
- transition: margin-top 0.2s;
- }
- .song-item {
- height: 40px;
- display: grid;
- grid-template-columns: 40px auto;
- grid-template-rows: 16px 24px;
- grid-template-areas:
- "diff creator"
- "diff title";
- transition: margin-left 0.2s;
- }
- .song-item div {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- line-height: 1;
- }
- .song-item .difficulty {
- grid-area: diff;
- align-self: end;
- justify-self: end;
- margin-bottom: 1px;
- margin-right: 5px;
- font-style: italic;
- font-weight: bold;
- }
- .song-item .difficulty-bg {
- grid-area: diff;
- align-self: center;
- justify-self: center;
- height: 30px;
- width: 30px;
- background: radial-gradient(circle at 10% 10%, rgba(0, 255, 255, 1), transparent);
- border-radius: 20%;
- opacity: 0;
- transition: opacity 0.2s ease-in-out;
- }
- .song-item .difficulty-bg.normal {
- background: radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.6), transparent);
- opacity: 1;
- }
- .song-item:hover {
- text-shadow: 0px 0px 5px var(--base-color);
- }
- .song-item.selected {
- margin-left: -10px;
- text-shadow: 0px 0px 5px var(--base-color);
- }
- .song-item.selected .difficulty-bg {
- opacity: 1;
- box-shadow: -1px -1px 10px -2px var(--base-color);
- }
- .song-item.selected .difficulty-bg.normal {
- opacity: 0;
- }
- .song-item .creator {
- grid-area: creator;
- font-size: 12px;
- }
- .song-item .title {
- grid-area: title;
- font-size: 20px;
- }
- /* }}} */
- /* }}} */
- /* game-screen {{{ */
- /* loading-screen {{{ */
- #loader {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- #loader .progress-bar {
- width: 80%;
- }
- #loader .progress-bar .shade {
- transition: width 0.2s;
- }
- #ready {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- #ready .status {
- font-size: 30px;
- }
- #ready .message {
- font-size: 14px;
- }
- /* }}} */
- /* track-progress {{{ */
- .track-progress {
- display: grid;
- grid-template-columns: max-content auto;
- grid-template-rows: 50% 50%;
- grid-template-areas:
- "tl tb"
- "il ib";
- grid-gap: 0px 10px;
- align-items: center;
- align-self: end;
- }
- .track-progress .total-label,
- .track-progress .interval-label {
- justify-self: right;
- font-variant-caps: small-caps;
- font-size: 12px;
- }
- .track-progress .total-label {
- grid-area: tl;
- }
- .track-progress .interval-label {
- grid-area: il;
- justify-self: right;
- }
- .track-progress .total {
- grid-area: tb;
- }
- .track-progress .interval {
- grid-area: ib;
- }
- /* }}} */
- /* typing area {{{ */
- #game {
- display: grid;
- grid-template-columns: 50px 50px auto;
- grid-template-rows: 40px 24px 12px 30px auto 22px;
- grid-template-areas:
- ". . track"
- "score score score"
- ". . kana"
- ". . kanji"
- "romaji-first romaji romaji"
- ". . stats";
- grid-row-gap: 2px;
- padding: 2px 20px;
- background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
- }
- #game .track-progress {
- grid-area: track;
- }
- #game .score-line {
- grid-area: score;
- }
- #game .kana-line {
- grid-area: kana;
- font-size: 12px;
- margin-left: 15px;
- }
- #game .kanji-line {
- grid-area: kanji;
- padding-left: 5px;
- border-bottom: solid 2px rgba(255, 255, 255, 0.5);
- border-left: solid 10px rgba(255, 255, 255, 0.5);
- border-radius: 0px 0px 0px 10px;
- }
- #game .stats-line {
- grid-area: stats;
- }
- #game .romaji-first,
- #game .romaji-line {
- text-transform: uppercase;
- align-self: baseline;
- line-height: 1;
- }
- #game .romaji-first {
- grid-area: romaji-first;
- justify-self: right;
- font-size: 36px;
- padding: 0px 2px;
- }
- #game .romaji-line {
- grid-area: romaji;
- font-size: 20px;
- }
- #game .romaji-first.error {
- animation: pulse 0.2s;
- }
- /* }}} */
- /* score area {{{ */
- .score-line {
- display: flex;
- }
- .score-line .pair,
- .stats-line .pair {
- margin: 0px 4px;
- border-bottom: solid 2px rgba(255, 255, 255, 0.5);
- border-radius: 2px;
- }
- .score-line .pair span,
- .stats-line .pair span {
- text-align: right;
- padding: 0px 4px;
- }
- .score-line .combo {
- flex: none;
- width: 100px;
- text-align: left;
- }
- .score-line .pair {
- flex: 1;
- display: flex;
- }
- .stats-line {
- display: flex;
- justify-content: right;
- }
- .stats-line .pair span {
- font-size: 14px;
- }
- .stats-line .pair .value {
- display: inline-block;
- min-width: 50px;
- }
- /* }}} */
- /* score screen {{{ */
- #score {
- display: grid;
- grid-template-columns: max-content auto;
- align-items: baseline;
- align-content: end;
- grid-gap: 5px;
- padding: 20px;
- }
- #score .class,
- #score .score {
- text-shadow: 0px 0px 5px var(--highlight-color);
- }
- #score .class {
- font-size: 40px;
- }
- #score .score {
- font-size: 24px;
- }
- /* }}} */
- .kana {
- display: inline-block;
- position: relative;
- white-space: pre;
- }
- .kana::after {
- display: inline-block;
- content: attr(data-text);
- position: absolute;
- left: 0;
- top: 0;
- color: var(--highlight-color);
- font-weight: bold;
- overflow: hidden;
- width: 0px;
- transition: width 0.1s;
- }
- .kana.half::after {
- width: 50%;
- }
- .kana.full::after {
- width: 100%;
- }
- @keyframes pulse {
- 0% {
- color: var(--base-color);
- }
- 50% {
- color: red;
- }
- 100% {
- color: var(--base-color);
- }
- }
- #game.waiting .kana-line,
- #game.waiting .kanji-line {
- opacity: 0.5;
- }
- #game.waiting .romaji-first,
- #game.waiting .romaji-line {
- color: transparent;
- }
- /* }}} */
- /* }}} */
|