Editor: Make it clearer that editable areas are editable
- Add a border on the left when hovering - Make full sentences to explain where you can write
This commit is contained in:
parent
4f7c20fc26
commit
3198f30515
@ -142,11 +142,17 @@ fn init_editor() -> Result<(), EditorError> {
|
|||||||
let subtitle_val = get_elt_value("subtitle");
|
let subtitle_val = get_elt_value("subtitle");
|
||||||
let content_val = get_elt_value("editor-content");
|
let content_val = get_elt_value("editor-content");
|
||||||
// And pre-fill the new editor with this values
|
// And pre-fill the new editor with this values
|
||||||
let title = init_widget(&ed, "h1", i18n!(CATALOG, "Title"), title_val, true)?;
|
let title = init_widget(
|
||||||
|
&ed,
|
||||||
|
"h1",
|
||||||
|
i18n!(CATALOG, "Enter your title"),
|
||||||
|
title_val,
|
||||||
|
true,
|
||||||
|
)?;
|
||||||
let subtitle = init_widget(
|
let subtitle = init_widget(
|
||||||
&ed,
|
&ed,
|
||||||
"h2",
|
"h2",
|
||||||
i18n!(CATALOG, "Subtitle, or summary"),
|
i18n!(CATALOG, "Enter a subtitle, or a summary"),
|
||||||
subtitle_val,
|
subtitle_val,
|
||||||
true,
|
true,
|
||||||
)?;
|
)?;
|
||||||
|
@ -389,7 +389,18 @@ main .article-meta {
|
|||||||
|
|
||||||
article {
|
article {
|
||||||
max-width: none;
|
max-width: none;
|
||||||
min-height: 80vh;
|
min-height: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > *[contenteditable] {
|
||||||
|
margin-left: -20px;
|
||||||
|
padding-left: 18px;
|
||||||
|
border-left: 2px solid transparent;
|
||||||
|
transition: border-left-color 0.1s ease-in;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-left-color: transparentize($black, 0.6);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user