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,14 +38,13 @@
</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>
<div> <div class="nowrap-child">
<span id="spinner" class="button is-light has-text-link is-loading htmx-indicator">Static</span> <span id="spinner" class="button is-light has-text-link is-loading htmx-indicator">Static</span>
</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>
{% if exemption is not None %}
<div class="nowrap-child">
<i class="fa-solid fa-book-bible"></i>
</div> </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>
<div class="nowrap-parent">
<div class="nowrap-child">
{% if item.online is True %} {% if item.online is True %}
<span class="icon has-text-success has-tooltip-success" data-tooltip="Online"> <span class="icon has-text-success has-tooltip-success" data-tooltip="Online">
<i class="fa-solid fa-circle"></i> <i class="fa-solid fa-circle"></i>
</span> </span>
{{ item.nick }}
{% elif item.online is False %} {% elif item.online is False %}
<span class="icon has-text-danger has-tooltip-danger" data-tooltip="Offline"> <span class="icon has-text-danger has-tooltip-danger" data-tooltip="Offline">
<i class="fa-solid fa-circle"></i> <i class="fa-solid fa-circle"></i>
</span> </span>
{{ item.nick }}
{% 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>
<div class="nowrap-child">
{{ item.nick }}
</div>
{% if item.num_chans is not None %} {% if item.num_chans is not None %}
<div class="nowrap-child">
<span class="tag"> <span class="tag">
{{ item.num_chans }} {{ item.num_chans }}
</span> </span>
</div>
{% endif %} {% endif %}
</div>
</td> </td>
<td> <td>
{% if item.src == 'irc' %} {% if item.src == 'irc' %}
@ -155,12 +160,18 @@
{% endif %} {% endif %}
</td> </td>
<td> <td>
<div class="nowrap-parent">
<div class="nowrap-child">
{{ item.channel }} {{ item.channel }}
</div>
{% if item.num_users is not None %} {% if item.num_users is not None %}
<div class="nowrap-child">
<span class="tag"> <span class="tag">
{{ item.num_users }} {{ item.num_users }}
</span> </span>
</div>
{% endif %} {% endif %}
</div>
</td> </td>
<td>{{ item.net }}</td> <td>{{ item.net }}</td>
</tr> </tr>