Urlize/linkify thoughts
* Changes to put css on the existing span rather than use a "pre", to fix an issue with wrapping long words
This commit is contained in:
parent
5dd070b043
commit
87933af7ed
|
@ -102,7 +102,12 @@ textarea::placeholder, input[type="text"]::placeholder {
|
|||
.text, .thought-end {
|
||||
max-width: 100%;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.thought .text {
|
||||
white-space: pre-wrap;
|
||||
font-family: inherit;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.main-text, .main-text p:last-child {
|
||||
|
|
|
@ -36,14 +36,14 @@
|
|||
{% for thought in thoughts %}
|
||||
<div class="thought{% if thought.uuid == highlighted %} highlighted{% endif %}" id="{{ thought.uuid }}">
|
||||
<div class="main">
|
||||
<pre class="main-text text">{{ thought.text }}</pre>
|
||||
<span class="main-text text">{{ thought.text|urlize }}</span>
|
||||
</div>
|
||||
|
||||
{% with file_type=thought.get_media_type %}
|
||||
{% if file_type or thought.extended_text.strip %}
|
||||
<div class="extended">
|
||||
{% if thought.extended_text.strip %}
|
||||
<pre class="extended-text text">{{ thought.extended_text }}</pre>
|
||||
<span class="extended-text text">{{ thought.extended_text|urlize }}</span>
|
||||
{% endif %}
|
||||
{% if file_type == "png" or file_type == "jpeg" %}
|
||||
<img src="{{ thought.media.url }}" class="extended-media" alt="{{ thought.media_alt }}">
|
||||
|
|
Loading…
Reference in New Issue