nopaque/app/templates/corpora/analysis.html.j2

92 lines
3.0 KiB
Plaintext
Raw Normal View History

{% extends "base.html.j2" %}
{% import "materialize/wtf.html.j2" as wtf %}
2023-04-27 13:11:18 +00:00
{% import 'corpora/_analysis/concordance.html.j2' as concordance_extension %}
{% import 'corpora/_analysis/reader.html.j2' as reader_extension %}
{% import 'corpora/_analysis/static_visualization.html.j2' as static_visualization_extension %}
{% set extensions =
{
'concordance-extension': concordance_extension,
'reader-extension': reader_extension,
'static-visualizations-extension': static_visualization_extension
}
%}
2020-06-19 10:30:05 +00:00
{% block main_attribs %} class="service-scheme" data-service="corpus-analysis" id="corpus-analysis-app-container"{% endblock main_attribs %}
{% block page_content %}
2021-11-16 14:23:57 +00:00
<ul class="row tabs no-autoinit" id="corpus-analysis-app-extension-tabs">
2023-07-13 10:42:47 +00:00
<li class="tab col s3"><a class="active" href="#corpus-analysis-app-home-container"><i class="nopaque-icons service-icons left" data-service="corpus-analysis"></i>Corpus analysis</a></li>
{% for id, extension in extensions.items() if extension.name != 'Static Visualization (beta)' %}
<li class="tab col s3">
<a href="#{{ id }}-container"><i class="material-icons left">extension.icon</i>{{ extension.name }}</a>
</li>
{% endfor %}
2021-11-16 14:23:57 +00:00
</ul>
2023-07-13 10:42:47 +00:00
<div id="corpus-analysis-app-home-container">
<h1>{{ title }}</h1>
2021-11-16 14:23:57 +00:00
2023-07-13 10:42:47 +00:00
<div class="row" id="corpus-analysis-app-extension-cards">
{% for id, extension in extensions.items() if extension.name != 'Static Visualization (beta)' %}
2023-06-14 11:57:58 +00:00
<div class="col s3">
<div class="card extension-selector hoverable" data-target="{{ id }}-container">
2023-06-14 11:57:58 +00:00
<div class="card-content">
<span class="card-title">{{ extension.name }}</span>
<p>{{ extension.description }}</p>
</div>
</div>
</div>
2023-06-14 11:57:58 +00:00
{% endfor %}
2023-06-13 13:41:34 +00:00
</div>
{{ static_visualization_extension.container_content }}
2023-06-13 13:41:34 +00:00
</div>
{% for id, extension in extensions.items() if extension.name != 'Static Visualization (beta)' %}
<div id="{{ id }}-container">
{{ extension.container_content(id) }}
</div>
{% endfor %}
2020-10-29 13:45:55 +00:00
{% endblock page_content %}
2020-04-02 12:22:03 +00:00
2021-11-16 14:23:57 +00:00
{% block modals %}
2020-10-29 13:45:55 +00:00
{{ super() }}
2021-11-16 14:23:57 +00:00
<div class="modal no-autoinit" id="corpus-analysis-app-init-modal">
<div class="modal-content">
<h4>We are preparing your analysis session</h4>
<p>
Our server works as hard as it can to prepare your analysis session. Please be patient and give it some time.<br>
If initialization takes longer than usual or an error occurs, <a onclick="window.location.reload()" href="#">reload the page</a>.
2021-11-16 14:23:57 +00:00
</p>
<div class="progress">
2021-11-16 14:23:57 +00:00
<div class="indeterminate"></div>
</div>
<p class="status-text"></p>
<p class="errors error-color-text hide"></p>
2022-05-17 13:31:05 +00:00
</div>
</div>
2022-10-20 13:52:25 +00:00
{% for id, extension in extensions.items() %}
{{ extension.modals(id) }}
{% endfor %}
2021-11-16 14:23:57 +00:00
{% endblock modals %}
2020-08-21 14:33:47 +00:00
2021-11-16 14:23:57 +00:00
{% block scripts %}
{{ super() }}
<script>
const corpusAnalysisApp = new CorpusAnalysisApp({{ corpus.hashid|tojson }});
</script>
2021-12-09 14:39:45 +00:00
{% for id, extension in extensions.items() %}
{{ extension.scripts(id) }}
{% endfor %}
<script>
corpusAnalysisApp.init();
</script>
2021-11-16 14:23:57 +00:00
{% endblock scripts %}