Some cleanup (css, html, js)

This commit is contained in:
Patrick Jentsch
2021-12-09 12:50:14 +01:00
parent 067273df6d
commit 40bd169101
45 changed files with 36 additions and 6478 deletions

View File

@ -1,33 +1,31 @@
{% if current_user.setting_dark_mode %}
<script src="{{ url_for('static', filename='js/darkreader.js') }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/darkreader/4.9.40/darkreader.min.js" integrity="sha512-0Jbi9gWSyU5SvNS16za0aILl6l+MgM8N+TGlZxy4qPQEzqKoU9egh4h56Kz0xp2R+ZFPQMfeDn26Gh6cqu2WAg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fast-json-patch/3.1.0/fast-json-patch.min.js" integrity="sha512-KrvLlmKBiDoTa0Fke92aFoEv4xS0+cuYGP27nt39w0yLZWvVOhArmZ29uuOe3uOOBcbnkpvnLhkvYcYjahSOwg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/list.js/2.3.1/list.min.js" integrity="sha512-93wYgwrIFL+b+P3RvYxi/WUFRXXUDSLCT2JQk9zhVGXuS2mHl2axj6d+R6pP+gcU5isMHRj1u0oYE/mWyt/RjA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.4.0/socket.io.js" integrity="sha512-nYuHvSAhY5lFZ4ixSViOwsEKFvlxHMU2NHts1ILuJgOS6ptUmAGt/0i5czIgMOahKZ6JN84YFDA+mCdky7dD8A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="{{ url_for('static', filename='js/App.js') }}"></script>
<script src="{{ url_for('static', filename='js/JobStatusNotifier.js') }}"></script>
{% assets filters='rjsmin', output="js/RessourceDisplays.min.bundle.js",
"js/RessourceDisplays/RessourceDisplay.js",
"js/RessourceDisplays/CorpusDisplay.js",
"js/RessourceDisplays/JobDisplay.js" %}
<script src="{{ ASSET_URL }}"></script>
{% endassets %}
{% assets filters='rjsmin', output="js/RessourceLists.min.bundle.js",
"js/RessourceLists/RessourceList.js",
"js/RessourceLists/CorpusList.js",
"js/RessourceLists/CorpusFileList.js",
"js/RessourceLists/JobList.js",
"js/RessourceLists/JobInputList.js",
"js/RessourceLists/JobResultList.js",
"js/RessourceLists/QueryResultList.js",
"js/RessourceLists/UserList.js" %}
<script src="{{ ASSET_URL }}"></script>
{% endassets %}
<script src="{{ url_for('static', filename='js/UploadForm.js') }}"></script>
<script>
{% if current_user.setting_dark_mode %}
DarkReader.enable({brightness: 150, contrast: 100, sepia: 0});
</script>
{% endif %}
<script src="{{ url_for('static', filename='js/jsonpatch.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/list.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/socket.io.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/nopaque/App.js') }}"></script>
<script src="{{ url_for('static', filename='js/nopaque/JobStatusNotifier.js') }}"></script>
{% assets filters='rjsmin', output="js/nopaque/RessourceDisplays.min.bundle.js",
"js/nopaque/RessourceDisplays/RessourceDisplay.js",
"js/nopaque/RessourceDisplays/CorpusDisplay.js",
"js/nopaque/RessourceDisplays/JobDisplay.js" %}
<script src="{{ ASSET_URL }}"></script>
{% endassets %}
{% assets filters='rjsmin', output="js/nopaque/RessourceLists.min.bundle.js",
"js/nopaque/RessourceLists/RessourceList.js",
"js/nopaque/RessourceLists/CorpusList.js",
"js/nopaque/RessourceLists/CorpusFileList.js",
"js/nopaque/RessourceLists/JobList.js",
"js/nopaque/RessourceLists/JobInputList.js",
"js/nopaque/RessourceLists/JobResultList.js",
"js/nopaque/RessourceLists/QueryResultList.js",
"js/nopaque/RessourceLists/UserList.js" %}
<script src="{{ ASSET_URL }}"></script>
{% endassets %}
<script src="{{ url_for('static', filename='js/nopaque/UploadForm.js') }}"></script>
<script>
{% endif %}
// Disable all option elements with no value
for (let optionElement of document.querySelectorAll('option[value=""]')) {optionElement.disabled = true;}
M.AutoInit();

