diff --git a/src-ui/src/reader.rs b/src-ui/src/reader.rs index 1f4bb27..be58106 100644 --- a/src-ui/src/reader.rs +++ b/src-ui/src/reader.rs @@ -131,17 +131,29 @@ pub fn ReaderView(settings: Resource<(), Settings>) -> impl IntoView {
- {move || conts.get().map_or_else(|| view! {

"Loading..."

}.into_view(), |data| data.into_iter() - .enumerate() - .map(|(i, d)| view! { }) - .collect::>() - .into_view())} + {move || { + conts + .get() + .map_or_else( + || view! {

"Loading..."

}.into_view(), + |data| { + data.into_iter() + .enumerate() + .map(|(i, d)| { + view! { } + }) + .collect::>() + .into_view() + }, + ) + }} +

-
- {move || { - if selected_word().is_some() { - view! { + {move || { + if selected_word().is_some() { + view! { +
) -> impl IntoView { .map(|v| v.lemma) } /> - } - .into_view() - } else { - view! {}.into_view() - } - }} +
-
+
+ {move || { + conts + .get() + .unwrap()[selected_word().unwrap()] + .morph + .iter() + .map(|(k, v)| { + view! {
{k}:{v}
} + }) + .collect_view() + }} + +
+
+ } + .into_view() + } else { + view! {}.into_view() + } + }} "Loading..."

} diff --git a/src-ui/style.css b/src-ui/style.css index 18ddb67..3da13cc 100644 --- a/src-ui/style.css +++ b/src-ui/style.css @@ -151,11 +151,25 @@ select { /* GENERAL STUFF */ -.sentence, .wordinfo, .definition, .export { +.sentence, .wordinfo, .definition, .export, .grammarinfo { display: flex; justify-content: center; } +.grammarinfo { + font-size: 18px; + font-style: italic; + color: #908caa; +} + +.seperator { + padding-right: 0.3em; +} + +.grammarfeature { + padding: 0em 0.4em; +} + .sentsubmit { width: 80%; height: 3em;