NexusDashboard/app/templates/character/view.html.j2
aronwk-aaron b9fc039a7e LAZY LOADING
updated a bunch of packages
2023-11-18 00:41:35 -06:00

47 lines
1.1 KiB
Django/Jinja

{% extends 'base.html.j2' %}
{% block title %}
Viewing {{ character_data.name }}
{% endblock %}
{% block content_before %}
Viewing {{ character_data.name }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-sm">
{% with character=character_data%}
{% include 'partials/_character.html.j2' %}
{% endwith %}
</div>
<div class="col-sm" id="charxml">
Loading Character Data
{% include 'partials/_loading.html' %}
</div>
</div>
{% endblock content %}
{% block content_after %}
<br/>
<br/>
<h3 class="text-center">Properties</h3>
<hr class="bg-primary"/>
<div class="card-columns">
{% for property in character_data.properties_owner %}
{% include 'partials/_property.html.j2' %}
{% endfor %}
</div>
{% endblock content_after %}
{% block js %}
{{ super() }}
<script>
fetch({{ url_for("characters.chardata", id=character_data.id)|tojson }})
.then(response => response.text())
.then(text => {
setInnerHTML(document.getElementById("charxml"), text);
})
</script>
{% endblock js %}