fix(frontend): fixes css misconfiguration and index on focus
This commit is contained in:
parent
3409f17ff2
commit
efe09820e2
@ -13,8 +13,8 @@
|
|||||||
<link rel="manifest" href="public/manifest.json" />
|
<link rel="manifest" href="public/manifest.json" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="bg-black text-white">
|
<body class="bg-black text-white pt-12">
|
||||||
<div class="h-screen flex justify-center items-center">
|
<div class="h-[90vh] flex flex-col justify-center items-center">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-16 h-16 rotate-ease" viewBox="0 -960 960 960" fill="white">
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-16 h-16 rotate-ease" viewBox="0 -960 960 960" fill="white">
|
||||||
<path
|
<path
|
||||||
d="M320-160h320v-120q0-66-47-113t-113-47q-66 0-113 47t-47 113v120Zm160-360q66 0 113-47t47-113v-120H320v120q0 66 47 113t113 47ZM160-80v-80h80v-120q0-61 28.5-114.5T348-480q-51-32-79.5-85.5T240-680v-120h-80v-80h640v80h-80v120q0 61-28.5 114.5T612-480q51 32 79.5 85.5T720-280v120h80v80H160Zm320-80Zm0-640Z" />
|
d="M320-160h320v-120q0-66-47-113t-113-47q-66 0-113 47t-47 113v120Zm160-360q66 0 113-47t47-113v-120H320v120q0 66 47 113t113 47ZM160-80v-80h80v-120q0-61 28.5-114.5T348-480q-51-32-79.5-85.5T240-680v-120h-80v-80h640v80h-80v120q0 61-28.5 114.5T612-480q51 32 79.5 85.5T720-280v120h80v80H160Zm320-80Zm0-640Z" />
|
||||||
|
@ -362,8 +362,8 @@ pub fn Home() -> Html {
|
|||||||
"flex",
|
"flex",
|
||||||
"flex-col",
|
"flex-col",
|
||||||
"items-center",
|
"items-center",
|
||||||
|
"justify-center",
|
||||||
"h-[90vh]",
|
"h-[90vh]",
|
||||||
"pt-12",
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@ -475,7 +475,7 @@ pub fn Home() -> Html {
|
|||||||
Callback::from(move |e: FocusEvent| {
|
Callback::from(move |e: FocusEvent| {
|
||||||
let target = e.target_unchecked_into::<web_sys::HtmlElement>();
|
let target = e.target_unchecked_into::<web_sys::HtmlElement>();
|
||||||
if let Some(index) = target.get_attribute("tabindex") {
|
if let Some(index) = target.get_attribute("tabindex") {
|
||||||
if let Ok(i) = index.parse::<usize>() {
|
if let Ok(i) = index.replace('-', "").parse::<usize>() {
|
||||||
curr_index.set(i);
|
curr_index.set(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -488,15 +488,7 @@ pub fn Home() -> Html {
|
|||||||
};
|
};
|
||||||
html! {
|
html! {
|
||||||
<input
|
<input
|
||||||
aria-label={format!("letter-{}", match index {
|
aria-label={format!("letter-{index}")}
|
||||||
0 => "one",
|
|
||||||
1 => "two",
|
|
||||||
2 => "three",
|
|
||||||
3 => "four",
|
|
||||||
4 => "five",
|
|
||||||
_ => "",
|
|
||||||
|
|
||||||
})}
|
|
||||||
onkeyup={on_enter.clone()}
|
onkeyup={on_enter.clone()}
|
||||||
oninput={on_input.clone()}
|
oninput={on_input.clone()}
|
||||||
tabindex={ format!("{prefix}{index}")}
|
tabindex={ format!("{prefix}{index}")}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user