View File

@ -57,11 +57,11 @@
{% block scripts %}
{{ super() }}
{% assets output="js/nopaque/CorpusAnalysis.min.bundle.js",
"js/nopaque/CorpusAnalysis/CQiClient.js",
"js/nopaque/CorpusAnalysis/CorpusAnalysisApp.js",
"js/nopaque/CorpusAnalysis/CorpusAnalysisConcordance.js",
"js/nopaque/CorpusAnalysis/CorpusAnalysisReader.js" %}
{% assets output="js/CorpusAnalysis.min.bundle.js",
"js/CorpusAnalysis/CQiClient.js",
"js/CorpusAnalysis/CorpusAnalysisApp.js",
"js/CorpusAnalysis/CorpusAnalysisConcordance.js",
"js/CorpusAnalysis/CorpusAnalysisReader.js" %}
<script src="{{ ASSET_URL }}"></script>
{% endassets %}
<script>

View File

@ -11,8 +11,8 @@
{% endblock metas %}
{% block styles %}
<link href="{{ url_for('static', filename='css/material_icons.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/materialize.min.css') }}" media="screen,projection" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" crossorigin="anonymous" referrerpolicy="no-referrer" >
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" integrity="sha512-UJfAaOlIRtdR+0P6C3KUoTDAxVTuy3lnSXLyLKlHYJlcSU8Juge/mjeaxDNMlw9LgeIotgz5FP8eUQPhX1q10A==" crossorigin="anonymous" referrerpolicy="no-referrer">
{% endblock styles %}
{% endblock head %}
</head>
@ -36,7 +36,7 @@
</footer>
{% block scripts %}
<script src="{{ url_for('static', filename='js/materialize.min.js') }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js" integrity="sha512-NiWqa2rceHnN3Z5j6mSAvbwwg3tiwVNxiAQaaSMSXnRRDh5C2mk/+sKQRw8qjV1vN4nf8iK2a0b048PnHbyx+Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
{% endblock scripts %}
{% endblock body %}
</body>

View File

@ -1,15 +0,0 @@
<!-- Analysis init modal. User feedback showing that the analysis session is loading. -->
<div class="modal no-autoinit" id="analysis-init-modal">
<div class="modal-content">
<h4>Initializing your corpus analysis session...</h4>
<p>If the loading takes to long or an error occured,
<a onclick="window.location.reload()" href="#">click here</a>
to refresh your session or
<a href="{{ url_for('corpora.corpus', corpus_id=corpus.id) }}">go back</a>!
</p>
<div id="analysis-init-progress" class="progress">
<div class="indeterminate"></div>
</div>
<p id="analysis-init-error" class="hide red-text"></p>
</div>
</div>

View File

