You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

302 lines
5.1 KiB
CSS

12 months ago
:root {
--primary: #c5ff27;
12 months ago
--black: #231F20;
12 months ago
--white: white;
--gutter-sm: .5rem;
--gutter-md: 1rem;
--gutter-lg: 3rem;
--font-size-base: 1rem;
}
@font-face {
font-family: "WonderType";
src:
12 months ago
local("WonderType"),
url("WonderType-Regular.otf") format("opentype"),
url("trickster-outline.woff") format("woff");
}
12 months ago
html,
body {
width: 100%;
height: 100%;
margin: 0 0;
padding: 0 0;
12 months ago
overflow: hidden;
}
.state {
display: none;
}
body[state="idle"] .state--idle {
display: block;
}
12 months ago
12 months ago
body[state="waiting--bottom"] .multi__bottom .state--waiting,
body[state="waiting--bottom"] .multi__top .state--idle {
display: block;
}
body[state="waiting--top"] .multi__top .state--waiting,
body[state="waiting--top"] .multi__bottom .state--idle {
display: block;
}
body[state="recording"] .state--recording {
display: block;
color: white;
}
body[state="finished"] .state--finished {
display: block;
12 months ago
}
canvas {
position: fixed;
width: 100%;
height: 100%;
12 months ago
max-height: 120px;
12 months ago
pointer-events: none;
12 months ago
z-index: -1;
top: 50%;
left: 0;
transform: translate3d(0, -50%, 0);
12 months ago
}
* {
box-sizing: border-box;
}
body {
background-color: var(--primary);
font-family: "WonderType";
}
.container {
max-width: 900px;
margin: 0 auto;
padding: var(--gutter-md);
text-align: center;
12 months ago
display: flex;
flex-direction: column;
height: 100%;
justify-content: space-between;
align-items: center;
}
audio {
display: none;
}
a {
color: var(--black);
12 months ago
}
button,
12 months ago
.button,
input::file-selector-button,
input[type="submit"] {
12 months ago
width: 100%;
display: inline-flex;
align-items: center;
justify-content: center;
text-transform: uppercase;
background-color: var(--black);
border: none;
padding: var(--gutter-sm) var(--gutter-md);
color: var(--white);
font-weight: bolder;
font-size: var(--font-size-base);
transition: .2s all ease-in-out;
font-family: "WonderType";
12 months ago
cursor: pointer;
12 months ago
}
12 months ago
input::file-selector-button {
width: auto;
12 months ago
}
12 months ago
input[type="submit"] {
margin-top: var(--gutter-lg);
12 months ago
}
.button--record {
border-radius: 100%;
12 months ago
border: none;
max-width: 150px;
max-height: 150px;
12 months ago
aspect-ratio: 1 / 1;
position: relative;
background-color: transparent;
12 months ago
font-family: sans-serif;
overflow: hidden;
font-weight: 400;
12 months ago
}
12 months ago
.button--record:after {
content: "record";
}
12 months ago
@keyframes recording {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.button--record:before {
content: '';
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: var(--black);
z-index: -1;
12 months ago
transform: translate3d(0, 0%, 0);
12 months ago
transition: transform .1s linear;
}
12 months ago
.button--record[state="recording"]:before,
.button--record[state="uploading"]:before {
12 months ago
transform: translate3d(0, 100%, 0);
12 months ago
}
12 months ago
.button--record[state="recording"],
.button--record[state="uploading"] {
12 months ago
color: var(--black);
animation-delay: 1s;
12 months ago
background-color: transparent;
animation: 8s linear recording infinite;
12 months ago
border: .3rem dashed var(--black);
}
.multi__bottom .button--record {
animation-delay: 1s;
12 months ago
}
.button--record[state="recording"] {
12 months ago
/* border-style: dashed; */
animation-duration: 4s;
12 months ago
}
12 months ago
.button--record[state="recording"]:after,
.button--record[state="finished"]:after,
.button--record[state="uploading"]:after {
12 months ago
animation: 2s linear recording infinite;
12 months ago
content: "...recording..";
12 months ago
animation-direction: reverse;
}
12 months ago
.button--record[state="uploading"]:after {
animation-duration: 8s;
content: "...uploading..";
}
12 months ago
.button--record[state="waiting"]:after {
animation-duration: 8s;
content: "...waiting..";
}
12 months ago
.button--record[state="finished"]:after {
animation-duration: 8s;
12 months ago
content: "Upload complete";
12 months ago
}
.button--icon {
background: transparent;
}
dialog {
width: auto;
12 months ago
max-width: min(90vw, 400px);
12 months ago
flex-direction: column;
12 months ago
}
dialog::backdrop {
12 months ago
background: black;
opacity: 0.5;
12 months ago
}
.dialog__close {
align-self: flex-end;
position: relative;
}
.dialog__close button {
position: absolute;
z-index: 99;
top: 0;
right: 0;
display: block;
width: auto;
padding: 0 0;
}
dialog h3 {
margin: 0 0;
}
label {
margin: var(--gutter-sm) 0;
display: block;
}
dialog[open] {
display: flex;
12 months ago
}
.multi {
display: flex;
width: 100%;
height: 100%;
padding: var(--gutter-md);
flex-direction: column;
justify-content: space-between;
align-items: center;
}
.multi__top,
.multi__bottom {
height: 100%;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
}
.multi h1 {
margin-top: -.5rem;
}
.multi button {
margin-top: auto;
}
.multi__top {
transform: rotate(180deg);
}
.button--multi {
aspect-ratio: 1/1;
border-radius: 100%;
max-width: 230px;
max-height: 230px;
transition: none;
}
.button--multi:first-of-type {
transform: rotate(180deg);
12 months ago
}