86 lines
2.1 KiB
HTML
86 lines
2.1 KiB
HTML
|
{% 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-parent is-vertical">
|
||
|
<div class="tile is-child box">
|
||
|
<form method="POST">
|
||
|
{% csrf_token %}
|
||
|
<div class="field">
|
||
|
<label class="label">Search</label>
|
||
|
<div class="field-body">
|
||
|
<div class="field">
|
||
|
<div class="control is-expanded has-icons-left">
|
||
|
<input name="query" class="input" type="text" placeholder="nickname">
|
||
|
<span class="icon is-small is-left">
|
||
|
<i class="fas fa-magnifying-glass"></i>
|
||
|
</span>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="field">
|
||
|
<div class="control">
|
||
|
<button class="button is-primary is-fullwidth" hx-post="{% url 'search_insights' %}" hx-trigger="click" hx-target="#results" hx-swap="outerHTML">
|
||
|
Search
|
||
|
</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
|
||
|
<div id="results">
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<div class="tile is-parent">
|
||
|
<p> 2</p>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
{% endblock %}
|