@ -1,75 +0,0 @@
<!-- Modal showing detailed context info for one match. -->
<div id="context-modal" class="modal">
<div class="modal-content">
<form>
<div class="row" style="margin-bottom: 0px; margin-top: -20px;">
<div class="col s12 m6 l6">
<div class="section">
<h6 style="margin-top: 0px;">Display</h6>
<div class="divider" style="margin-bottom: 10px;"></div>
<div class="col s12" style="margin-bottom: 10px;">
{{ inspect_display_options_form.expert_mode_inspect.label.text }}
<div class="switch right">
<label>
{{ inspect_display_options_form.expert_mode_inspect() }}
<span class="lever"></span>
</label>
</div>
</div>
<div class="col s12" style="margin-bottom: 10px;">
{{ inspect_display_options_form.highlight_sentences.label.text }}
<div class="switch right">
<label>
{{ inspect_display_options_form.highlight_sentences() }}
<span class="lever"></span>
</label>
</div>
</div>
<div class="col s12" style="margin-bottom: 10px;">
Sentences around match
<div class="input-field right" style="margin-top: -2rem;
margin-bottom: -2rem;
height: 0px;">
<p class="range-field">
<input type="range"
id="context-sentences"
min="1"
max="10"
value="3" />
</p>
</div>
</div>
</div>
</div>
<div class="col s12 m6 l6" id="create-from-inspect">
<div class="section">
<h6 style="margin-top: 0px;">Create</h6>
<div class="divider" style="margin-bottom: 10px;"></div>
<div class="col s12">
Add to Sub Results
<div class="secondary-content right" id="create-inspect-menu">
{# The needed button is created and added via javascript #}
</div>
</div>
</div>
</div>
</div>
</form>
<div class="row section">
<h5 style="margin-top: 0px;">Context for match:
<span id="context-match-nr"></span></h5>
<div class="divider" style="margin-bottom: 10px;"></div>
<div class="col s12" >
<div id="context-results">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<a id="inspect-results-export" class="left waves-effect waves-light btn">
Export Single Context
<i class="material-icons right">file_download</i>
</a>
<a href="#!" class="modal-close waves-effect waves-light red btn">Close</a>
</div>
</div>

View File

@ -1,52 +0,0 @@
<!-- Export query results modal. Allos the user to download the results in different file formats. WIP -->
<div id="query-results-download-modal"
class="modal modal-fixed-footer no-autoinit">
<div class="modal-content">
<h4>Download your results</h4>
<p>Download your results or sub results in different file formats like JSON
or CSV, so you can reuse them in Excel or other software.
You can also simply publish your results as raw data using one of these
formats. We recommend JSON!
</p>
<table>
<tr>
<td>JSON</td>
<td>
<a class="btn waves-effect waves-light" id="download-results-json">
Download
<i class="material-icons right">file_download</i>
</a>
</td>
</tr>
<tr>
<td>CSV</td>
<td>
<a class="btn waves-effect waves-light disabled"
id="download-results-csv">
Download
<i class="material-icons right">file_download</i>
</a>
</td>
</tr>
<tr>
<td>EXCEL</td>
<td>
<a class="btn waves-effect waves-light disabled">Download
<i class="material-icons right">file_download</i>
</a>
</td>
</tr>
<tr>
<td>HTML</td>
<td>
<a class="btn waves-effect waves-light disabled">Download
<i class="material-icons right">file_download</i>
</a>
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<a href="#!" class="modal-close waves-effect waves-light red btn">Close</a>
</div>
</div>

View File

@ -1,18 +0,0 @@
<!-- Modal showing the corpus files for the current query results including title ant match count per corpus file. -->
<div id="query-builder-modal" class="modal">
<div class="modal-content">
<h4>Query builder</h4>
<p>Comming soon...</p>
</div>
<div class="modal-footer">
<a href="#!" class="btn modal-close waves-effect waves-green btn" id="query-builder-submit">Done</a>
</div>
</div>
<script>
let queryBuilderSubmitElement = document.querySelector('#query-builder-submit');
queryBuilderSubmitElement.addEventListener('click', () => {
let queryElement = document.querySelector('#query-form-query');
// queryElement.value = 'Inhalt';
});
</script>

View File

@ -1,17 +0,0 @@
<!-- Modal showing the corpus files for the current query results including title ant match count per corpus file. -->
<div id="show-corpus-files-modal" class="modal bottom-sheet">
<div class="container">
<div class="row">
<div class="section">
<div class="col s12 right-align">
<a href="#!" class="modal-close waves-effect waves-green btn red"
style="left: 5px;">Close</a>
</div>
</div>
<div class="col s12 modal-content" id="show-corpus-files-modal-content"></div>
<div class="col s12 modal-footer">
<a href="#!" class="modal-close waves-effect waves-green btn red">Close</a>
</div>
</div>
</div>
</div>

View File

@ -1,17 +0,0 @@
<!-- Modal showing the meta data for the current query results or the imported results -->
<div id="meta-data-modal" class="modal bottom-sheet">
<div class="container">
<div class="row">
<div class="section">
<div class="col s12 right-align">
<a href="#!" class="modal-close waves-effect waves-green btn red"
style="left: 5px;">Close</a>
</div>
</div>
<div class="col s12 modal-content" id="meta-data-modal-content"></div>
<div class="col s12 modal-footer">
<a href="#!" class="modal-close waves-effect waves-green btn red">Close</a>
</div>
</div>
</div>
</div>

View File

@ -1,10 +0,0 @@
<!-- Modal to show all metadata of one text/corpus file. Used in conjunction with the show_meta_data.html.j2 template. -->
<div id="modal-text-details" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Bibliographic data</h4>
<p id="bibliographic-data"></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-close waves-effect waves-green red btn">Close</a>
</div>
</div>