Use the alternative nowrap helper for options alignment

This commit is contained in:
Mark Veidemanis 2022-08-03 07:20:30 +01:00
parent 8d7a1d2f59
commit 6eea7f1965
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
3 changed files with 66 additions and 50 deletions

View File

@ -48,6 +48,12 @@
white-space: -o-pre-wrap; /* Opera 7 */ white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* IE */ word-wrap: break-word; /* IE */
} }
.nowrap-parent {
white-space: nowrap;
}
.nowrap-child {
display: inline-block;
}
.slider-output { .slider-output {
width: 4rem !important; width: 4rem !important;
} }

View File

@ -38,17 +38,16 @@
</div> </div>
</div> </div>
<div class="column is-3"> <div class="column is-3">
<div style="overflow: hidden;"> <div class="nowrap-parent">
<div <div
_="on click toggle .is-hidden on #options" _="on click toggle .is-hidden on #options"
class="button is-light has-text-link is-right" class="button is-light has-text-link is-right nowrap-child">
style="float: left;"> Options
Options
</div>
<div>
<span id="spinner" class="button is-light has-text-link is-loading htmx-indicator">Static</span>
</div>
</div> </div>
<div class="nowrap-child">
<span id="spinner" class="button is-light has-text-link is-loading htmx-indicator">Static</span>
</div>
</div>
</div> </div>
</div> </div>
@ -132,7 +131,7 @@
<label class="checkbox"> <label class="checkbox">
<input type="checkbox" name="check-sentiment" <input type="checkbox" name="check-sentiment"
_="on click toggle @disabled on #sliderWithValue then toggle @disabled on #sentiment"> _="on click toggle @disabled on #sliderWithValue then toggle @disabled on #sentiment">
Check sentiment Check sentiment
</label> </label>
</div> </div>
</div> </div>

View File

@ -5,29 +5,28 @@
<div style="display: none" id="jsonData" data-json="{{ data }}"> <div style="display: none" id="jsonData" data-json="{{ data }}">
</div> </div>
<div class="has-text-grey-light level"> <div class="has-text-grey-light nowrap-parent">
<div class="level-left"> <div class="nowrap-child block">
<div class="level-item">
<i class="fa-solid fa-chart-mixed"></i> <i class="fa-solid fa-chart-mixed"></i>
</div> </div>
<div class="level-item"> <div class="nowrap-child">
<p>{{ card }} hits</p> <p>{{ card }} hits</p>
</div> </div>
{% if redacted != 0 %} {% if redacted != 0 %}
<div class="level-item"> <div class="nowrap-child">
<p>{{ redacted }} redacted</p> <p>{{ redacted }} redacted</p>
</div> </div>
{% endif %} {% endif %}
{% if exemption is not None %}
<div class="level-item"> <div class="nowrap-child">
<p>god mode</p>
</div>
{% endif %}
<div class="level-item">
<p>{{ took }}ms</p> <p>{{ took }}ms</p>
</div> </div>
</div> {% if exemption is not None %}
<div class="nowrap-child">
<i class="fa-solid fa-book-bible"></i>
</div>
{% endif %}
</div> </div>
<div class="box"> <div class="box">
<div style="height: 30rem"> <div style="height: 30rem">
@ -119,27 +118,33 @@
<td style="max-width: 10em" class="wrap">{{ item.msg }}</td> <td style="max-width: 10em" class="wrap">{{ item.msg }}</td>
<td>{{ item.host }}</td> <td>{{ item.host }}</td>
<td> <td>
{% if item.online is True %} <div class="nowrap-parent">
<span class="icon has-text-success has-tooltip-success" data-tooltip="Online"> <div class="nowrap-child">
<i class="fa-solid fa-circle"></i> {% if item.online is True %}
</span> <span class="icon has-text-success has-tooltip-success" data-tooltip="Online">
{{ item.nick }} <i class="fa-solid fa-circle"></i>
{% elif item.online is False %} </span>
<span class="icon has-text-danger has-tooltip-danger" data-tooltip="Offline"> {% elif item.online is False %}
<i class="fa-solid fa-circle"></i> <span class="icon has-text-danger has-tooltip-danger" data-tooltip="Offline">
</span> <i class="fa-solid fa-circle"></i>
{{ item.nick }} </span>
{% else %} {% else %}
<span class="icon has-text-warning has-tooltip-warning" data-tooltip="Unknown"> <span class="icon has-text-warning has-tooltip-warning" data-tooltip="Unknown">
<i class="fa-solid fa-circle"></i> <i class="fa-solid fa-circle"></i>
</span> </span>
{{ item.nick }} {% endif %}
{% endif %} </div>
{% if item.num_chans is not None %} <div class="nowrap-child">
<span class="tag"> {{ item.nick }}
{{ item.num_chans }} </div>
</span> {% if item.num_chans is not None %}
{% endif %} <div class="nowrap-child">
<span class="tag">
{{ item.num_chans }}
</span>
</div>
{% endif %}
</div>
</td> </td>
<td> <td>
{% if item.src == 'irc' %} {% if item.src == 'irc' %}
@ -155,12 +160,18 @@
{% endif %} {% endif %}
</td> </td>
<td> <td>
{{ item.channel }} <div class="nowrap-parent">
{% if item.num_users is not None %} <div class="nowrap-child">
<span class="tag"> {{ item.channel }}
{{ item.num_users }} </div>
</span> {% if item.num_users is not None %}
{% endif %} <div class="nowrap-child">
<span class="tag">
{{ item.num_users }}
</span>
</div>
{% endif %}
</div>
</td> </td>
<td>{{ item.net }}</td> <td>{{ item.net }}</td>
</tr> </tr>