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