neptune/core/templates/ui/insights/insights.html

100 lines
2.9 KiB
HTML
Raw Permalink Normal View History

2022-07-21 12:51:55 +00:00
{% extends "base.html" %}
{% load static %}
{% block content %}
<script>
// tabbed browsing for the modal
function initTabs() {
TABS.forEach((tab) => {
tab.addEventListener('click', (e) => {
let selected = tab.getAttribute('data-tab');
updateActiveTab(tab);
updateActiveContent(selected);
})
})
}
function updateActiveTab(selected) {
TABS.forEach((tab) => {
if (tab && tab.classList.contains(ACTIVE_CLASS)) {
tab.classList.remove(ACTIVE_CLASS);
}
});
selected.classList.add(ACTIVE_CLASS);
}
function updateActiveContent(selected) {
CONTENT.forEach((item) => {
if (item && item.classList.contains(ACTIVE_CLASS)) {
item.classList.remove(ACTIVE_CLASS);
}
let data = item.getAttribute('data-content');
if (data === selected) {
item.classList.add(ACTIVE_CLASS);
}
});
}
</script>
<style>
.icon { border-bottom: 0px !important;}
</style>
<div class="tile is-ancestor">
<div class="tile is-vertical is-9">
<div class="tile">
<div class="tile is-parent is-vertical">
<article class="tile is-child box">
<form method="POST">
{% csrf_token %}
2022-08-03 06:20:30 +00:00
<div class="field has-addons">
<div class="control is-expanded has-icons-left">
<input id="query" name="query" class="input" type="text" placeholder="nickname">
<span class="icon is-small is-left">
<i class="fas fa-magnifying-glass"></i>
</span>
2022-07-21 12:51:55 +00:00
</div>
<div class="control">
<button
2022-08-03 06:20:30 +00:00
class="button is-info is-fullwidth"
hx-post="{% url 'search_insights' %}"
hx-trigger="click"
hx-target="#info"
hx-swap="outerHTML">
Search
</button>
</div>
</div>
</form>
</article>
</div>
<div class="tile is-parent">
<article class="tile is-child box">
2022-07-21 12:52:17 +00:00
<h5 class="subtitle is-5">Nicks</h5>
<div id="nicks"></div>
</article>
</div>
2022-07-21 12:51:55 +00:00
</div>
<div class="tile">
<div class="tile is-parent is-vertical">
<article class="tile is-child box">
2022-07-21 12:52:17 +00:00
<h5 class="subtitle is-5">Info</h5>
<div id="info"></div>
</article>
2022-07-21 12:51:55 +00:00
</div>
<div class="tile is-parent">
<article class="tile is-child box">
2022-07-21 12:52:17 +00:00
<h5 class="subtitle is-5">Meta</h5>
<div id="meta"></div>
</article>
</div>
</div>
</div>
<div class="tile is-parent">
<article class="tile is-child box">
2022-07-21 12:52:17 +00:00
<h5 class="subtitle is-5">Channels</h5>
<div id="channels"></div>
</article>
2022-07-21 12:51:55 +00:00
</div>
2022-07-21 12:52:06 +00:00
</div>
<div id="modals-here"></div>
{% endblock %}