styling user stuff

This commit is contained in:
ebby 2026-10-05 08:35:29 +02:00
parent a8f6b6560f
commit 1c7d906dba
9 changed files with 85 additions and 19 deletions

View file

@ -17,4 +17,10 @@
#logo-text {
font-weight: bold;
}
@media only screen and (max-width: 800px) {
#logo-text {
color: white
}
}
</style>

View file

@ -34,7 +34,7 @@ export default function DeleteUser() {
{error && <p style={{ color: 'red' }}>{error}</p>}
{showModal && (
<div style={{
<div id="modal" style={{
position: 'fixed',
top: 0,
left: 0,
@ -68,6 +68,15 @@ export default function DeleteUser() {
</div>
</div>
)}
<style>{`
@media screen and (max-width: 800px) {
#modal {
p, h2, .back-btn {
color: var(--primary-text);
}
}
}
`}</style>
</div>
);
}

View file

@ -59,6 +59,18 @@ export default function LoginForm() {
/>
{error && <p style={{ color: 'red' }}>{error}</p>}
</form>
<style>{`
@media screen and (max-width: 800px) {
* {
color: white;
input {
color: var(--primary-text);
}
}
}
`}</style>
</div>
);
}

View file

@ -72,6 +72,18 @@ export default function RegisterForm() {
<span style="font-size: 0.8rem">Du kannst deine Daten jederzeit löschen oder die E-Mail Benachrichtigung deaktivieren.</span>
{error && <p style={{ color: 'red' }}>{error}</p>}
</form>
<style>{`
@media screen and (max-width: 800px) {
* {
color: white;
input {
color: var(--primary-text);
}
}
}
`}</style>
</div>
);
}

View file

@ -15,11 +15,15 @@ export default function ToggleSubscription() {
const handleSubscription = async () => {
setError('');
let hasError = false
try {
api.toggleSubscription(subscription)
} catch (err) {
setError(err instanceof Error ? err.message : 'Update');
hasError = true
} finally {
// if (!hasError) // TODO: snackbar
}
};
@ -30,7 +34,9 @@ export default function ToggleSubscription() {
return (
<div>
<div style={{
marginBottom: '16px',
}}>
<form onSubmit={handleSubscription}>
<div>
<input

View file

@ -13,11 +13,18 @@ export default function UserDetails() {
return (
<div style="display: flex; flex-direction: column; gap: 16px">
<div id="container" style="display: flex; flex-direction: column; gap: 16px">
<span >Nutzername: {user?.name}</span>
<span style={{
margin: '0 0 16px 0'
}}>E-Mail Adresse: {user?.email}</span>
<style>{`
@media screen and (max-width: 800px) {
* {
color: white;
}
}
`}</style>
</div>
)
}

View file

@ -75,4 +75,18 @@ const { title, subtitle, text, buttonText, eventString } = Astro.props;
align-items: end;
padding-top: 64px;
}
@media only screen and (max-width: 800px) {
img {
height: 200px;
}
#background {
padding: 0;
}
#content {
background-color: transparent;
}
}
</style>

View file

@ -1,16 +0,0 @@
---
import DeleteUser from "../islands/DeleteUser";
import LoginForm from "../islands/LoginForm";
import RegisterForm from "../islands/RegisterForm";
import ToggleSubscription from "../islands/ToggleSubscription";
import Main from "../layouts/Main.astro";
---
<Main>
<RegisterForm client:only="preact" />
<LoginForm client:only="preact" />
<ToggleSubscription client:only="preact" />
<DeleteUser client:only="preact" />
</Main>

View file

@ -125,4 +125,20 @@ input[type=checkbox] {
max-height: 500px;
object-fit: cover;
object-position: center;
}
@media screen and (max-width: 800px) {
.submit-btn {
background-color: white;
color: var(--primary-color);
}
.submit-btn:hover {
color: white;
background-color: var(--primary-dark);
}
.back-btn:hover {
color: var(--primary-dark);
}
}