mirror of
https://github.com/sigmasternchen/drnk.me
synced 2025-03-15 09:48:54 +00:00
feat: Formatting for error messages
This commit is contained in:
parent
099c85ef7b
commit
358447514f
2 changed files with 14 additions and 9 deletions
|
@ -62,3 +62,14 @@ html {
|
|||
.result {
|
||||
font-size: 2vw;
|
||||
}
|
||||
|
||||
.error {
|
||||
border: 1px solid red;
|
||||
color: red;
|
||||
padding: 0.2vw;
|
||||
font-size: 1.3vw;
|
||||
}
|
||||
|
||||
.invisible {
|
||||
opacity: 0;
|
||||
}
|
|
@ -1,12 +1,6 @@
|
|||
<?php
|
||||
if ($data["error"] ?? false) {
|
||||
?>
|
||||
<div class="error">
|
||||
<?php echo $data["error"]; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="error <?php echo ($data["error"] ?? "") ? "" : "invisible"; ?>">
|
||||
<?php echo $data["error"] ?? "no error"; ?>
|
||||
</div>
|
||||
|
||||
<form action="/manage" method="POST" hx-post="/manage" hx-swap="innerHTML" hx-target=".center-panel">
|
||||
<input type="text" name="url" value="<?php echo htmlspecialchars($data["url"] ?? ""); ?>" placeholder="https://">
|
||||
|
|
Loading…
Reference in a new issue