Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,7 @@ public HtmlSerializable toHTML(BookData book) {
.add(TextData.toHtml(text, book)),
HtmlElement.div().style("width", 210)
.add(HtmlElement.p().classes("underline").add(I18n.get(KEY_EFFECTS)))
.add(HtmlElement.ul().classes("prop-list")
.add(Arrays.stream(effects).map(effect -> HtmlElement.li().add(HTMLUtils.parse(effect)))))
.add(HtmlElement.ul().style("margin-top", 8).classes("prop-list").add(HTMLUtils.toListItems(effects)))
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,9 @@ public HtmlSerializable toHTML(BookData book) {
HtmlElement.div().style("padding-left", 10).add(
HtmlElement.div().classes("column").style("height", 128)
.add(TextData.toHtml(text, book)),
HtmlElement.div().style("width", 210).add(
HtmlElement.p().classes("underline").add(I18n.get(KEY_PROPERTIES)),
HtmlElement.ul().classes("prop-list")
.add(Arrays.stream(properties).map(prop -> HtmlElement.li().add(HTMLUtils.parse(prop))))
HtmlElement.div().style("width", 210)
.add(HtmlElement.p().classes("underline").add(I18n.get(KEY_PROPERTIES))
.add(HtmlElement.ul().style("margin-top", 8).classes("prop-list").add(HTMLUtils.toListItems(properties)))
)
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,12 @@ private void addHtmlList(HtmlElement div, String key, @Nullable String[] strings
if (components.isEmpty() && strings == null) return;

// append hardcoded text
HtmlElement list = HtmlElement.ul().classes("prop-list");
HtmlElement list = HtmlElement.ul().style("margin-top", 8).classes("prop-list");
if (strings != null) {
for (String string : strings) {
list.add(HtmlElement.li().add(string));
}
list.add(HTMLUtils.toListItems(strings));
} else {
// append generated text
for (Component component : components) {
list.add(HtmlElement.li().add(HTMLUtils.toHtml(component)));
}
list.add(HTMLUtils.toListItems(components));
}

// add elements to final div
Expand Down