This commit is contained in:
Patrick Jentsch
2024-05-04 14:41:40 +02:00
parent a03b5918d9
commit 882987ba68
33 changed files with 119 additions and 154 deletions

View File

@ -1,4 +1,4 @@
<h3 class="manual-chapter-title">Services</h5>
<h3 class="manual-chapter-title">Services</h3>
<div class="row">
<div class="col s12 m4">
<img alt="Services" class="materialboxed responsive-img" src="{{ url_for('static', filename='images/manual/services.png') }}">

View File

@ -0,0 +1,2 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@ -1,20 +1,20 @@
<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
{% assets
filters='rjsmin',
output='gen/app.%(version)s.js',
'js/index.js',
'js/app.js',
'js/utils.js'
%}
-%}
<script src="{{ ASSET_URL }}"></script>
{%- endassets %}
{% endassets -%}
{%- assets
{% assets
filters='rjsmin',
output='gen/Forms.%(version)s.js',
'js/forms/index.js',
@ -22,22 +22,22 @@
'js/forms/create-contribution-form.js',
'js/forms/create-corpus-file-form.js',
'js/forms/create-job-form.js'
%}
-%}
<script src="{{ ASSET_URL }}"></script>
{%- endassets %}
{% endassets -%}
{%- assets
{% assets
filters='rjsmin',
output='gen/resource-displays.%(version)s.js',
'js/resource-displays/index.js',
'js/resource-displays/resource-display.js',
'js/resource-displays/corpus-display.js',
'js/resource-displays/job-display.js'
%}
-%}
<script src="{{ ASSET_URL }}"></script>
{%- endassets %}
{% endassets -%}
{%- assets
{% assets
filters='rjsmin',
output='gen/resource-lists.%(version)s.js',
'js/resource-lists/index.js',
@ -56,11 +56,11 @@
'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'
%}
-%}
<script src="{{ ASSET_URL }}"></script>
{%- endassets %}
{% endassets -%}
{%- assets
{% assets
filters='rjsmin',
output='gen/requests.%(version)s.js',
'js/requests/index.js',
@ -69,11 +69,11 @@
'js/requests/corpora.js',
'js/requests/jobs.js',
'js/requests/users.js'
%}
-%}
<script src="{{ ASSET_URL }}"></script>
{%- endassets %}
{% endassets -%}
{%- assets
{% assets
filters='rjsmin',
output='gen/corpus-analysis.%(version)s.js',
'js/corpus-analysis/index.js',
@ -98,17 +98,16 @@
'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 %}
{% endassets -%}
<script>
// TODO: Implement an app.run method and use this for all of the following
const app = new nopaque.App();
app.init();
// Check if the current user is authenticated
{%- if current_user.is_authenticated %}
{% if current_user.is_authenticated -%}
// TODO: Set this as a property of the app object
const currentUserId = {{ current_user.hashid|tojson }};
@ -120,11 +119,10 @@
app.getUser(currentUserId, true, true)
.catch((error) => {throw JSON.stringify(error);});
// Check if the current user hasn't accepted the terms of use yet
{%- if not current_user.terms_of_use_accepted %}
{% if not current_user.terms_of_use_accepted -%}
M.Modal.getInstance(document.querySelector('#terms-of-use-modal')).open();
{%- endif %}
{%- endif %}
{% endif -%}
{% endif -%}
// Display flashed messages
for (let [category, message] of {{ get_flashed_messages(with_categories=True)|tojson }}) {

View File

@ -1,16 +1,18 @@
{% if current_user.is_authenticated %}
<link href="{{ url_for('static', filename='external/material-design-icons/css/material-icons.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='external/materialize/css/materialize.min.css') }}" rel="stylesheet">
{% if current_user.is_authenticated -%}
<link href="{{ url_for('static', filename='materialize/css/sidenav-fixed.css') }}" rel="stylesheet">
{% endif %}
{% endif -%}
<link href="{{ url_for('static', filename='materialize/css/sticky-footer.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='materialize/css/fixes.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='nopaque-icons/css/nopaque-icons.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/queryBuilder.css') }}" rel="stylesheet">
{%- assets
{% assets
filters='pyscss',
output='gen/app.%(version)s.css',
'css/colors.scss',
'css/helpers.scss',
'css/style.css'
%}
-%}
<link href="{{ ASSET_URL }}" rel="stylesheet">
{%- endassets %}
{% endassets -%}