Put all Insights elements into boxes

This commit is contained in:
Mark Veidemanis 2022-07-21 13:52:17 +01:00
parent 5f2e4f9ce5
commit 9f808c43ee
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
5 changed files with 140 additions and 166 deletions

View File

@ -1,23 +1,16 @@
<div id="channels"> <div id="channels">
<div class="panel is-primary" style="max-height: 30em; overflow: auto"> {% for chan in chans %}
<p class="panel-heading"> <span class="panel-icon">
Channels <i class="fa-solid fa-hashtag" aria-hidden="true"></i>
</p> </span>
{% for chan in chans %} <span
<a class="panel-block is-active"> hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
<span class="panel-icon"> hx-post="{% url 'modal_drilldown' %}"
<i class="fa-solid fa-hashtag" aria-hidden="true"></i> hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}'
</span> hx-target="#modals-here"
<span hx-trigger="click"
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' class="button is-small">
hx-post="{% url 'modal_drilldown' %}" {{ chan }}
hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}' </span>
hx-target="#modals-here" {% endfor %}
hx-trigger="click"
class="button is-small">
{{ chan }}
</span>
</a>
{% endfor %}
</div>
</div> </div>

View File

@ -1,112 +1,105 @@
{% load static %} {% load static %}
{% load index %} {% load index %}
<div id="info"> <div
<div class="panel is-primary"> style="display: none;"
<p class="panel-heading"> hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
Information hx-vals='{"net": "{{ item.net }}", "nick": "{{ item.nick }}"}'
</p> hx-post="{% url 'chans_insights' %}"
<div class="panel-block is-active"> hx-trigger="load"
{% if item is not None %} hx-target="#channels"
<div class="table-container"> hx-swap="outerHTML">
<table class="table is-fullwidth is-hoverable"> </div>
<tbody> <div
<tr> style="display: none;"
<th>src</th> hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
<td> hx-vals='{"net": "{{ item.net }}", "nick": "{{ item.nick }}"}'
{% if item.src == 'irc' %} hx-post="{% url 'nicks_insights' %}"
<span class="icon" data-tooltip="IRC"> hx-trigger="load"
<i class="fa-solid fa-hashtag" aria-hidden="true"></i> hx-target="#nicks"
</span> hx-swap="outerHTML">
IRC </div>
{% elif item.src == 'dis' %} <div
<span class="icon" data-tooltip="Discord"> style="display: none;"
<i class="fa-brands fa-discord" aria-hidden="true"></i> hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
</span> hx-vals='{"net": "{{ item.net }}", "nick": "{{ item.nick }}"}'
Discord hx-post="{% url 'meta_insights' %}"
{% endif %} hx-trigger="load"
</td> hx-target="#meta"
</tr> hx-swap="outerHTML">
<tr> </div>
<th>nick</th> <div id="info">
<td> {% if item is not None %}
{% if item.online is True %} <div class="table-container">
<span class="icon has-text-success has-tooltip-success" data-tooltip="Online"> <table class="table is-fullwidth is-hoverable">
<i class="fa-solid fa-circle"></i> <tbody>
</span> <tr>
{{ item.nick }} <th>src</th>
{% elif item.online is False %} <td>
<span class="icon has-text-danger has-tooltip-danger" data-tooltip="Offline"> {% if item.src == 'irc' %}
<i class="fa-solid fa-circle"></i> <span class="icon" data-tooltip="IRC">
</span> <i class="fa-solid fa-hashtag" aria-hidden="true"></i>
{{ item.nick }} </span>
{% else %} IRC
<span class="icon has-text-warning has-tooltip-warning" data-tooltip="Unknown"> {% elif item.src == 'dis' %}
<i class="fa-solid fa-circle"></i> <span class="icon" data-tooltip="Discord">
</span> <i class="fa-brands fa-discord" aria-hidden="true"></i>
{{ item.nick }} </span>
{% endif %} Discord
{% if item.num_chans is not None %} {% endif %}
<span class="tag"> </td>
{{ item.num_chans }} </tr>
</span> <tr>
{% endif %} <th>nick</th>
</td> <td>
</tr> {% if item.online is True %}
<tr> <span class="icon has-text-success has-tooltip-success" data-tooltip="Online">
<th>host</th> <i class="fa-solid fa-circle"></i>
<td>{{ item.host }}</td> </span>
</tr> {{ item.nick }}
<tr> {% elif item.online is False %}
<th>actions</th> <span class="icon has-text-danger has-tooltip-danger" data-tooltip="Offline">
<td> <i class="fa-solid fa-circle"></i>
{% if item.src == 'irc' %} </span>
<button {{ item.nick }}
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' {% else %}
hx-post="{% url 'modal_insights' %}" <span class="icon has-text-warning has-tooltip-warning" data-tooltip="Unknown">
hx-vals='{"net": "{{ item.net }}", "nick": "{{ item.nick }}", "channel": "{{ item.channel }}"}' <i class="fa-solid fa-circle"></i>
hx-target="#modals-here" </span>
hx-trigger="click" {{ item.nick }}
class="button is-small"> {% endif %}
Information {% if item.num_chans is not None %}
</button> <span class="tag">
{% endif %} {{ item.num_chans }}
</td> </span>
</tr> {% endif %}
<tr> </td>
<th>net</th> </tr>
<td>{{ item.net }}</td> <tr>
</tr> <th>host</th>
</tbody> <td>{{ item.host }}</td>
</table> </tr>
</div> <tr>
{% endif %} <th>actions</th>
</div> <td>
<div {% if item.src == 'irc' %}
style="display: none;" <button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-vals='{"net": "{{ item.net }}", "nick": "{{ item.nick }}"}' hx-post="{% url 'modal_insights' %}"
hx-post="{% url 'chans_insights' %}" hx-vals='{"net": "{{ item.net }}", "nick": "{{ item.nick }}", "channel": "{{ item.channel }}"}'
hx-trigger="load" hx-target="#modals-here"
hx-target="#channels" hx-trigger="click"
hx-swap="outerHTML"> class="button is-small">
</div> Information
<div </button>
style="display: none;" {% endif %}
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' </td>
hx-vals='{"net": "{{ item.net }}", "nick": "{{ item.nick }}"}' </tr>
hx-post="{% url 'nicks_insights' %}" <tr>
hx-trigger="load" <th>net</th>
hx-target="#nicks" <td>{{ item.net }}</td>
hx-swap="outerHTML"> </tr>
</div> </tbody>
<div </table>
style="display: none;" </div>
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' {% endif %}
hx-vals='{"net": "{{ item.net }}", "nick": "{{ item.nick }}"}'
hx-post="{% url 'meta_insights' %}"
hx-trigger="load"
hx-target="#meta"
hx-swap="outerHTML">
</div>
</div>
</div> </div>

