mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 10:54:18 +00:00
Some fixes and improve jinja2 template performance by reducing include statements
This commit is contained in:
parent
54c4295bf7
commit
99d7a8bdfc
@ -1,25 +1,3 @@
|
||||
/* #region sidenav-fixed */
|
||||
/*
|
||||
* The sidenav-fixed class is used which causes the sidenav to be fixed and open
|
||||
* on large screens and hides to the regular functionality on smaller screens.
|
||||
* In order to prevent the sidenav to overlap the content, the content (header, main and footer)
|
||||
* gets an offset equal to the width of the sidenav.
|
||||
*
|
||||
* Read more: https://materializecss.com/sidenav.html#variations
|
||||
*/
|
||||
@media only screen and (min-width: 993px) {
|
||||
body[data-sidenav-fixed="true" i] header,
|
||||
body[data-sidenav-fixed="true" i] main,
|
||||
body[data-sidenav-fixed="true" i] footer {
|
||||
padding-left: 300px;
|
||||
}
|
||||
|
||||
body[data-sidenav-fixed="true" i] .navbar-fixed > nav {
|
||||
width: calc(100% - 300px);
|
||||
}
|
||||
}
|
||||
/* #endregion sidenav-fixed */
|
||||
|
||||
/* #region sticky-footer */
|
||||
/*
|
||||
* Sticky Footer:
|
||||
@ -32,13 +10,13 @@
|
||||
*
|
||||
* Read more: https://materializecss.com/footer.html#sticky-footer
|
||||
*/
|
||||
body[data-sticky-footer="true" i] {
|
||||
body {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
body[data-sticky-footer="true" i] main {
|
||||
main {
|
||||
flex: 1 0 auto;
|
||||
}
|
||||
/* #endregion sticky-footer */
|
||||
|
@ -159,19 +159,21 @@ nopaque.App = class App {
|
||||
|
||||
// Header navigation processes and services Dropdown.
|
||||
M.Dropdown.init(
|
||||
document.querySelector('#nav-processes-and-services-dropdown-trigger'),
|
||||
document.querySelector('#navbar-data-processing-and-analysis-dropdown-trigger'),
|
||||
{
|
||||
constrainWidth: false,
|
||||
container: document.querySelector('#dropdowns'),
|
||||
coverTrigger: false
|
||||
}
|
||||
);
|
||||
|
||||
// Header navigation account Dropdown.
|
||||
M.Dropdown.init(
|
||||
document.querySelector('#nav-account-dropdown-trigger'),
|
||||
document.querySelector('#navbar-account-dropdown-trigger'),
|
||||
{
|
||||
alignment: 'right',
|
||||
constrainWidth: false,
|
||||
container: document.querySelector('#dropdowns'),
|
||||
coverTrigger: false
|
||||
}
|
||||
);
|
||||
|
@ -1,52 +0,0 @@
|
||||
<div id="data-processing-and-analysis-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<div class="card-panel primary-color white-text">
|
||||
<h4 class="m-3"><i class="material-icons left" style="font-size: inherit; line-height: inherit;">miscellaneous_services</i>Data Processing & Analysis</h4>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col s12 m6 l3 center-align hoverable" style="position: relative;">
|
||||
<a href="{{ url_for('services.file_setup_pipeline') }}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;"></a>
|
||||
<i class="large nopaque-icons service-icons service-color-text text-darken" data-service="file-setup-pipeline"></i>
|
||||
<br>
|
||||
<b class="service-color-text text-darken" data-service="file-setup-pipeline">File Setup</b>
|
||||
<p class="light">Digital copies of text based research data (books, letters, etc.) often comprise various files and formats. nopaque converts and merges those files to facilitate further processing and the application of other services.</p>
|
||||
</div>
|
||||
<div class="col s12 m6 l3 center-align center-align hoverable" style="position: relative;">
|
||||
<a href="{{ url_for('services.tesseract_ocr_pipeline') }}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;"></a>
|
||||
<i class="large nopaque-icons service-icons service-color-text text-darken" data-service="tesseract-ocr-pipeline"></i>
|
||||
<br>
|
||||
<b class="service-color-text text-darken" data-service="tesseract-ocr-pipeline">Optical Character Recognition</b>
|
||||
<p class="light">nopaque converts your image data – like photos or scans – into text data through OCR making it machine readable. This step enables you to proceed with further computational analysis of your documents.</p>
|
||||
</div>
|
||||
{% if config.NOPAQUE_TRANSKRIBUS_ENABLED %}
|
||||
<div class="col s12 m6 l3 center-align center-align hoverable" style="position: relative;">
|
||||
<a href="{{ url_for('services.transkribus_htr_pipeline') }}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;"></a>
|
||||
<i class="large nopaque-icons service-icons service-color-text text-darken" data-service="transkribus-htr-pipeline"></i>
|
||||
<br>
|
||||
<b class="service-color-text text-darken" data-service="transkribus-htr-pipeline">Transkribus HTR Pipeline</b>
|
||||
<p class="light">nopaque converts your image data – like photos or scans – into text data through HTR making it machine readable. This step enables you to proceed with further computational analysis of your documents.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col s12 m6 l3 center-align center-align hoverable" style="position: relative;">
|
||||
<a href="{{ url_for('services.spacy_nlp_pipeline') }}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;"></a>
|
||||
<i class="large nopaque-icons service-icons service-color-text text-darken" data-service="spacy-nlp-pipeline"></i>
|
||||
<br>
|
||||
<b class="service-color-text text-darken" data-service="spacy-nlp-pipeline">Natural Language Processing</b>
|
||||
<p class="light">By means of computational linguistic data processing (tokenization, lemmatization, part-of-speech tagging and named-entity recognition) nopaque extracts additional information from your text.</p>
|
||||
</div>
|
||||
<div class="col s12 m6 l3 center-align center-align hoverable" style="position: relative;">
|
||||
<a href="{{ url_for('services.corpus_analysis') }}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;"></a>
|
||||
<i class="large nopaque-icons service-icons service-color-text text-darken" data-service="corpus-analysis"></i>
|
||||
<br>
|
||||
<b class="service-color-text text-darken" data-service="corpus-analysis">Corpus analysis</b>
|
||||
<p class="light">nopaque lets you create and upload as many text corpora as you want. It makes use of CQP Query Language, which allows for complex search requests with the aid of metadata and NLP tags.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn-flat modal-close">Close</a>
|
||||
</div>
|
||||
</div>
|
@ -1,32 +0,0 @@
|
||||
<div id="terms-of-use-modal" class="modal modal-fixed-footer">
|
||||
<div class="modal-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h1 id="title">Terms of use</h1>
|
||||
</div>
|
||||
<div class="col s12">
|
||||
<div class="switch">
|
||||
<label>
|
||||
DE
|
||||
<input type="checkbox" id="terms-of-use-modal-switch">
|
||||
<span class="lever"></span>
|
||||
EN
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
<div class="terms-of-use-modal-content hide">
|
||||
{% include "main/terms_of_use_en.html.j2" %}
|
||||
</div>
|
||||
<div class="terms-of-use-modal-content">
|
||||
{% include "main/terms_of_use_de.html.j2" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span style="margin-right:20px;">I have taken note of the new GTC and agree to their validity in the context of my further use.</span>
|
||||
<a href="#!" class="modal-close waves-effect waves-green btn">Yes</a>
|
||||
</div>
|
||||
</div>
|
@ -1,9 +0,0 @@
|
||||
{% if current_user.is_authenticated %}
|
||||
<ul class="dropdown-content" id="nav-account-dropdown-content">
|
||||
<li><a href="#!">Logged in as {{ current_user.username }}<br><{{ current_user.email }}></a></li>
|
||||
<li class="divider" tabindex="-1"></li>
|
||||
<li><a href="{{ url_for('users.user', user_id=current_user.id) }}"><i class="material-icons">person</i>Your profile</a></li>
|
||||
<li><a href="{{ url_for('settings.settings') }}"><i class="material-icons left">settings</i>Settings</a></li>
|
||||
<li><a href="{{ url_for('auth.logout') }}"><i class="material-icons left">logout</i>Log out</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
@ -1,40 +0,0 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s6 m3">
|
||||
<a href="https://www.dfg.de/">
|
||||
<img class="responsive-img" src="{{ url_for('static', filename='images/logo_-_dfg.gif') }}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col s6 m3 offset-m1 center-align">
|
||||
<a href="https://www.uni-bielefeld.de/sfb1288/">
|
||||
<img class="responsive-img" src="{{ url_for('static', filename='images/logo_-_sfb_1288.png') }}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col s12 m3 offset-m1">
|
||||
<h5 class="white-text">Legal Notice</h5>
|
||||
<ul>
|
||||
<li><a class="grey-text text-lighten-3" href="https://www.uni-bielefeld.de/(en)/impressum/">Legal Notice</a></li>
|
||||
<li><a class="grey-text text-lighten-3" href="{{ url_for('main.privacy_policy') }}">Privacy statement (GDPR)</a></li>
|
||||
<li><a class="grey-text text-lighten-3" href="{{ url_for('main.terms_of_use') }}">Terms of use</a></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-copyright">
|
||||
<div class="container">
|
||||
<div class="row" style="margin-bottom: 0;">
|
||||
<div class="col s12 m3">
|
||||
<span>© 2020 Bielefeld University</span>
|
||||
</div>
|
||||
<div class="col s12 m2">
|
||||
<span class="right"><b>Version {{ config.NOPAQUE_VERSION }}</b></span>
|
||||
</div>
|
||||
<div class="col s12 m7 right-align">
|
||||
<a class="btn-small waves-effect waves-light" href="{{ url_for('main.faq') }}"><i class="left material-icons">info_outline</i>Frequently Asked Questions</a>
|
||||
<a class="btn-small waves-effect waves-light" href="mailto:{{ config.NOPAQUE_SERVICE_DESK }}"><i class="left material-icons">mail</i>Report an issue</a>
|
||||
<a class="btn-small waves-effect waves-light" href="https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque" target="_blank"><i class="left material-icons">code</i>GitLab</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,2 +0,0 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
@ -1,5 +0,0 @@
|
||||
{% if current_user.is_authenticated and not current_user.terms_of_use_accepted %}
|
||||
{% include "_base/_modals/terms_of_use.html.j2" %}
|
||||
{% endif %}
|
||||
|
||||
{% include "_base/_modals/data-processing-and-analysis.html.j2" %}
|
@ -1,95 +0,0 @@
|
||||
{% if current_user.is_authenticated %}
|
||||
{# menu icon #}
|
||||
{# shown for small/medium devices #}
|
||||
<a href="#!" class="sidenav-trigger" data-target="sidenav"><i class="material-icons">menu</i></a>
|
||||
|
||||
{# nopaque logo #}
|
||||
{# shown for large devices #}
|
||||
<a href="{{ url_for('main.index') }}" class="brand-logo hide-on-med-and-down" style="height: 100%;">
|
||||
<img src="{{ url_for('static', filename='images/nopaque_-_logo.png') }}" alt="" class="mx-3 py-3" style="height: 100%;">
|
||||
</a>
|
||||
|
||||
{# left aligned navigation items #}
|
||||
{# shown for large devices #}
|
||||
<ul class="hide-on-med-and-down" style="margin-left: calc(57px + 1.5rem);">
|
||||
{# dashboard #}
|
||||
<li {% if request.path == url_for('main.dashboard') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('main.dashboard') }}">
|
||||
<i class="material-icons left">dashboard</i>
|
||||
Dashboard
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{# processes & services #}
|
||||
<li>
|
||||
<a href="#data-processing-and-analysis-modal" class="modal-trigger">
|
||||
<i class="material-icons left">miscellaneous_services</i>
|
||||
Data Processing & Analysis
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{# contributions #}
|
||||
<li {% if request.path == url_for('contributions.index') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('contributions.index') }}">
|
||||
<i class="material-icons left">new_label</i>
|
||||
Contributions
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{# social #}
|
||||
<li {% if request.path == url_for('main.social') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('main.social') }}">
|
||||
<i class="material-icons left">groups</i>
|
||||
Social
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
{# nopaque logo+wordmark+slogan #}
|
||||
{# shown for large devices #}
|
||||
<a href="{{ url_for('main.index') }}" class="brand-logo hide-on-med-and-down" style="height: 100%;">
|
||||
<img src="{{ url_for('static', filename='images/nopaque_-_logo+wordmark+slogan.png') }}" alt="" class="mx-3 py-3" style="height: 100%;">
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{# nopaque logo+wordmark #}
|
||||
{# small/medium devices #}
|
||||
<a href="{{ url_for('main.index') }}" class="brand-logo center hide-on-large-only" style="height: 100%;">
|
||||
<img src="{{ url_for('static', filename='images/nopaque_-_logo+wordmark.png') }}" alt="" class="py-3" style="height: 100%;">
|
||||
</a>
|
||||
|
||||
{# right aligned navigation items #}
|
||||
{# large devices #}
|
||||
<ul class="right hide-on-med-and-down" style="height: 64px;">
|
||||
{# manual #}
|
||||
<li class="tooltipped {% if request.path == url_for('main.manual') %}active{% endif %}" data-position="bottom" data-tooltip="Manual">
|
||||
<a href="{{ url_for('main.manual') }}">
|
||||
<i class="material-icons">help_outline</i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{# news #}
|
||||
<li class="tooltipped {% if request.path == url_for('main.news') %}active{% endif %}" data-position="bottom" data-tooltip="News">
|
||||
<a href="{{ url_for('main.news') }}">
|
||||
<i class="material-icons">email</i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
{# avatar #}
|
||||
<li style="height: 100%;">
|
||||
<a href="#!" class="dropdown-trigger no-autoinit" data-target="nav-account-dropdown-content" id="nav-account-dropdown-trigger" style="height: 100%;">
|
||||
<img src="{{ url_for('users.user_avatar', user_id=current_user.id) }}" alt="" class="circle py-3" style="height: 100%;">
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
{# log in #}
|
||||
<li {% if request.path == url_for('auth.login') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('auth.login') }}">Log in</a>
|
||||
</li>
|
||||
{# register #}
|
||||
<li {% if request.path == url_for('auth.register') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('auth.register') }}" class="waves-effect waves-light btn primary-color lighten">Register</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
@ -1,113 +0,0 @@
|
||||
<script src="{{ url_for('static', filename='external/materialize/js/materialize.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='external/JSON-Patch/js/fast-json-patch.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='external/list.js/js/list.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='external/pako/js/pako_inflate.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='external/plotly.js/js/plotly.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='external/socket.io/js/socket.io.min.js') }}"></script>
|
||||
{% assets
|
||||
filters='rjsmin',
|
||||
output='gen/nopaque.%(version)s.js',
|
||||
'js/index.js',
|
||||
'js/app.js',
|
||||
'js/utils.js',
|
||||
|
||||
'js/forms/index.js',
|
||||
'js/forms/base-form.js',
|
||||
'js/forms/create-contribution-form.js',
|
||||
'js/forms/create-corpus-file-form.js',
|
||||
'js/forms/create-job-form.js',
|
||||
|
||||
'js/resource-displays/index.js',
|
||||
'js/resource-displays/resource-display.js',
|
||||
'js/resource-displays/corpus-display.js',
|
||||
'js/resource-displays/job-display.js',
|
||||
|
||||
'js/resource-lists/index.js',
|
||||
'js/resource-lists/resource-list.js',
|
||||
'js/resource-lists/admin-user-list.js',
|
||||
'js/resource-lists/corpus-file-list.js',
|
||||
'js/resource-lists/corpus-follower-list.js',
|
||||
'js/resource-lists/corpus-list.js',
|
||||
'js/resource-lists/corpus-text-info-list.js',
|
||||
'js/resource-lists/corpus-token-list.js',
|
||||
'js/resource-lists/detailed-public-corpus-list.js',
|
||||
'js/resource-lists/job-input-list.js',
|
||||
'js/resource-lists/job-list.js',
|
||||
'js/resource-lists/job-result-list.js',
|
||||
'js/resource-lists/public-corpus-list.js',
|
||||
'js/resource-lists/public-user-list.js',
|
||||
'js/resource-lists/spacy-nlp-pipeline-model-list.js',
|
||||
'js/resource-lists/tesseract-ocr-pipeline-model-list.js',
|
||||
|
||||
'js/requests/index.js',
|
||||
'js/requests/admin.js',
|
||||
'js/requests/contributions.js',
|
||||
'js/requests/corpora.js',
|
||||
'js/requests/jobs.js',
|
||||
'js/requests/users.js',
|
||||
|
||||
'js/corpus-analysis/index.js',
|
||||
'js/corpus-analysis/cqi/index.js',
|
||||
'js/corpus-analysis/cqi/constants.js',
|
||||
'js/corpus-analysis/cqi/errors.js',
|
||||
'js/corpus-analysis/cqi/status.js',
|
||||
'js/corpus-analysis/cqi/api/index.js',
|
||||
'js/corpus-analysis/cqi/api/client.js',
|
||||
'js/corpus-analysis/cqi/models/index.js',
|
||||
'js/corpus-analysis/cqi/models/resource.js',
|
||||
'js/corpus-analysis/cqi/models/attributes.js',
|
||||
'js/corpus-analysis/cqi/models/subcorpora.js',
|
||||
'js/corpus-analysis/cqi/models/corpora.js',
|
||||
'js/corpus-analysis/cqi/client.js',
|
||||
'js/corpus-analysis/query-builder/index.js',
|
||||
'js/corpus-analysis/query-builder/element-references.js',
|
||||
'js/corpus-analysis/query-builder/query-builder.js',
|
||||
'js/corpus-analysis/query-builder/structural-attribute-builder-functions.js',
|
||||
'js/corpus-analysis/query-builder/token-attribute-builder-functions.js',
|
||||
'js/corpus-analysis/app.js',
|
||||
'js/corpus-analysis/concordance-extension.js',
|
||||
'js/corpus-analysis/reader-extension.js',
|
||||
'js/corpus-analysis/static-visualization-extension.js'
|
||||
-%}
|
||||
<script src="{{ ASSET_URL }}"></script>
|
||||
{% endassets -%}
|
||||
|
||||
<script>
|
||||
// TODO: Implement an app.run method and use this for all of the following
|
||||
const app = new nopaque.App();
|
||||
app.init();
|
||||
|
||||
{% if current_user.is_authenticated -%}
|
||||
// TODO: Set this as a property of the app object
|
||||
const currentUserId = {{ current_user.hashid|tojson }};
|
||||
|
||||
// Subscribe to the current user's data events
|
||||
app.subscribeUser(currentUserId)
|
||||
.catch((error) => {throw JSON.stringify(error);});
|
||||
|
||||
// Get the current user's data
|
||||
app.getUser(currentUserId, true, true)
|
||||
.catch((error) => {throw JSON.stringify(error);});
|
||||
|
||||
{% if not current_user.terms_of_use_accepted -%}
|
||||
M.Modal.getInstance(document.querySelector('#terms-of-use-modal')).open();
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
// Display flashed messages
|
||||
for (let [category, message] of {{ get_flashed_messages(with_categories=True)|tojson }}) {
|
||||
app.flash(message, message);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
let languageModalSwitch = document.querySelector('#terms-of-use-modal-switch');
|
||||
let termsOfUseModalContent = document.querySelectorAll('.terms-of-use-modal-content');
|
||||
if (languageModalSwitch) {
|
||||
languageModalSwitch.addEventListener('change', function() {
|
||||
termsOfUseModalContent.forEach(content => {
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
@ -1,77 +0,0 @@
|
||||
<ul class="sidenav {{ 'sidenav-fixed' if sidenav_fixed else '' }}" id="sidenav">
|
||||
{# user view #}
|
||||
<li>
|
||||
<div class="user-view">
|
||||
<div class="background primary-color"></div>
|
||||
<a><img class="circle" src="{{ url_for('users.user_avatar', user_id=current_user.id) }}" alt=""></a>
|
||||
<a><span class="white-text name">{{ current_user.username }}</span></a>
|
||||
<a><span class="white-text email">{{ current_user.email }}</span></a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
{# general items #}
|
||||
<li {% if request.path == url_for('main.news') %}class="active"{% endif %}>
|
||||
<a class="waves-effect" href="{{ url_for('main.news') }}"><i class="material-icons">email</i>News</a>
|
||||
</li>
|
||||
<li {% if request.path == url_for('main.dashboard') %}class="active"{% endif %}>
|
||||
<a class="waves-effect" href="{{ url_for('main.dashboard') }}"><i class="material-icons">dashboard</i>Dashboard</a>
|
||||
</li>
|
||||
<li {% if request.path == url_for('contributions.index') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('contributions.index') }}">
|
||||
<i class="material-icons left">new_label</i>
|
||||
Contributions
|
||||
</a>
|
||||
</li>
|
||||
<li {% if request.path == url_for('main.social') %}class="active"{% endif %}>
|
||||
<a class="waves-effect" href="{{ url_for('main.social') }}"><i class="material-icons">groups</i>Social</a>
|
||||
</li>
|
||||
<li {% if request.path == url_for('main.manual') %}class="active"{% endif %}>
|
||||
<a class="waves-effect" href="{{ url_for('main.manual') }}"><i class="material-icons">help_outline</i>Manual</a>
|
||||
</li>
|
||||
|
||||
{# processes & services items #}
|
||||
<li><div class="divider"></div></li>
|
||||
<li><a class="subheader">Data Processing & Analysis</a></li>
|
||||
<li class="service-color service-color-border border-darken" data-service="file-setup-pipeline" style="border-left: 10px solid;">
|
||||
<a class="waves-effect" href="{{ url_for('services.file_setup_pipeline') }}"><i class="nopaque-icons service-icons" data-service="file-setup-pipeline"></i>File setup</a>
|
||||
</li>
|
||||
<li class="service-color service-color-border border-darken mt-1" data-service="tesseract-ocr-pipeline" style="border-left: 10px solid;">
|
||||
<a class="waves-effect" href="{{ url_for('services.tesseract_ocr_pipeline') }}"><i class="nopaque-icons service-icons" data-service="tesseract-ocr-pipeline"></i>OCR</a>
|
||||
</li>
|
||||
{% if config.NOPAQUE_TRANSKRIBUS_ENABLED %}
|
||||
<li class="service-color service-color-border border-darken mt-1" data-service="transkribus-htr-pipeline" style="border-left: 10px solid;">
|
||||
<a class="waves-effect" href="{{ url_for('services.transkribus_htr_pipeline') }}"><i class="nopaque-icons service-icons" data-service="transkribus-htr-pipeline"></i>HTR</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="service-color service-color-border border-darken mt-1" data-service="spacy-nlp-pipeline" style="border-left: 10px solid;">
|
||||
<a class="waves-effect" href="{{ url_for('services.spacy_nlp_pipeline') }}"><i class="nopaque-icons service-icons" data-service="spacy-nlp-pipeline"></i>NLP</a>
|
||||
</li>
|
||||
<li class="service-color service-color-border border-darken mt-1" data-service="corpus-analysis" style="border-left: 10px solid;">
|
||||
<a class="waves-effect" href="{{ url_for('services.corpus_analysis') }}"><i class="nopaque-icons service-icons" data-service="corpus-analysis"></i>Corpus Analysis</a>
|
||||
</li>
|
||||
|
||||
{# account items #}
|
||||
<li class="hide-on-large-only"><div class="divider"></div></li>
|
||||
<li class="hide-on-large-only"><a class="subheader">Account</a></li>
|
||||
<li>
|
||||
<a href="{{ url_for('users.user', user_id=current_user.id) }}"><i class="material-icons">person</i>My Profile</a>
|
||||
</li>
|
||||
<li class="hide-on-large-only">
|
||||
<a class="waves-effect" href="{{ url_for('settings.settings') }}"><i class="material-icons">settings</i>Settings</a>
|
||||
</li>
|
||||
<li class="hide-on-large-only">
|
||||
<a class="waves-effect" href="{{ url_for('auth.logout') }}"><i class="material-icons">logout</i>Log out</a>
|
||||
</li>
|
||||
|
||||
{# administration items #}
|
||||
{% if current_user.can('ADMINISTRATE') %}
|
||||
<li><div class="divider"></div></li>
|
||||
<li><a class="subheader">Administration</a></li>
|
||||
<li>
|
||||
<a class="waves-effect" href="{{ url_for('admin.corpora') }}"><i class="nopaque-icons">I</i>Corpora</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="waves-effect" href="{{ url_for('admin.users') }}"><i class="material-icons">manage_accounts</i>Users</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
@ -1,21 +0,0 @@
|
||||
<link href="{{ url_for('static', filename='external/material-design-icons/css/material-icons.css') }}" rel="stylesheet">
|
||||
{% assets
|
||||
output='gen/nopaque.%(version)s.css',
|
||||
'css/materialize.css',
|
||||
'css/materialize.override.css',
|
||||
'css/nopaque-icons.css',
|
||||
'css/theme-colors.css',
|
||||
'css/corpus-status-colors.css',
|
||||
'css/corpus-status-text.css',
|
||||
'css/job-status-colors.css',
|
||||
'css/job-status-text.css',
|
||||
'css/service-colors.css',
|
||||
'css/pagination.css',
|
||||
'css/service-icons.css',
|
||||
'css/s-attr-colors.css',
|
||||
'css/spacing.css',
|
||||
'css/status-spinner.css',
|
||||
'css/utils.css'
|
||||
-%}
|
||||
<link href="{{ ASSET_URL }}" rel="stylesheet">
|
||||
{% endassets -%}
|
@ -32,4 +32,5 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock page_content %}
|
||||
|
@ -1,106 +1,544 @@
|
||||
{% if title is not defined %}
|
||||
{% set title = 'nopaque' %}
|
||||
{% endif %}
|
||||
|
||||
{% if sidenav_fixed is not defined %}
|
||||
{% set sidenav_fixed = false %}
|
||||
{% endif %}
|
||||
|
||||
{% if sticky_footer is not defined %}
|
||||
{% set sticky_footer = true %}
|
||||
{% endif %}
|
||||
|
||||
{% if navbar_fixed is not defined %}
|
||||
{% set navbar_fixed = true %}
|
||||
{% endif %}
|
||||
|
||||
{% if navbar_extended is not defined %}
|
||||
{% set navbar_extended = false %}
|
||||
{% endif %}
|
||||
|
||||
{% block doc %}
|
||||
<!DOCTYPE html>
|
||||
<html {% block html_attribs %}lang="en"{% endblock html_attribs %}>
|
||||
{% block html %}
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% block head %}
|
||||
{% block metas %}
|
||||
{% include "_base/metas.html.j2" %}
|
||||
{% endblock metas %}
|
||||
<!-- #region meta -->
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- #endregion meta -->
|
||||
|
||||
<title {% block title_attribs %}{% endblock title_attribs %}>
|
||||
{%- block title %}{{ title }}{% endblock title -%}
|
||||
</title>
|
||||
<title>{{ title if title is defined else 'nopaque' }}</title>
|
||||
|
||||
<link href="{{ url_for('static', filename='images/nopaque_-_favicon.png') }}" rel="icon">
|
||||
|
||||
<!-- #region stylesheets -->
|
||||
{% block stylesheets %}
|
||||
{% include "_base/stylesheets.html.j2" %}
|
||||
<link href="{{ url_for('static', filename='external/material-design-icons/css/material-icons.css') }}" rel="stylesheet">
|
||||
{% assets
|
||||
output='gen/nopaque.%(version)s.css',
|
||||
'css/materialize.css',
|
||||
'css/materialize.override.css',
|
||||
'css/nopaque-icons.css',
|
||||
'css/theme-colors.css',
|
||||
'css/corpus-status-colors.css',
|
||||
'css/corpus-status-text.css',
|
||||
'css/job-status-colors.css',
|
||||
'css/job-status-text.css',
|
||||
'css/service-colors.css',
|
||||
'css/pagination.css',
|
||||
'css/service-icons.css',
|
||||
'css/s-attr-colors.css',
|
||||
'css/spacing.css',
|
||||
'css/status-spinner.css',
|
||||
'css/utils.css'
|
||||
-%}
|
||||
<link href="{{ ASSET_URL }}" rel="stylesheet">
|
||||
{% endassets -%}
|
||||
{% endblock stylesheets %}
|
||||
{% endblock head %}
|
||||
<!-- #endregion stylesheets -->
|
||||
</head>
|
||||
<body {% block body_attribs %}data-sidenav-fixed="{{ sidenav_fixed }}" data-sticky-footer="{{ sticky_footer }}"{% endblock body_attribs %}>
|
||||
{% block body %}
|
||||
<header {% block header_attribs %}{% endblock header_attribs %}>
|
||||
{% block header %}
|
||||
{% if navbar_fixed %}
|
||||
<body>
|
||||
<header>
|
||||
<div class="navbar-fixed">
|
||||
{% endif %}
|
||||
<nav {% block navbar_attribs %}{% if navbar_extended %}class="nav-extended"{% endif %}{% endblock navbar_attribs %}>
|
||||
{% block navbar %}
|
||||
<div {% block navbar_primary_content_attribs %}class="nav-wrapper"{% endblock navbar_primary_content_attribs %}>
|
||||
{% block navbar_primary_content %}
|
||||
{% include "_base/navbar_primary_content.html.j2" %}
|
||||
{% endblock navbar_primary_content %}
|
||||
</div>
|
||||
{% if navbar_extended %}
|
||||
<div {% block navbar_secondary_content_attribs %}class="nav-content"{% endblock navbar_secondary_content_attribs %}>
|
||||
{% block navbar_secondary_content %}
|
||||
{% endblock navbar_secondary_content %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock navbar %}
|
||||
</nav>
|
||||
{% if navbar_fixed %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% block sidenav %}
|
||||
<nav>
|
||||
<div class="nav-wrapper">
|
||||
{# menu icon #}
|
||||
{# small/medium devices #}
|
||||
<a href="#!" class="sidenav-trigger" data-target="sidenav"><i class="material-icons">menu</i></a>
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
{% include "_base/sidenav.html.j2" %}
|
||||
{# nopaque logo #}
|
||||
{# large devices #}
|
||||
<a href="{{ url_for('main.index') }}" class="brand-logo hide-on-med-and-down" style="height: 100%;">
|
||||
<img src="{{ url_for('static', filename='images/nopaque_-_logo.png') }}" alt="" class="mx-3 py-3" style="height: 100%;">
|
||||
</a>
|
||||
|
||||
{# left aligned navigation items #}
|
||||
{# large devices #}
|
||||
<ul class="hide-on-med-and-down" style="margin-left: calc(57px + 1.5rem);">
|
||||
{# dashboard #}
|
||||
<li {% if request.path == url_for('main.dashboard') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('main.dashboard') }}">
|
||||
<i class="material-icons left">dashboard</i>
|
||||
Dashboard
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{# data processing & analysis #}
|
||||
<li>
|
||||
<a href="#!" class="dropdown-trigger no-autoinit" data-target="navbar-data-processing-and-analysis-dropdown-content" id="navbar-data-processing-and-analysis-dropdown-trigger">
|
||||
<i class="material-icons left">miscellaneous_services</i>
|
||||
Data Processing & Analysis
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{# contributions #}
|
||||
<li {% if request.path == url_for('contributions.index') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('contributions.index') }}">
|
||||
<i class="material-icons left">new_label</i>
|
||||
Contributions
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{# social #}
|
||||
<li {% if request.path == url_for('main.social') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('main.social') }}">
|
||||
<i class="material-icons left">groups</i>
|
||||
Social
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
{# nopaque logo+wordmark+slogan #}
|
||||
{# large devices #}
|
||||
<a href="{{ url_for('main.index') }}" class="brand-logo hide-on-med-and-down" style="height: 100%;">
|
||||
<img src="{{ url_for('static', filename='images/nopaque_-_logo+wordmark+slogan.png') }}" alt="" class="mx-3 py-3" style="height: 100%;">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock sidenav %}
|
||||
{% endblock header %}
|
||||
|
||||
{# nopaque logo+wordmark #}
|
||||
{# small/medium devices #}
|
||||
<a href="{{ url_for('main.index') }}" class="brand-logo center hide-on-large-only" style="height: 100%;">
|
||||
<img src="{{ url_for('static', filename='images/nopaque_-_logo+wordmark.png') }}" alt="" class="py-3" style="height: 100%;">
|
||||
</a>
|
||||
|
||||
{# right aligned navigation items #}
|
||||
{# large devices #}
|
||||
<ul class="right hide-on-med-and-down" style="height: 64px;">
|
||||
{# manual #}
|
||||
<li class="tooltipped {% if request.path == url_for('main.manual') %}active{% endif %}" data-position="bottom" data-tooltip="Manual">
|
||||
<a href="{{ url_for('main.manual') }}">
|
||||
<i class="material-icons">help_outline</i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{# news #}
|
||||
<li class="tooltipped {% if request.path == url_for('main.news') %}active{% endif %}" data-position="bottom" data-tooltip="News">
|
||||
<a href="{{ url_for('main.news') }}">
|
||||
<i class="material-icons">newspaper</i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
{# avatar #}
|
||||
<li style="height: 100%;">
|
||||
<a href="#!" class="dropdown-trigger no-autoinit" data-target="navbar-account-dropdown-content" id="navbar-account-dropdown-trigger" style="height: 100%;">
|
||||
<span class="mr-3">{{ current_user.username }}</span>
|
||||
<img src="{{ url_for('users.user_avatar', user_id=current_user.id) }}" alt="" class="circle py-3 right" style="height: 100%;">
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
{# log in #}
|
||||
<li {% if request.path == url_for('auth.login') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('auth.login') }}">Log in</a>
|
||||
</li>
|
||||
|
||||
{# register #}
|
||||
<li {% if request.path == url_for('auth.register') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('auth.register') }}" class="btn waves-effect waves-light primary-color lighten">Register</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<ul class="sidenav" id="sidenav">
|
||||
{% if current_user.is_authenticated %}
|
||||
{# user view #}
|
||||
<li>
|
||||
<div class="user-view">
|
||||
<div class="background primary-color"></div>
|
||||
<a><img class="circle" src="{{ url_for('users.user_avatar', user_id=current_user.id) }}" alt=""></a>
|
||||
<a><span class="white-text name">{{ current_user.username }}</span></a>
|
||||
<a><span class="white-text email">{{ current_user.email }}</span></a>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
{# dashboard #}
|
||||
<li {% if request.path == url_for('main.dashboard') %}class="active"{% endif %}>
|
||||
<a class="waves-effect" href="{{ url_for('main.dashboard') }}"><i class="material-icons">dashboard</i>Dashboard</a>
|
||||
</li>
|
||||
|
||||
{# contributions #}
|
||||
<li {% if request.path == url_for('contributions.index') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('contributions.index') }}">
|
||||
<i class="material-icons left">new_label</i>
|
||||
Contributions
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{# social #}
|
||||
<li {% if request.path == url_for('main.social') %}class="active"{% endif %}>
|
||||
<a class="waves-effect" href="{{ url_for('main.social') }}"><i class="material-icons">groups</i>Social</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{# news #}
|
||||
<li {% if request.path == url_for('main.news') %}class="active"{% endif %}>
|
||||
<a class="waves-effect" href="{{ url_for('main.news') }}"><i class="material-icons">newspaper</i>News</a>
|
||||
</li>
|
||||
|
||||
{# manual #}
|
||||
<li {% if request.path == url_for('main.manual') %}class="active"{% endif %}>
|
||||
<a class="waves-effect" href="{{ url_for('main.manual') }}"><i class="material-icons">help_outline</i>Manual</a>
|
||||
</li>
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
{# data processing & analysis section #}
|
||||
<li><div class="divider"></div></li>
|
||||
<li><a class="subheader">Data Processing & Analysis</a></li>
|
||||
|
||||
{# file setup pipeline #}
|
||||
<li class="service-color service-color-border border-darken" data-service="file-setup-pipeline" style="border-left: 10px solid;">
|
||||
<a class="waves-effect" href="{{ url_for('services.file_setup_pipeline') }}"><i class="nopaque-icons service-icons" data-service="file-setup-pipeline"></i>File setup</a>
|
||||
</li>
|
||||
|
||||
{# tesseract ocr pipeline #}
|
||||
<li class="service-color service-color-border border-darken mt-1" data-service="tesseract-ocr-pipeline" style="border-left: 10px solid;">
|
||||
<a class="waves-effect" href="{{ url_for('services.tesseract_ocr_pipeline') }}"><i class="nopaque-icons service-icons" data-service="tesseract-ocr-pipeline"></i>OCR</a>
|
||||
</li>
|
||||
|
||||
{% if config.NOPAQUE_TRANSKRIBUS_ENABLED %}
|
||||
{# transkribus htr pipeline #}
|
||||
<li class="service-color service-color-border border-darken mt-1" data-service="transkribus-htr-pipeline" style="border-left: 10px solid;">
|
||||
<a class="waves-effect" href="{{ url_for('services.transkribus_htr_pipeline') }}"><i class="nopaque-icons service-icons" data-service="transkribus-htr-pipeline"></i>HTR</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{# spacy nlp pipeline #}
|
||||
<li class="service-color service-color-border border-darken mt-1" data-service="spacy-nlp-pipeline" style="border-left: 10px solid;">
|
||||
<a class="waves-effect" href="{{ url_for('services.spacy_nlp_pipeline') }}"><i class="nopaque-icons service-icons" data-service="spacy-nlp-pipeline"></i>NLP</a>
|
||||
</li>
|
||||
|
||||
{# corpus analysis #}
|
||||
<li class="service-color service-color-border border-darken mt-1" data-service="corpus-analysis" style="border-left: 10px solid;">
|
||||
<a class="waves-effect" href="{{ url_for('services.corpus_analysis') }}"><i class="nopaque-icons service-icons" data-service="corpus-analysis"></i>Corpus Analysis</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{# account section #}
|
||||
<li><div class="divider"></div></li>
|
||||
<li><a class="subheader">Account</a></li>
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
{# my profile #}
|
||||
<li {% if request.path == url_for('users.user', user_id=current_user.id) %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('users.user', user_id=current_user.id) }}"><i class="material-icons">person</i>My Profile</a>
|
||||
</li>
|
||||
|
||||
{# settings #}
|
||||
<li {% if request.path == url_for('settings.settings') %}class="active"{% endif %}>
|
||||
<a class="waves-effect" href="{{ url_for('settings.settings') }}"><i class="material-icons">settings</i>Settings</a>
|
||||
</li>
|
||||
|
||||
{# log out #}
|
||||
<li>
|
||||
<a class="waves-effect" href="{{ url_for('auth.logout') }}"><i class="material-icons">logout</i>Log out</a>
|
||||
</li>
|
||||
{% else %}
|
||||
{# log in #}
|
||||
<li {% if request.path == url_for('auth.login') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('auth.login') }}">Log in</a>
|
||||
</li>
|
||||
|
||||
{# register #}
|
||||
<li {% if request.path == url_for('auth.register') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('auth.register') }}" class="btn waves-effect waves-light">Register</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if current_user.is_authenticated and current_user.can('ADMINISTRATE') %}
|
||||
{# administration section #}
|
||||
<li><div class="divider"></div></li>
|
||||
<li><a class="subheader">Administration</a></li>
|
||||
|
||||
{# corpora #}
|
||||
<li>
|
||||
<a class="waves-effect" href="{{ url_for('admin.corpora') }}"><i class="nopaque-icons">I</i>Corpora</a>
|
||||
</li>
|
||||
|
||||
{# users #}
|
||||
<li>
|
||||
<a class="waves-effect" href="{{ url_for('admin.users') }}"><i class="material-icons">manage_accounts</i>Users</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<main {% block main_attribs %}{% endblock main_attribs %}>
|
||||
{% block main %}
|
||||
{% block page_content %}{% endblock page_content %}
|
||||
{% endblock main %}
|
||||
</main>
|
||||
|
||||
<footer class="page-footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s12 l3">
|
||||
<h5 class="white-text">Legal Notice</h5>
|
||||
<ul>
|
||||
<li><a class="grey-text text-lighten-3" href="https://www.uni-bielefeld.de/(en)/impressum/">Legal Notice</a></li>
|
||||
<li><a class="grey-text text-lighten-3" href="{{ url_for('main.privacy_policy') }}">Privacy statement (GDPR)</a></li>
|
||||
<li><a class="grey-text text-lighten-3" href="{{ url_for('main.terms_of_use') }}">Terms of use</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col s12 l3">
|
||||
<h5 class="white-text">More Resources</h5>
|
||||
<ul>
|
||||
<li><a class="grey-text text-lighten-3" href="{{ url_for('main.faq') }}">Frequently asked questions</a></li>
|
||||
<li><a class="grey-text text-lighten-3" href="mailto:{{ config.NOPAQUE_SERVICE_DESK }}">Report an issue</a></li>
|
||||
<li><a class="grey-text text-lighten-3" href="https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque">GitLab (source code)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col s12 l4">
|
||||
<h5 class="white-text">Who made this?</h5>
|
||||
<p class="grey-text text-lighten-4">
|
||||
This software is developed by the SFB 1288 INF project at Bielefeld University.
|
||||
Thanks to all the people who made nopaque possible.
|
||||
<span class="red-text">♥</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col s12 l2">
|
||||
<br class="hide-on-med-and-down">
|
||||
<br class="hide-on-med-and-down">
|
||||
<a href="https://www.dfg.de/">
|
||||
<img class="responsive-img" src="{{ url_for('static', filename='images/logo_-_dfg.gif') }}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-copyright">
|
||||
<div class="container">
|
||||
© 2024 Bielefeld University
|
||||
<a class="grey-text text-lighten-4 right" href="https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque/-/releases/{{ config.NOPAQUE_VERSION }}">Version {{ config.NOPAQUE_VERSION }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<div id="dropdowns">
|
||||
{% block dropdowns %}
|
||||
{% include "_base/dropdowns.html.j2" %}
|
||||
{% if current_user.is_authenticated %}
|
||||
<ul class="dropdown-content" id="navbar-data-processing-and-analysis-dropdown-content">
|
||||
<li {% if request.path == url_for('services.file_setup_pipeline') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('services.file_setup_pipeline') }}">
|
||||
<i class="nopaque-icons service-icons service-color-text text-darken" data-service="file-setup-pipeline"></i>
|
||||
File Setup Pipeline
|
||||
</a>
|
||||
</li>
|
||||
<li {% if request.path == url_for('services.tesseract_ocr_pipeline') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('services.tesseract_ocr_pipeline') }}">
|
||||
<i class="nopaque-icons service-icons service-color-text text-darken" data-service="tesseract-ocr-pipeline"></i>
|
||||
Tesseract OCR Pipeline
|
||||
</a>
|
||||
</li>
|
||||
{% if config.NOPAQUE_TRANSKRIBUS_ENABLED %}
|
||||
<li {% if request.path == url_for('services.transkribus_htr_pipeline') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('services.transkribus_htr_pipeline') }}">
|
||||
<i class="nopaque-icons service-icons service-color-text text-darken" data-service="transkribus-htr-pipeline"></i>
|
||||
Transkribus HTR Pipeline
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li {% if request.path == url_for('services.spacy_nlp_pipeline') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('services.spacy_nlp_pipeline') }}">
|
||||
<i class="nopaque-icons service-icons service-color-text text-darken" data-service="spacy-nlp-pipeline"></i>
|
||||
SpaCy NLP Pipeline
|
||||
</a>
|
||||
</li>
|
||||
<li class="divider" tabindex="-1"></li>
|
||||
<li {% if request.path == url_for('services.corpus_analysis') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('services.corpus_analysis') }}">
|
||||
<i class="nopaque-icons service-icons service-color-text text-darken" data-service="corpus-analysis"></i>
|
||||
Corpus Analyis
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
<ul class="dropdown-content" id="navbar-account-dropdown-content">
|
||||
<li {% if request.path == url_for('users.user', user_id=current_user.id) %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('users.user', user_id=current_user.id) }}">
|
||||
<i class="material-icons">person</i>
|
||||
Your profile
|
||||
</a>
|
||||
</li>
|
||||
<li {% if request.path == url_for('settings.settings') %}class="active"{% endif %}>
|
||||
<a href="{{ url_for('settings.settings') }}">
|
||||
<i class="material-icons">settings</i>
|
||||
Settings
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ url_for('auth.logout') }}">
|
||||
<i class="material-icons">logout</i>
|
||||
Log out
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock dropdowns %}
|
||||
</div>
|
||||
|
||||
<div id="modals">
|
||||
{% block modals %}
|
||||
{% include "_base/modals.html.j2" %}
|
||||
{% if current_user.is_authenticated and not current_user.terms_of_use_accepted %}
|
||||
<div id="terms-of-use-modal" class="modal modal-fixed-footer">
|
||||
<div class="modal-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h1 id="title">Terms of use</h1>
|
||||
</div>
|
||||
<div class="col s12">
|
||||
<div class="switch">
|
||||
<label>
|
||||
DE
|
||||
<input type="checkbox" id="terms-of-use-modal-switch">
|
||||
<span class="lever"></span>
|
||||
EN
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
<div class="terms-of-use-modal-content hide">
|
||||
{% include "main/terms_of_use_en.html.j2" %}
|
||||
</div>
|
||||
<div class="terms-of-use-modal-content">
|
||||
{% include "main/terms_of_use_de.html.j2" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span style="margin-right:20px;">I have taken note of the new GTC and agree to their validity in the context of my further use.</span>
|
||||
<a href="#!" class="modal-close waves-effect waves-green btn">Yes</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock modals %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer {% block footer_attribs %}class="page-footer"{% endblock footer_attribs %}>
|
||||
{% block footer %}
|
||||
{% include "_base/footer.html.j2" %}
|
||||
{% endblock footer %}
|
||||
</footer>
|
||||
|
||||
<!-- #region scripts -->
|
||||
{% block scripts %}
|
||||
{% include "_base/scripts.html.j2" %}
|
||||
<script src="{{ url_for('static', filename='external/materialize/js/materialize.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='external/JSON-Patch/js/fast-json-patch.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='external/list.js/js/list.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='external/pako/js/pako_inflate.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='external/plotly.js/js/plotly.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='external/socket.io/js/socket.io.min.js') }}"></script>
|
||||
{% assets
|
||||
filters='rjsmin',
|
||||
output='gen/nopaque.%(version)s.js',
|
||||
'js/index.js',
|
||||
'js/app.js',
|
||||
'js/utils.js',
|
||||
|
||||
'js/forms/index.js',
|
||||
'js/forms/base-form.js',
|
||||
'js/forms/create-contribution-form.js',
|
||||
'js/forms/create-corpus-file-form.js',
|
||||
'js/forms/create-job-form.js',
|
||||
|
||||
'js/resource-displays/index.js',
|
||||
'js/resource-displays/resource-display.js',
|
||||
'js/resource-displays/corpus-display.js',
|
||||
'js/resource-displays/job-display.js',
|
||||
|
||||
'js/resource-lists/index.js',
|
||||
'js/resource-lists/resource-list.js',
|
||||
'js/resource-lists/admin-user-list.js',
|
||||
'js/resource-lists/corpus-file-list.js',
|
||||
'js/resource-lists/corpus-follower-list.js',
|
||||
'js/resource-lists/corpus-list.js',
|
||||
'js/resource-lists/corpus-text-info-list.js',
|
||||
'js/resource-lists/corpus-token-list.js',
|
||||
'js/resource-lists/detailed-public-corpus-list.js',
|
||||
'js/resource-lists/job-input-list.js',
|
||||
'js/resource-lists/job-list.js',
|
||||
'js/resource-lists/job-result-list.js',
|
||||
'js/resource-lists/public-corpus-list.js',
|
||||
'js/resource-lists/public-user-list.js',
|
||||
'js/resource-lists/spacy-nlp-pipeline-model-list.js',
|
||||
'js/resource-lists/tesseract-ocr-pipeline-model-list.js',
|
||||
|
||||
'js/requests/index.js',
|
||||
'js/requests/admin.js',
|
||||
'js/requests/contributions.js',
|
||||
'js/requests/corpora.js',
|
||||
'js/requests/jobs.js',
|
||||
'js/requests/users.js',
|
||||
|
||||
'js/corpus-analysis/index.js',
|
||||
'js/corpus-analysis/cqi/index.js',
|
||||
'js/corpus-analysis/cqi/constants.js',
|
||||
'js/corpus-analysis/cqi/errors.js',
|
||||
'js/corpus-analysis/cqi/status.js',
|
||||
'js/corpus-analysis/cqi/api/index.js',
|
||||
'js/corpus-analysis/cqi/api/client.js',
|
||||
'js/corpus-analysis/cqi/models/index.js',
|
||||
'js/corpus-analysis/cqi/models/resource.js',
|
||||
'js/corpus-analysis/cqi/models/attributes.js',
|
||||
'js/corpus-analysis/cqi/models/subcorpora.js',
|
||||
'js/corpus-analysis/cqi/models/corpora.js',
|
||||
'js/corpus-analysis/cqi/client.js',
|
||||
'js/corpus-analysis/query-builder/index.js',
|
||||
'js/corpus-analysis/query-builder/element-references.js',
|
||||
'js/corpus-analysis/query-builder/query-builder.js',
|
||||
'js/corpus-analysis/query-builder/structural-attribute-builder-functions.js',
|
||||
'js/corpus-analysis/query-builder/token-attribute-builder-functions.js',
|
||||
'js/corpus-analysis/app.js',
|
||||
'js/corpus-analysis/concordance-extension.js',
|
||||
'js/corpus-analysis/reader-extension.js',
|
||||
'js/corpus-analysis/static-visualization-extension.js'
|
||||
-%}
|
||||
<script src="{{ ASSET_URL }}"></script>
|
||||
{% endassets -%}
|
||||
|
||||
<script>
|
||||
// TODO: Implement an app.run method and use this for all of the following
|
||||
const app = new nopaque.App();
|
||||
app.init();
|
||||
|
||||
{% if current_user.is_authenticated -%}
|
||||
// TODO: Set this as a property of the app object
|
||||
const currentUserId = {{ current_user.hashid|tojson }};
|
||||
|
||||
// Subscribe to the current user's data events
|
||||
app.subscribeUser(currentUserId)
|
||||
.catch((error) => {throw JSON.stringify(error);});
|
||||
|
||||
// Get the current user's data
|
||||
app.getUser(currentUserId, true, true)
|
||||
.catch((error) => {throw JSON.stringify(error);});
|
||||
|
||||
{% if not current_user.terms_of_use_accepted -%}
|
||||
M.Modal.getInstance(document.querySelector('#terms-of-use-modal')).open();
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
// Display flashed messages
|
||||
for (let [category, message] of {{ get_flashed_messages(with_categories=True)|tojson }}) {
|
||||
app.flash(message, message);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
let languageModalSwitch = document.querySelector('#terms-of-use-modal-switch');
|
||||
let termsOfUseModalContent = document.querySelectorAll('.terms-of-use-modal-content');
|
||||
if (languageModalSwitch) {
|
||||
languageModalSwitch.addEventListener('change', function() {
|
||||
termsOfUseModalContent.forEach(content => {
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{% endblock scripts %}
|
||||
{% endblock body %}
|
||||
<!-- #endregion scripts -->
|
||||
</body>
|
||||
{% endblock html %}
|
||||
</html>
|
||||
{% endblock doc %}
|
||||
|
@ -72,6 +72,9 @@
|
||||
{{ super() }}
|
||||
<div class="modal no-autoinit" id="corpus-analysis-init-modal">
|
||||
<div class="modal-content">
|
||||
<div class="card-panel service-color darken white-text" data-service="corpus-analysis">
|
||||
<h4 class="m-3"><i class="material-icons left" style="font-size: inherit; line-height: inherit;">hourglass_empty</i>We are preparing your analysis session</h4>
|
||||
</div>
|
||||
<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>
|
||||
|
@ -41,10 +41,58 @@
|
||||
<div class="job-list" data-user-id="{{ current_user.hashid }}"></div>
|
||||
</div>
|
||||
<div class="card-action right-align">
|
||||
<p><a href="#data-processing-and-analysis-modal" class="btn modal-trigger waves-effect waves-light">Create job<i class="material-icons right">add</i></a></p>
|
||||
<p><a data-target="dashboard-create-job-dropdown-content" class="btn waves-effect waves-light dropdown-trigger no-autoinit" id="dashboard-create-job-dropdown-trigger">Create job<i class="material-icons right">add</i></a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock page_content %}
|
||||
|
||||
|
||||
{% block dropdowns %}
|
||||
{{ super() }}
|
||||
<ul class="dropdown-content" id="dashboard-create-job-dropdown-content">
|
||||
<li>
|
||||
<a href="{{ url_for('services.file_setup_pipeline') }}">
|
||||
<i class="nopaque-icons service-icons service-color-text text-darken" data-service="file-setup-pipeline"></i>
|
||||
File Setup Pipeline
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ url_for('services.tesseract_ocr_pipeline') }}">
|
||||
<i class="nopaque-icons service-icons service-color-text text-darken" data-service="tesseract-ocr-pipeline"></i>
|
||||
Tesseract OCR Pipeline
|
||||
</a>
|
||||
</li>
|
||||
{% if config.NOPAQUE_TRANSKRIBUS_ENABLED %}
|
||||
<li>
|
||||
<a href="{{ url_for('services.transkribus_htr_pipeline') }}">
|
||||
<i class="nopaque-icons service-icons service-color-text text-darken" data-service="transkribus-htr-pipeline"></i>
|
||||
Transkribus HTR Pipeline
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{{ url_for('services.spacy_nlp_pipeline') }}">
|
||||
<i class="nopaque-icons service-icons service-color-text text-darken" data-service="spacy-nlp-pipeline"></i>
|
||||
SpaCy NLP Pipeline
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock dropdowns %}
|
||||
|
||||
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script>
|
||||
M.Dropdown.init(
|
||||
document.querySelector('#dashboard-create-job-dropdown-trigger'),
|
||||
{
|
||||
constrainWidth: false,
|
||||
container: document.querySelector('#dropdowns'),
|
||||
coverTrigger: false
|
||||
}
|
||||
);
|
||||
</script>
|
||||
{% endblock scripts %}
|
||||
|
@ -4,7 +4,7 @@
|
||||
{% block main_attribs %}class="service-color lighten" data-service="file-setup-pipeline"{% endblock main_attribs %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="container">
|
||||
<div class="container" data-service="file-setup-pipeline">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h1 id="title">{{ title }}</h1>
|
||||
|
Loading…
Reference in New Issue
Block a user