mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Simplify template
This commit is contained in:
parent
e611a15aac
commit
4de2fdf6d8
@ -2,7 +2,8 @@
|
||||
|
||||
{% set full_width = False %}
|
||||
{% set roadmap = False %}
|
||||
{% set title_override = '<i class="material-icons left service" data-service="{service}" style="font-size: inherit;"></i>Job'.format(service=job.service) %}
|
||||
<!-- Override title -->
|
||||
{% set title = '<i class="material-icons left service" data-service="{service}" style="font-size: inherit;"></i>Job'.format(service=job.service) %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="col s12 m4">
|
||||
|
@ -3,13 +3,7 @@
|
||||
{% set parallax = True %}
|
||||
|
||||
{% block page_content %}
|
||||
<style media="screen">
|
||||
.grey.lighten-5 {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
</style>
|
||||
{% if current_user.is_anonymous %}
|
||||
|
||||
<div class="parallax-container">
|
||||
<div class="parallax">
|
||||
<img src="{{ url_for('static', filename='images/bible_text.jpg') }}" alt="">
|
||||
|
@ -88,56 +88,29 @@
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
{%- macro insert_page_content() -%}
|
||||
{% block page_content %}{% endblock %}
|
||||
{%- endmacro -%}
|
||||
|
||||
{% if parallax %}
|
||||
<main>
|
||||
{{ insert_page_content() }}
|
||||
</main>
|
||||
{% else %}
|
||||
<main class="grey lighten-5">
|
||||
{% if not parallax %}
|
||||
{% if not full_width %}
|
||||
<div class="container">
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h2>
|
||||
{% if title_override %}
|
||||
{{ title_override }}
|
||||
{% elif title %}
|
||||
{{ title }}
|
||||
{% else %}
|
||||
Unnamed page
|
||||
{% endif %}
|
||||
</h2>
|
||||
<h2>{% if title %}{{ title }}{% else %}Unnamed page{% endif %}</h2>
|
||||
</div>
|
||||
{% if roadmap %}
|
||||
<div class="col s12 m9 l10">
|
||||
{% else %}
|
||||
<div class="col s12">
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
{% endif %}
|
||||
{% block page_content %}
|
||||
{% endblock %}
|
||||
{% if not parallax %}
|
||||
</div>
|
||||
</div>
|
||||
{% if roadmap %}
|
||||
<div class="col hide-on-small-only m3 l2">
|
||||
<ul class="table-of-contents" id="roadmap">
|
||||
<li><b>Roadmap</b></li>
|
||||
<li><a href="{{ url_for('services.service', service='setup_files') }}">File setup</a></li>
|
||||
<li><a href="{{ url_for('services.service', service='ocr') }}">Optical Character Recognition</a></li>
|
||||
<li><a href="{{ url_for('services.service', service='nlp') }}">Natural Language Processing</a></li>
|
||||
<li><a href="{{ url_for('corpora.add_corpus') }}">Create a corpus</a></li>
|
||||
<li><a href="{{ url_for('services.service', service='corpus_analysis') }}">Corpus analysis</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
for (let entry of document.querySelectorAll(`#roadmap a`)) {
|
||||
if (entry.href === window.location.href) {entry.classList.add("active");}
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
{{ insert_page_content() }}
|
||||
</div>
|
||||
{% if not full_width %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</main>
|
||||
|
||||
|
@ -4,7 +4,8 @@
|
||||
{% set roadmap = True %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="col s12">
|
||||
<div class="col s12 m9 l10">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
@ -30,9 +31,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
<div class="col s12">
|
||||
<h3>My corpora</h3>
|
||||
<div class="card">
|
||||
<div class="card-content" id="corpora">
|
||||
@ -61,6 +62,11 @@
|
||||
<a class="waves-effect waves-light btn" href="{{ url_for('corpora.add_corpus') }}">New corpus<i class="material-icons right">add</i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col hide-on-small-only m3 l2">
|
||||
{% include 'services/roadmap.html.j2' %}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
@ -4,7 +4,8 @@
|
||||
{% set roadmap = True %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="col s12">
|
||||
<div class="col s12 m9 l10">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
@ -30,9 +31,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
<div class="col s12">
|
||||
<h3>Submit a job</h3>
|
||||
<div class="card">
|
||||
<form class="nopaque-job-form" data-progress-modal="progress-modal">
|
||||
@ -114,6 +115,11 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col hide-on-small-only m3 l2">
|
||||
{% include 'services/roadmap.html.j2' %}
|
||||
</div>
|
||||
|
||||
<div id="progress-modal" class="modal">
|
||||
|
@ -4,7 +4,8 @@
|
||||
{% set roadmap = True %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="col s12">
|
||||
<div class="col s12 m9 l10">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
@ -30,9 +31,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
<div class="col s12">
|
||||
<h3>Submit a job</h3>
|
||||
<div class="card">
|
||||
<form class="nopaque-job-form" data-progress-modal="progress-modal">
|
||||
@ -189,6 +190,11 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col hide-on-small-only m3 l2">
|
||||
{% include 'services/roadmap.html.j2' %}
|
||||
</div>
|
||||
|
||||
<div id="progress-modal" class="modal">
|
||||
|
20
app/templates/services/roadmap.html.j2
Normal file
20
app/templates/services/roadmap.html.j2
Normal file
@ -0,0 +1,20 @@
|
||||
<ul class="table-of-contents" id="roadmap">
|
||||
<li><b>Roadmap</b></li>
|
||||
<li>
|
||||
<a href="{{ url_for('services.service', service='setup_files') }}">File setup</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ url_for('services.service', service='ocr') }}">Optical Character Recognition</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ url_for('services.service', service='nlp') }}">Natural Language Processing</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ url_for('services.service', service='corpus_analysis') }}">Corpus analysis</a>
|
||||
</li>
|
||||
</ul>
|
||||
<script>
|
||||
for (let entry of document.querySelectorAll(`#roadmap a`)) {
|
||||
if (entry.href === window.location.href) {entry.classList.add("active");}
|
||||
}
|
||||
</script>
|
@ -4,7 +4,8 @@
|
||||
{% set roadmap = True %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="col s12">
|
||||
<div class="col s12 m9 l10">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
@ -20,9 +21,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
<div class="col s12">
|
||||
<h3>Submit a job</h3>
|
||||
<div class="card">
|
||||
<form class="nopaque-job-form" data-progress-modal="progress-modal">
|
||||
@ -80,6 +81,11 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col hide-on-small-only m3 l2">
|
||||
{% include 'services/roadmap.html.j2' %}
|
||||
</div>
|
||||
|
||||
<div id="progress-modal" class="modal">
|
||||
|
Loading…
Reference in New Issue
Block a user