View File

@ -75,6 +75,7 @@
</div> </div>
<div class="tile is-parent"> <div class="tile is-parent">
<article class="tile is-child box"> <article class="tile is-child box">
<h5 class="subtitle is-5">Nicks</h5>
<div id="nicks"></div> <div id="nicks"></div>
</article> </article>
</div> </div>
@ -82,12 +83,14 @@
<div class="tile"> <div class="tile">
<div class="tile is-parent is-vertical"> <div class="tile is-parent is-vertical">
<article class="tile is-child box"> <article class="tile is-child box">
<h5 class="subtitle is-5">Info</h5>
<div id="info"></div> <div id="info"></div>
</article> </article>
</div> </div>
<div class="tile is-parent"> <div class="tile is-parent">
<article class="tile is-child box"> <article class="tile is-child box">
<h5 class="subtitle is-5">Meta</h5>
<div id="meta"></div> <div id="meta"></div>
</article> </article>
</div> </div>
@ -95,6 +98,7 @@
</div> </div>
<div class="tile is-parent"> <div class="tile is-parent">
<article class="tile is-child box"> <article class="tile is-child box">
<h5 class="subtitle is-5">Channels</h5>
<div id="channels"></div> <div id="channels"></div>
</article> </article>
</div> </div>

View File

@ -1,21 +1,12 @@
<div id="meta"> <div id="meta">
<div class="panel is-primary" style="max-height: 30em; overflow: auto"> <i class="fa-solid fa-hashtag" aria-hidden="true"></i>
<p class="panel-heading"> <span
Meta hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
</p> hx-post="{% url 'modal_drilldown' %}"
<a class="panel-block is-active"> hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}'
<span class="panel-icon"> hx-target="#modals-here"
<i class="fa-solid fa-hashtag" aria-hidden="true"></i> hx-trigger="click"
</span> class="button is-small">
<span bbb
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' </span>
hx-post="{% url 'modal_drilldown' %}"
hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}'
hx-target="#modals-here"
hx-trigger="click"
class="button is-small">
bbb
</span>
</a>
</div>
</div> </div>

View File

@ -1,21 +1,14 @@
<div id="nicks"> <div id="nicks">
<div class="panel is-primary" style="max-height: 30em; overflow: auto"> <span class="panel-icon">
<p class="panel-heading"> <i class="fa-solid fa-hashtag" aria-hidden="true"></i>
Nicks </span>
</p> <span
<a class="panel-block is-active"> hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
<span class="panel-icon"> hx-post="{% url 'modal_drilldown' %}"
<i class="fa-solid fa-hashtag" aria-hidden="true"></i> hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}'
</span> hx-target="#modals-here"
<span hx-trigger="click"
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' class="button is-small">
hx-post="{% url 'modal_drilldown' %}" aaa
hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}' </span>
hx-target="#modals-here"
hx-trigger="click"
class="button is-small">
aaa
</span>
</a>
</div>
</div> </div>