Update index+css

This commit is contained in:
leandro-rdz 2023-11-29 15:38:23 +01:00
parent f624e8355e
commit c27f0348f1
3 changed files with 152 additions and 11 deletions

BIN
css/SpeedBeast.ttf Normal file

Binary file not shown.

View file

@ -1,16 +1,147 @@
body{
@font-face {
font-family: "SpeedBeast";
src:
local("SpeedBeast"),
url("./SpeedBeast.ttf") format("truetype");
}
body {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
width: 100%;
height: 100%;
font-size: 10px;
margin: 0;
display: grid;
place-items: center;
}
h1{
font-size: 24px;
h1 {
font-size: 36px;
margin-top: 20px;
color: #4f3c68;
}
main {
font-family: Speedbeast,Trebuchet, sans-serif, calibiri;
}
#background-image {
background-image: url('./assets/bg.webp');
}
background-image: url('../assets/bg.webp');
}
#checkbox {
display: none;
}
#checkbox:checked + #formcontainer #form {
width: 37.5em;
}
#checkbox:checked + #formcontainer #form_toggle {
visibility: hidden;
opacity: 0;
transform: scale(0.7);
}
#checkbox:checked + #formcontainer #form_input, #checkbox:checked + #formcontainer #form_buttonLabel {
transition: 0.2s 0.1s;
visibility: visible;
opacity: 1;
transform: scale(1);
}
#checkbox:not(:checked) + #formcontainer #form_input:required:valid ~ #form_toggle::before, #checkbox:checked + #formcontainer #form_input:required:valid ~ #form_toggle::before {
content: 'Thank You! \1F60A';
}
#checkbox:not(:checked) + #formcontainer #form_input:required:valid ~ #form_toggle {
pointer-events: none;
cursor: default;
}
#formcontainer, #form, #form_toggle {
width: 20em;
height: 6.25em;
}
#formontainer {
position: relative;
font-weight: 700;
}
#form, #form_toggle {
position: absolute;
border-radius: 6.25em;
background-color: #fff;
transition: 0.2s;
}
#form {
left: 50%;
transform: translateX(-50%);
padding: 0.6em;
box-sizing: border-box;
box-shadow: 0 0.125em 0.3125em rgba(0, 0, 0, 0.3);
display: flex;
justify-content: center;
}
#form_toggle {
color: #7e2722;
top: 0;
cursor: pointer;
z-index: 1;
display: flex;
align-items: center;
justify-content: center;
}
#form_toggle::before {
font-size: 1.75em;
content: attr(data-title);
}
#form_input, #form_button {
font: inherit;
border: 0;
outline: 0;
border-radius: 5em;
box-sizing: border-box;
}
#form_input, #form_buttonLabel {
font-size: 1.75em;
opacity: 0;
visibility: hidden;
transform: scale(0.7);
transition: 0s;
}
#form_input {
color: rgb(31, 24, 134);
height: 100%;
width: 100%;
padding: 0 0.714em;
}
#form_input::placeholder {
color: currentColor;
}
#form_input:required:valid {
color: #1b5228;
}
#form_input:required:valid + .c-form__buttonLabel {
color: #fff;
}
#form_input:required:valid + .c-form__buttonLabel::before {
pointer-events: initial;
}
#form_buttonLabel {
color: #ffaea9;
height: 100%;
width: auto;
}
#form_buttonLabel::before {
content: '';
position: absolute;
width: 100%;
height: 100%;
pointer-events: none;
cursor: pointer;
}
#form_button {
color: inherit;
padding: 0;
height: 100%;
width: 5em;
background-color: #7e2722;
}

View file

@ -7,12 +7,22 @@
</head>
<body id="background-image">
<form>
<main>
<h1>Grand Tabernacle Auto</h1>
<p> Le plus grand tabernacleur de notre ère est:</p>
<input type="text" placeholder="Nom du tabernacleur" id="name">
<input type="submit" value="Jouer" placeholder="Jouer">
</form>
<h2> Deviens le plus grand tabernacleur du monde !</h2>
<input type="checkbox" id="checkbox">
<div id="formcontainer">
<form id="form" action="">
<input id="form_input" placeholder="Pseudo (pas de symbole)" type="text" pattern="[A-Za-z0-9]+"
required>
<label id="form_buttonLabel" for="checkbox">
<button id="form_button" type="button">Go !</button>
</label>
<label id="form_toggle" for="checkbox" data-title="Jouer"></label>
</form>
</div>
</main>
</body>
</html>