Bluewaterblog/blog/src/layouts/Form.astro
2026-10-04 20:39:52 +02:00

78 lines
1.7 KiB
Text

---
import NavBack from "../islands/NavBack";
import Main from "../layouts/Main.astro";
const { title, subtitle, text, buttonText, eventString } = Astro.props;
---
<Main>
<div id="background">
<div id="content">
<img src="../..//blog_img/england/titelbild_england.webp" />
<div id="form">
<h1>{title}</h1>
<span>{subtitle}</span>
<p>{text}</p>
<slot />
<div id="buttons">
<NavBack client:load />
<button
onclick={`window.dispatchEvent(new Event("${eventString}"))`}
class="submit-btn"
>
⚓︎ {buttonText}
</button>
</div>
</div>
</div>
</div>
</Main>
<style>
#background {
background-image: linear-gradient(
to bottom,
var(--primary-dark),
var(--primary-color)
);
width: 100%;
height: 100%;
padding: 0 20%;
}
#content {
background-color: white;
height: 100%;
display: flex;
flex-direction: column;
}
img {
width: 100%;
height: 300px;
object-fit: cover;
display: block;
}
#form {
padding: 32px 64px;
height: 100%;
}
h1 {
margin: 0;
padding-bottom: 16px;
}
span {
font-size: 1.25rem;
}
#buttons {
display: flex;
width: 100%;
justify-content: space-between;
align-items: end;
padding-top: 64px;
}
</style>