~metalune/simplytranslate_web

37a5ffc48627d9356d521e86982508a57affdb76 — fattalion 4 months ago af1b854
Show newlines in translated text
2 files changed, 19 insertions(+), 2 deletions(-)

M static/home.css
M templates/index.html
M static/home.css => static/home.css +14 -0
@@ 21,3 21,17 @@ body {
    width: 20rem;
    margin: auto;
}

#translated_text_container {
    /* Don't use the monospace default. */
    font-family: inherit;

    /* Remove the default top and bottom margins. */
    margin: 0;

    /* Make it not take the whole width. */
    display: inline-block;

    /* Align the translated text to the start. */
    text-align: start;
}

M templates/index.html => templates/index.html +5 -2
@@ 54,8 54,11 @@
        <br>

        {% if translation %}
            <b>Translation ({{ engine }}):</b><br>
            {{ translation }}
            <b>Translation ({{ engine }}):</b>
            {# This is wrapped in a `div` so that we can center it while keeping the
            text left-aligned.
            #}
            <div><pre id="translated_text_container">{{ translation }}</pre></div>
        {% endif %}

        <br>