Esempio n. 1
0
def test_text_with_links_to_user_translated_html(
    request_context,
    elements,
    separator,
    rendered_title,
):
    assert (text_with_links_to_user_translated_html(
        elements,
        separator=separator,
    ) == rendered_title)
Esempio n. 2
0
 def render_title_html(self) -> HTML:
     title = self.display_title()
     return text_with_links_to_user_translated_html([
         (
             replace_macros_in_str(
                 title,
                 self._get_macro_mapping(title),
             ),
             self.title_url(),
         ),
     ],)
Esempio n. 3
0
def _show_html_graph_title(graph_artwork, graph_render_options) -> None:
    title = text_with_links_to_user_translated_html(
        _render_graph_title_elements(graph_artwork, graph_render_options),
        separator=" / ",
    )
    if not title:
        return

    html.div(title,
             class_=[
                 "title", "inline"
                 if graph_render_options["show_title"] == "inline" else None
             ])