fixed a LOT of repetition
This commit is contained in:
@@ -1,78 +1,76 @@
|
||||
---
|
||||
const { title, description } = Astro.props;
|
||||
import Box from "../Box.astro";
|
||||
---
|
||||
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<form method="POST" action="https://example.com/example">
|
||||
<input type="text" name="name" id="nameInput" class="name" placeholder="John Doe" autocomplete="name">
|
||||
<input type="email" name="email" id="emailInput" class="email" placeholder="john@example.com" autocomplete="email">
|
||||
<textarea name="message" id="messageInput" placeholder="Your message here"></textarea>
|
||||
<input type="submit" value="Indienen" class="submitBtn">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<Box>
|
||||
<form method="POST" action="https://example.com/example">
|
||||
<input type="text" name="name" id="nameInput" class="name" placeholder="John Doe" autocomplete="name">
|
||||
<input type="email" name="email" id="emailInput" class="email" placeholder="john@example.com" autocomplete="email">
|
||||
<textarea name="message" id="messageInput" placeholder="Your message here"></textarea>
|
||||
<input type="submit" value="Indienen" class="submitBtn">
|
||||
</form>
|
||||
</Box>
|
||||
|
||||
<style>
|
||||
.container {
|
||||
font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
gap: 1rem;
|
||||
min-height: 120px
|
||||
padding: 1rem 1rem 1rem 0.9rem;
|
||||
background: rgba(255,255,255,0.05);
|
||||
border: 1px solid rgba(255,255,255,0.08);
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 8px 20px rgba(0,0,0,0.18);
|
||||
color: white;
|
||||
transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
|
||||
margin-top: 0.5rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.container:hover {
|
||||
box-shadow: 0 14px 28px rgba(0,0,0,0.24);
|
||||
border-color: rgba(255,255,255,0.14);
|
||||
}
|
||||
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
|
||||
border-radius: 10pt;
|
||||
padding:10px;
|
||||
font-size: .8rem;
|
||||
|
||||
border-radius: 10px;
|
||||
color: white;
|
||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||
background: rgba(18, 18, 28, 0.24);
|
||||
backdrop-filter: blur(2px);
|
||||
box-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
|
||||
transition: all 200ms ease;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
||||
font-size: 0.75rem;
|
||||
padding: 0.8rem 1rem;
|
||||
}
|
||||
|
||||
transition: transform var(--transition-time), border-color var(--transition-time), background var(--transition-time), box-shadow var(--transition-time);
|
||||
padding: 0.95rem 1.2rem;
|
||||
input::placeholder, textarea::placeholder {
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
input:focus, textarea:focus {
|
||||
outline: none;
|
||||
border-color: rgba(255, 255, 255, 0.3);
|
||||
background: rgba(18, 18, 28, 0.4);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 255, 255, 0.1);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
input:hover, textarea:hover {
|
||||
border-color: rgba(255, 255, 255, 0.2);
|
||||
background: rgba(18, 18, 28, 0.35);
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
background: linear-gradient(135deg, rgba(140, 90, 20, 0.4), rgba(96, 67, 8, 0.3));
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
padding: unset !important;
|
||||
background: rgba(96, 67, 8, 0.24);
|
||||
transition: all 200ms ease;
|
||||
}
|
||||
|
||||
.submitBtn:hover {
|
||||
background: linear-gradient(135deg, rgba(160, 110, 30, 0.5), rgba(116, 87, 18, 0.4));
|
||||
border-color: rgba(255, 255, 255, 0.25);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.submitBtn:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: start;
|
||||
gap: .5rem;
|
||||
width: 50%;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
form input {
|
||||
@@ -87,15 +85,14 @@ const { title, description } = Astro.props;
|
||||
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.container {
|
||||
min-height: 100px;
|
||||
padding: 0.85rem 0.85rem 0.85rem 0.75rem;
|
||||
gap: 0.8rem;
|
||||
}
|
||||
|
||||
form {
|
||||
width: 100%;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
font-size: 0.75rem;
|
||||
padding: 0.8rem 1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user