Styling
The ticket backgrounds have color depending on background and some improvements
This commit is contained in:
@@ -675,8 +675,16 @@ pub fn all_tickets_component() -> Html {
|
||||
} else {
|
||||
html! {
|
||||
<ul class= "postits">
|
||||
{ for tickets.iter().filter(|t| t.status != "Archived" && (if user.is_admin { true } else if let Some(uid) = user.id { t.user_id == uid } else { false })).map(|t| html! {
|
||||
<div class="ticketbox">
|
||||
{ for tickets.iter().filter(|t| t.status != "Archived" && (if user.is_admin { true } else if let Some(uid) = user.id { t.user_id == uid } else { false })).map(|t| {
|
||||
let status_class = match t.status.as_str() {
|
||||
"ToDo" => "To-Do",
|
||||
"InProgress" => "InProgress",
|
||||
"Completed" => "Completed",
|
||||
"Archived" => "Archived",
|
||||
_ => "To-Do"
|
||||
};
|
||||
html! {
|
||||
<div class={classes!{status_class, "ticketbox"}}>
|
||||
<li key={t.id.to_string()}>
|
||||
<Link<crate::Route> to={crate::Route::TicketById{id: t.id}}><h3>{ format!("{} - #{}", t.betreff, t.id) }</h3></Link<crate::Route>>
|
||||
<p>{ &t.description }</p>
|
||||
@@ -690,7 +698,8 @@ pub fn all_tickets_component() -> Html {
|
||||
</li>
|
||||
|
||||
</div>
|
||||
})}
|
||||
}})}
|
||||
|
||||
<Link<crate::Route> to={crate::Route::Ticket}>{ "Zurück zur Startseite" }</Link<crate::Route>>
|
||||
</ul>
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ pub fn register_component() -> Html {
|
||||
};
|
||||
|
||||
html! {
|
||||
<form {onsubmit}>
|
||||
<form {onsubmit} class="rundbg">
|
||||
<label>{ "Vorname:" }
|
||||
<input type="text" value={(*first_name).clone()} oninput={fn_change}/>
|
||||
</label>
|
||||
@@ -330,7 +330,7 @@ pub fn login_component() -> Html {
|
||||
html! {
|
||||
<div>
|
||||
<h1 class="headline">{ "Anmeldung" }</h1>
|
||||
<form {onsubmit} class="rundbg">
|
||||
<form {onsubmit} class="rundbg login">
|
||||
<input
|
||||
placeholder="username"
|
||||
value={(*username).clone()}
|
||||
@@ -425,9 +425,9 @@ pub fn all_users_component() -> Html {
|
||||
html! { <p>{ format!("Error: {}", e) }</p> }
|
||||
} else {
|
||||
html! {
|
||||
<ul>
|
||||
<ul class="posti8s">
|
||||
{ for users.iter().map(|t| html! {
|
||||
<li key={t.id.to_string()}>
|
||||
<li key={t.id.to_string()} class="listbox">
|
||||
<Link<crate::Route> to={crate::Route::UserByID{id: t.id}}><h3>{ format!("{} {}- #{}", t.first_name, t.last_name, t.id) }</h3></Link<crate::Route>>
|
||||
</li>
|
||||
})}
|
||||
|
||||
@@ -13,25 +13,42 @@
|
||||
|
||||
}
|
||||
|
||||
.ticketbox {
|
||||
.listbox {
|
||||
max-width: auto;
|
||||
margin:0 0;
|
||||
margin-top: 96px;
|
||||
background-color: #ffec3f;
|
||||
background-color: $rundbgbackgroundcolor;
|
||||
padding-bottom: 96px;
|
||||
color: white;
|
||||
padding-left: 32px;
|
||||
padding-right: 32px;
|
||||
padding-top: 96px;
|
||||
border-radius: 20px;
|
||||
border-color: #000000;
|
||||
border-style: double;
|
||||
box-shadow: 20px 20px 10px;
|
||||
box-shadow: rgb(43, 43, 43);
|
||||
box-shadow: 10px 10px 10px rgba(43, 43, 43, 0.8);
|
||||
font-size: 26px;
|
||||
list-style-type: none;
|
||||
|
||||
|
||||
&.To-Do {
|
||||
background-color: #b1003b;
|
||||
}
|
||||
|
||||
&.InProgress {
|
||||
background-color: #fff385;
|
||||
}
|
||||
|
||||
&.Completed {
|
||||
background-color: #90ff82;
|
||||
}
|
||||
|
||||
&.Archived {
|
||||
background-color: #af69ee;
|
||||
}
|
||||
}
|
||||
|
||||
.postits {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto auto;
|
||||
gap: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ body {
|
||||
flex-direction: column;
|
||||
max-width: 40%;
|
||||
margin:0 auto;
|
||||
margin-top: 96px;
|
||||
background-color: variables.$rundbgbackgroundcolor;
|
||||
padding-bottom: 96px;
|
||||
padding-left: 32px;
|
||||
@@ -57,8 +56,7 @@ body {
|
||||
gap: 8px;
|
||||
border-color: #000000;
|
||||
border-style: double;
|
||||
box-shadow: 20px 20px 10px;
|
||||
box-shadow: rgb(43, 43, 43);
|
||||
box-shadow: 20px 20px 10px rgb(43, 43, 43);
|
||||
font-size: 26px;
|
||||
|
||||
|
||||
@@ -75,4 +73,8 @@ body {
|
||||
button {
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
&.login {
|
||||
margin-top: 96px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user