styling user stuff
This commit is contained in:
parent
a8f6b6560f
commit
1c7d906dba
9 changed files with 85 additions and 19 deletions
|
|
@ -17,4 +17,10 @@
|
||||||
#logo-text {
|
#logo-text {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 800px) {
|
||||||
|
#logo-text {
|
||||||
|
color: white
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ export default function DeleteUser() {
|
||||||
{error && <p style={{ color: 'red' }}>{error}</p>}
|
{error && <p style={{ color: 'red' }}>{error}</p>}
|
||||||
|
|
||||||
{showModal && (
|
{showModal && (
|
||||||
<div style={{
|
<div id="modal" style={{
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
|
|
@ -68,6 +68,15 @@ export default function DeleteUser() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
<style>{`
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
|
#modal {
|
||||||
|
p, h2, .back-btn {
|
||||||
|
color: var(--primary-text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`}</style>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,18 @@ export default function LoginForm() {
|
||||||
/>
|
/>
|
||||||
{error && <p style={{ color: 'red' }}>{error}</p>}
|
{error && <p style={{ color: 'red' }}>{error}</p>}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<style>{`
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
|
* {
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
input {
|
||||||
|
color: var(--primary-text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`}</style>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -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>
|
<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>}
|
{error && <p style={{ color: 'red' }}>{error}</p>}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<style>{`
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
|
* {
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
input {
|
||||||
|
color: var(--primary-text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`}</style>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,15 @@ export default function ToggleSubscription() {
|
||||||
|
|
||||||
const handleSubscription = async () => {
|
const handleSubscription = async () => {
|
||||||
setError('');
|
setError('');
|
||||||
|
let hasError = false
|
||||||
|
|
||||||
try {
|
try {
|
||||||
api.toggleSubscription(subscription)
|
api.toggleSubscription(subscription)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(err instanceof Error ? err.message : 'Update');
|
setError(err instanceof Error ? err.message : 'Update');
|
||||||
|
hasError = true
|
||||||
|
} finally {
|
||||||
|
// if (!hasError) // TODO: snackbar
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -30,7 +34,9 @@ export default function ToggleSubscription() {
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div style={{
|
||||||
|
marginBottom: '16px',
|
||||||
|
}}>
|
||||||
<form onSubmit={handleSubscription}>
|
<form onSubmit={handleSubscription}>
|
||||||
<div>
|
<div>
|
||||||
<input
|
<input
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,18 @@ export default function UserDetails() {
|
||||||
|
|
||||||
|
|
||||||
return (
|
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 >Nutzername: {user?.name}</span>
|
||||||
<span style={{
|
<span style={{
|
||||||
margin: '0 0 16px 0'
|
margin: '0 0 16px 0'
|
||||||
}}>E-Mail Adresse: {user?.email}</span>
|
}}>E-Mail Adresse: {user?.email}</span>
|
||||||
|
<style>{`
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
|
* {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`}</style>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -75,4 +75,18 @@ const { title, subtitle, text, buttonText, eventString } = Astro.props;
|
||||||
align-items: end;
|
align-items: end;
|
||||||
padding-top: 64px;
|
padding-top: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 800px) {
|
||||||
|
img {
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#background {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
|
||||||
|
|
@ -125,4 +125,20 @@ input[type=checkbox] {
|
||||||
max-height: 500px;
|
max-height: 500px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: center;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue