Skip to content
Snippets Groups Projects
Commit 23441dab authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

intermediate

parent 0ef7355c
Branches
Tags
No related merge requests found
Showing
with 1226 additions and 1126 deletions
/*
* 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 (in our
* case header, main and footer) gets an offset equal to the width of the
* sidenav.
*/
@media only screen and (min-width : 993px) {
header, main, footer {padding-left: 300px;}
.modal:not(.bottom-sheet) {left: 300px;}
.navbar-fixed > nav {width: calc(100% - 300px)}
}
/*
* Force the footer to always stay on the bottom of the page regardless of how
* little content is on the page.
*/
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1 0 auto;
}
/*
* ### Start sticky footer ###
* Force the footer to always stay on the bottom of the page regardless of how
* little content is on the page.
*/
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1 0 auto;
}
/* ### End sticky footer ### */
/* add custom bold class */ /* add custom bold class */
.bold { .bold {
font-weight: bold; font-weight: bold;
......
...@@ -4,12 +4,8 @@ ...@@ -4,12 +4,8 @@
*/ */
var nopaque = {}; var nopaque = {};
// nopaque ressources
nopaque.socket = undefined;
// User data // User data
nopaque.user = {}; nopaque.user = {};
nopaque.user.isAuthenticated = undefined;
nopaque.user.settings = {}; nopaque.user.settings = {};
nopaque.user.settings.darkMode = undefined; nopaque.user.settings.darkMode = undefined;
nopaque.corporaSubscribers = []; nopaque.corporaSubscribers = [];
...@@ -25,81 +21,76 @@ nopaque.foreignCorporaSubscribers = []; ...@@ -25,81 +21,76 @@ nopaque.foreignCorporaSubscribers = [];
nopaque.foreignJobsSubscribers = []; nopaque.foreignJobsSubscribers = [];
nopaque.foreignQueryResultsSubscribers = []; nopaque.foreignQueryResultsSubscribers = [];
nopaque.flashedMessages = undefined;
// nopaque functions // nopaque functions
nopaque.socket = {}; nopaque.socket = io({transports: ['websocket']});
nopaque.socket.init = function() { // Add event handlers
nopaque.socket = io({transports: ['websocket']}); nopaque.socket.on("user_data_stream_init", function(msg) {
// Add event handlers nopaque.user = JSON.parse(msg);
nopaque.socket.on("user_data_stream_init", function(msg) { for (let subscriber of nopaque.corporaSubscribers) {
nopaque.user = JSON.parse(msg); subscriber._init(nopaque.user.corpora);
for (let subscriber of nopaque.corporaSubscribers) { }
subscriber._init(nopaque.user.corpora); for (let subscriber of nopaque.jobsSubscribers) {
} subscriber._init(nopaque.user.jobs);
for (let subscriber of nopaque.jobsSubscribers) { }
subscriber._init(nopaque.user.jobs); for (let subscriber of nopaque.queryResultsSubscribers) {
} subscriber._init(nopaque.user.query_results);
for (let subscriber of nopaque.queryResultsSubscribers) { }
subscriber._init(nopaque.user.query_results); });
}
}); nopaque.socket.on("user_data_stream_update", function(msg) {
var patch;
nopaque.socket.on("user_data_stream_update", function(msg) {
var patch; patch = JSON.parse(msg);
nopaque.user = jsonpatch.apply_patch(nopaque.user, patch);
patch = JSON.parse(msg); corpora_patch = patch.filter(operation => operation.path.startsWith("/corpora"));
nopaque.user = jsonpatch.apply_patch(nopaque.user, patch); jobs_patch = patch.filter(operation => operation.path.startsWith("/jobs"));
corpora_patch = patch.filter(operation => operation.path.startsWith("/corpora")); query_results_patch = patch.filter(operation => operation.path.startsWith("/query_results"));
jobs_patch = patch.filter(operation => operation.path.startsWith("/jobs")); for (let subscriber of nopaque.corporaSubscribers) {
query_results_patch = patch.filter(operation => operation.path.startsWith("/query_results")); subscriber._update(corpora_patch);
for (let subscriber of nopaque.corporaSubscribers) { }
subscriber._update(corpora_patch); for (let subscriber of nopaque.jobsSubscribers) {
} subscriber._update(jobs_patch);
for (let subscriber of nopaque.jobsSubscribers) { }
subscriber._update(jobs_patch); for (let subscriber of nopaque.queryResultsSubscribers) {
} subscriber._update(query_results_patch);
for (let subscriber of nopaque.queryResultsSubscribers) { }
subscriber._update(query_results_patch); if (["all", "end"].includes(nopaque.user.settings.job_status_site_notifications)) {
} for (operation of jobs_patch) {
if (["all", "end"].includes(nopaque.user.settings.job_status_site_notifications)) { /* "/jobs/{jobId}/..." -> ["{jobId}", ...] */
for (operation of jobs_patch) { pathArray = operation.path.split("/").slice(2);
/* "/jobs/{jobId}/..." -> ["{jobId}", ...] */ if (operation.op === "replace" && pathArray[1] === "status") {
pathArray = operation.path.split("/").slice(2); if (nopaque.user.settings.job_status_site_notifications === "end" && !["complete", "failed"].includes(operation.value)) {continue;}
if (operation.op === "replace" && pathArray[1] === "status") { nopaque.flash(`[<a href="/jobs/${pathArray[0]}">${nopaque.user.jobs[pathArray[0]].title}</a>] New status: ${operation.value}`, "job");
if (nopaque.user.settings.job_status_site_notifications === "end" && !["complete", "failed"].includes(operation.value)) {continue;}
nopaque.flash(`[<a href="/jobs/${pathArray[0]}">${nopaque.user.jobs[pathArray[0]].title}</a>] New status: ${operation.value}`, "job");
}
} }
} }
}); }
});
nopaque.socket.on("foreign_user_data_stream_init", function(msg) { nopaque.socket.on("foreign_user_data_stream_init", function(msg) {
nopaque.foreignUser = JSON.parse(msg); nopaque.foreignUser = JSON.parse(msg);
for (let subscriber of nopaque.foreignCorporaSubscribers) { for (let subscriber of nopaque.foreignCorporaSubscribers) {
subscriber._init(nopaque.foreignUser.corpora); subscriber._init(nopaque.foreignUser.corpora);
} }
for (let subscriber of nopaque.foreignJobsSubscribers) { for (let subscriber of nopaque.foreignJobsSubscribers) {
subscriber._init(nopaque.foreignUser.jobs); subscriber._init(nopaque.foreignUser.jobs);
} }
for (let subscriber of nopaque.foreignQueryResultsSubscribers) { for (let subscriber of nopaque.foreignQueryResultsSubscribers) {
subscriber._init(nopaque.foreignUser.query_results); subscriber._init(nopaque.foreignUser.query_results);
} }
}); });
nopaque.socket.on("foreign_user_data_stream_update", function(msg) { nopaque.socket.on("foreign_user_data_stream_update", function(msg) {
var patch; var patch;
patch = JSON.parse(msg); patch = JSON.parse(msg);
nopaque.foreignUser = jsonpatch.apply_patch(nopaque.foreignUser, patch); nopaque.foreignUser = jsonpatch.apply_patch(nopaque.foreignUser, patch);
corpora_patch = patch.filter(operation => operation.path.startsWith("/corpora")); corpora_patch = patch.filter(operation => operation.path.startsWith("/corpora"));
jobs_patch = patch.filter(operation => operation.path.startsWith("/jobs")); jobs_patch = patch.filter(operation => operation.path.startsWith("/jobs"));
query_results_patch = patch.filter(operation => operation.path.startsWith("/query_results")); query_results_patch = patch.filter(operation => operation.path.startsWith("/query_results"));
for (let subscriber of nopaque.foreignCorporaSubscribers) {subscriber._update(corpora_patch);} for (let subscriber of nopaque.foreignCorporaSubscribers) {subscriber._update(corpora_patch);}
for (let subscriber of nopaque.foreignJobsSubscribers) {subscriber._update(jobs_patch);} for (let subscriber of nopaque.foreignJobsSubscribers) {subscriber._update(jobs_patch);}
for (let subscriber of nopaque.foreignQueryResultsSubscribers) {subscriber._update(query_results_patch);} for (let subscriber of nopaque.foreignQueryResultsSubscribers) {subscriber._update(query_results_patch);}
}); });
}
nopaque.Forms = {}; nopaque.Forms = {};
nopaque.Forms.init = function() { nopaque.Forms.init = function() {
...@@ -173,32 +164,10 @@ nopaque.Forms.init = function() { ...@@ -173,32 +164,10 @@ nopaque.Forms.init = function() {
} }
} }
nopaque.Navigation = {};
nopaque.Navigation.init = function() {
/* ### Initialize sidenav-main ### */
for (let entry of document.querySelectorAll("#sidenav-main a")) {
if (entry.href === window.location.href) {
entry.parentNode.classList.add("active");
}
}
}
nopaque.flash = function() { nopaque.flash = function(message, category) {
var classes, toast, toastActionElement; let toast;
let toastActionElement;
switch (arguments.length) {
case 1:
category = "message";
message = arguments[0];
break;
case 2:
message = arguments[0];
category = arguments[1];
break;
default:
console.error("Usage: nopaque.flash(message) or nopaque.flash(message, category)")
}
switch (category) { switch (category) {
case "corpus": case "corpus":
...@@ -219,27 +188,5 @@ nopaque.flash = function() { ...@@ -219,27 +188,5 @@ nopaque.flash = function() {
<i class="material-icons">close</i> <i class="material-icons">close</i>
</button>`}); </button>`});
toastActionElement = toast.el.querySelector('.toast-action[data-action="close"]'); toastActionElement = toast.el.querySelector('.toast-action[data-action="close"]');
if (toastActionElement) { toastActionElement.addEventListener('click', () => {toast.dismiss();});
toastActionElement.addEventListener('click', function() {
toast.dismiss();
});
}
} }
document.addEventListener('DOMContentLoaded', () => {
// Disable all option elements with no value
for (let optionElement of document.querySelectorAll('option[value=""]')) {
optionElement.disabled = true;
}
M.AutoInit();
M.CharacterCounter.init(document.querySelectorAll('input[data-length][type="text"]'));
M.Dropdown.init(document.querySelectorAll('#nav-notifications, #nav-account'),
{alignment: 'right', constrainWidth: false, coverTrigger: false});
nopaque.Forms.init();
nopaque.Navigation.init();
while (nopaque.flashedMessages.length) {
flashedMessage = nopaque.flashedMessages.shift();
nopaque.flash(flashedMessage[1], flashedMessage[0]);
}
});
{% set colors = {'primary': '#00426f',
'secondary': '#b1b3b4',
'corpus_analysis': '#aa9cc9',
'corpus_analysis_darken': '#6b3f89',
'corpus_analysis_lighten': '#ebe8f6',
'file_setup': '#d5dc95',
'file_setup_darken': '#a1b300',
'file_setup_lighten': '#f2f3e1',
'nlp': '#98acd2',
'nlp_darken': '#0064a3',
'nlp_lighten': '#e5e8f5',
'ocr': '#a9d8c8',
'ocr_darken': '#00a58b',
'ocr_lighten': '#e7f4f1'} %}
{% if main_class is not defined %}
{% set main_class = 'grey lighten-5' %}
{% endif %}
{% extends "nopaque.html.j2" %} {% extends "nopaque.html.j2" %}
{% import 'materialize/wtf.html.j2' as wtf %}
{% set headline = ' ' %} {% block styles %}
{{ super() }}
{% block page_content %}
<style> <style>
main { main {
background-image: url("{{ url_for('static', filename='images/parallax_lq/04_german_text_book_paper.jpg') }}"); background-image: url("{{ url_for('static', filename='images/parallax_lq/04_german_text_book_paper.jpg') }}");
...@@ -10,39 +10,45 @@ ...@@ -10,39 +10,45 @@
background-size: cover; background-size: cover;
} }
</style> </style>
{% endblock styles %}
<div class="col s12 m4"> {% block page_content %}
<div class="card medium"> <div class="container">
<div class="card-content"> <div class="row">
<h2>Log in</h2> <div class="col s12 m4">
<p>Want to boost your research and get going? nopaque is free and no download is needed. Register now!</p> <div class="card medium">
</div> <div class="card-content">
<div class="card-action right-align"> <h1>{{ title }}</h1>
<a class="btn" href="{{ url_for('auth.register') }}"><i class="material-icons left">person_add</i>Register</a> <p>Want to boost your research and get going? nopaque is free and no download is needed. Register now!</p>
</div>
<div class="card-action right-align">
<a class="btn" href="{{ url_for('.register') }}"><i class="material-icons left">person_add</i>Register</a>
</div>
</div>
</div> </div>
</div>
</div>
<div class="col s12 m8"> <div class="col s12 m8">
<div class="card medium"> <div class="card medium">
<form method="POST"> <form method="POST">
<div class="card-content"> <div class="card-content">
{{ login_form.hidden_tag() }} {{ login_form.hidden_tag() }}
{{ M.render_field(login_form.user, material_icon='person') }} {{ wtf.render_field(login_form.user, material_icon='person') }}
{{ M.render_field(login_form.password, material_icon='vpn_key') }} {{ wtf.render_field(login_form.password, material_icon='vpn_key') }}
<div class="row" style="margin-bottom: 0;"> <div class="row" style="margin-bottom: 0;">
<div class="col s6 left-align"> <div class="col s6 left-align">
<a href="{{ url_for('auth.reset_password_request') }}">Forgot your password?</a> <a href="{{ url_for('.reset_password_request') }}">Forgot your password?</a>
</div>
<div class="col s6 right-align">
{{ wtf.render_field(login_form.remember_me) }}
</div>
</div>
</div> </div>
<div class="col s6 right-align"> <div class="card-action right-align">
{{ M.render_field(login_form.remember_me) }} {{ wtf.render_field(login_form.submit, material_icon='send') }}
</div> </div>
</div> </form>
</div>
<div class="card-action right-align">
{{ M.render_field(login_form.submit, material_icon='send') }}
</div> </div>
</form> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% extends "nopaque.html.j2" %} {% extends "nopaque.html.j2" %}
{% import 'materialize/wtf.html.j2' as wtf %}
{% set headline = ' ' %} {% block styles %}
{{ super() }}
{% block page_content %}
<style> <style>
main { main {
background-image: url("{{ url_for('static', filename='images/parallax_lq/02_concept_document_focus_letter.jpg') }}"); background-image: url("{{ url_for('static', filename='images/parallax_lq/02_concept_document_focus_letter.jpg') }}");
...@@ -10,32 +10,38 @@ ...@@ -10,32 +10,38 @@
background-size: cover; background-size: cover;
} }
</style> </style>
{% endblock styles %}
<div class="col s12 m4"> {% block page_content %}
<div class="card medium"> <div class="container">
<div class="card-content"> <div class="row">
<h2>Register</h2> <div class="col s12 m4">
<p>Simply enter a username and password to receive your registration email. After that you can start right away.</p> <div class="card medium">
<p>It goes without saying that the <a href="{{ url_for('main.privacy_policy') }}">General Data Protection Regulation</a> applies, only necessary data is stored.</p> <div class="card-content">
<p>Please also read our <a href="{{ url_for('main.terms_of_use') }}">terms of use</a> before signing up for nopaque!</p> <h1>Register</h1>
<p>Simply enter a username and password to receive your registration email. After that you can start right away.</p>
<p>It goes without saying that the <a href="{{ url_for('main.privacy_policy') }}">General Data Protection Regulation</a> applies, only necessary data is stored.</p>
<p>Please also read our <a href="{{ url_for('main.terms_of_use') }}">terms of use</a> before signing up for nopaque!</p>
</div>
</div>
</div> </div>
</div>
</div>
<div class="col s12 m8"> <div class="col s12 m8">
<div class="card medium"> <div class="card medium">
<form method="POST"> <form method="POST">
<div class="card-content"> <div class="card-content">
{{ registration_form.hidden_tag() }} {{ registration_form.hidden_tag() }}
{{ M.render_field(registration_form.username, data_length='64', material_icon='person') }} {{ wtf.render_field(registration_form.username, data_length='64', material_icon='person') }}
{{ M.render_field(registration_form.password, data_length='128', material_icon='vpn_key') }} {{ wtf.render_field(registration_form.password, data_length='128', material_icon='vpn_key') }}
{{ M.render_field(registration_form.password_confirmation, data_length='128', material_icon='vpn_key') }} {{ wtf.render_field(registration_form.password_confirmation, data_length='128', material_icon='vpn_key') }}
{{ M.render_field(registration_form.email, class_='validate', material_icon='email', type='email') }} {{ wtf.render_field(registration_form.email, class_='validate', material_icon='email', type='email') }}
</div>
<div class="card-action right-align">
{{ wtf.render_field(registration_form.submit, material_icon='send') }}
</div>
</form>
</div> </div>
<div class="card-action right-align"> </div>
{{ M.render_field(registration_form.submit, material_icon='send') }}
</div>
</form>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% extends "nopaque.html.j2" %} {% extends "nopaque.html.j2" %}
{% import 'materialize/wtf.html.j2' as wtf %}
{% block page_content %} {% block page_content %}
<div class="col s12 m4"> <div class="container">
<h3>Lorem ipsum</h3> <div class="row">
<p>dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,</p> <div class="col s12">
</div> <h1>{{ title }}</h1>
</div>
<div class="col s12 m8"> <div class="col s12 m4">
<div class="card"> <p>dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,</p>
<form method="POST"> </div>
<div class="card-content">
{{ reset_password_form.hidden_tag() }} <div class="col s12 m8">
{{ M.render_field(reset_password_form.password, data_length='128') }} <div class="card">
{{ M.render_field(reset_password_form.password_confirmation, data_length='128') }} <form method="POST">
</div> <div class="card-content">
<div class="card-action right-align"> {{ reset_password_form.hidden_tag() }}
{{ M.render_field(reset_password_form.submit, material_icon='send') }} {{ wtf.render_field(reset_password_form.password, data_length='128') }}
{{ wtf.render_field(reset_password_form.password_confirmation, data_length='128') }}
</div>
<div class="card-action right-align">
{{ wtf.render_field(reset_password_form.submit, material_icon='send') }}
</div>
</form>
</div> </div>
</form> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% extends "nopaque.html.j2" %} {% extends "nopaque.html.j2" %}
{% import 'materialize/wtf.html.j2' as wtf %}
{% block page_content %} {% block page_content %}
<div class="col s12 m4"> <div class="container">
<p>After entering your email address you will receive instructions on how to reset your password.</p> <div class="row">
</div> <div class="col s12">
<h1>{{ title }}</h1>
</div>
<div class="col s12 m8"> <div class="col s12 m4">
<div class="card"> <p>After entering your email address you will receive instructions on how to reset your password.</p>
<form method="POST"> </div>
<div class="card-content">
{{ reset_password_request_form.hidden_tag() }} <div class="col s12 m8">
{{ M.render_field(reset_password_request_form.email, class_='validate', material_icon='email', type='email') }} <div class="card">
</div> <form method="POST">
<div class="card-action right-align"> <div class="card-content">
{{ M.render_field(reset_password_request_form.submit, material_icon='send') }} {{ reset_password_request_form.hidden_tag() }}
{{ wtf.render_field(reset_password_request_form.email, class_='validate', material_icon='email', type='email') }}
</div>
<div class="card-action right-align">
{{ wtf.render_field(reset_password_request_form.submit, material_icon='send') }}
</div>
</form>
</div> </div>
</form> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% extends "nopaque.html.j2" %} {% extends "nopaque.html.j2" %}
{% block title %}Opaque - Confirm your account{% endblock %}
{% block page_content %} {% block page_content %}
<div class="page-header"> <div class="container">
<h1> <div class="row">
Hello, {{ current_user.username }}! <div class="col s12">
</h1> <h1>{{ title }}</h1>
<h3>You have not confirmed your account yet.</h3> </div>
<p>
Before you can access this site you need to confirm your account. <div class="col s12">
Check your inbox, you should have received an email with a confirmation link. <div class="card">
</p> <div class="card-content">
<p> <span class="card-title">Hello, {{ current_user.username }}!</span>
Need another confirmation email? <p><b>You have not confirmed your account yet.</b></p>
<a href="{{ url_for('auth.resend_confirmation') }}">Click here</a> <p>Before you can access this site you need to confirm your account. Check your inbox, you should have received an email with a confirmation link.</p>
</p> <p>Need another confirmation email? <a href="{{ url_for('.resend_confirmation') }}">Click here</a></p>
</div>
<div class="card-action right-align">
<a class="btn" href="{{ url_for('.register') }}"><i class="material-icons left">person_add</i>Register</a>
</div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}
This diff is collapsed.
{% extends "nopaque.html.j2" %} {% extends "nopaque.html.j2" %}
{% block page_content %} {% block page_content %}
<div class="col s12"> <div class="container">
<h3>My Corpora and Query results</h3>
<p>Create a corpus to interactively perform linguistic analysis or import query results to save interesting passages.</p>
<div class="row"> <div class="row">
<div class="col s12"> <div class="col s12">
<ul class="tabs"> <h1>{{ title }}</h1>
<li class="tab col s6"><a class="active" href="#corpora">Corpora</a></li>
<li class="tab col s6"><a href="#query-results">Query results</a></li>
</ul>
</div> </div>
<div class="col s12" id="corpora">
<div class="card"> <div class="col s12">
<div class="card-content"> <h3>My Corpora and Query results</h3>
<div class="input-field"> <p>Create a corpus to interactively perform linguistic analysis or import query results to save interesting passages.</p>
<i class="material-icons prefix">search</i> <div class="row">
<input id="search-corpus" class="search" type="search"></input> <div class="col s12">
<label for="search-corpus">Search corpus</label> <ul class="tabs">
<li class="tab col s6"><a class="active" href="#corpora">Corpora</a></li>
<li class="tab col s6"><a href="#query-results">Query results</a></li>
</ul>
</div>
<div class="col s12" id="corpora">
<div class="card">
<div class="card-content">
<div class="input-field">
<i class="material-icons prefix">search</i>
<input id="search-corpus" class="search" type="search"></input>
<label for="search-corpus">Search corpus</label>
</div>
<ul class="pagination paginationTop"></ul>
<table class="highlight">
<thead>
<tr>
<th></th>
<th>
<span class="sort" data-sort="title">Title</span>
<span class="sort" data-sort="description">Description</span>
</th>
<th><span class="sort" data-sort="status">Status</span></th>
<th></th>
</tr>
</thead>
<tbody class="list"></tbody>
</table>
<ul class="pagination paginationBottom"></ul>
</div>
<div class="card-action right-align">
<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>
<ul class="pagination paginationTop"></ul>
<table class="highlight">
<thead>
<tr>
<th></th>
<th>
<span class="sort" data-sort="title">Title</span>
<span class="sort" data-sort="description">Description</span>
</th>
<th><span class="sort" data-sort="status">Status</span></th>
<th></th>
</tr>
</thead>
<tbody class="list"></tbody>
</table>
<ul class="pagination paginationBottom"></ul>
</div> </div>
<div class="card-action right-align"> <div class="col s12" id="query-results">
<a class="waves-effect waves-light btn" href="{{ url_for('corpora.add_corpus') }}">New corpus<i class="material-icons right">add</i></a> <div class="card">
<div class="card-content">
<div class="input-field">
<i class="material-icons prefix">search</i>
<input id="search-query-results" class="search" type="search"></input>
<label for="search-query-results">Search query result</label>
</div>
<ul class="pagination paginationTop"></ul>
<table class="highlight responsive-table">
<thead>
<tr>
<th>
<span class="sort" data-sort="title">Title</span> and<br>
<span class="sort" data-sort="description">Description</span>
</th>
<th>
<span class="sort" data-sort="corpus">Corpus</span> and<br>
<span class="sort" data-sort="query">Query</span>
</th>
<th>{# Actions #}</th>
</tr>
</thead>
<tbody class="list">
<tr class="show-if-only-child">
<td colspan="5">
<span class="card-title"><i class="material-icons left">folder</i>Nothing here...</span>
<p>No query results yet imported.</p>
</td>
</tr>
</tbody>
</table>
<ul class="pagination paginationBottom"></ul>
</div>
<div class="card-action right-align">
<a class="waves-effect waves-light btn" href="{{ url_for('corpora.add_query_result') }}">Add query result<i class="material-icons right">file_upload</i></a>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="col s12" id="query-results">
<div class="col s12" id="jobs">
<h3>My Jobs</h3>
<p>A job is the execution of a service provided by nopaque. You can create any number of jobs and let them be processed simultaneously.</p>
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<div class="input-field"> <div class="input-field">
<i class="material-icons prefix">search</i> <i class="material-icons prefix">search</i>
<input id="search-query-results" class="search" type="search"></input> <input id="search-job" class="search" type="search"></input>
<label for="search-query-results">Search query result</label> <label for="search-job">Search job</label>
</div> </div>
<ul class="pagination paginationTop"></ul> <ul class="pagination paginationTop"></ul>
<table class="highlight responsive-table"> <table class="highlight">
<thead> <thead>
<tr> <tr>
<th><span class="sort" data-sort="service">Service</span></th>
<th> <th>
<span class="sort" data-sort="title">Title</span> and<br> <span class="sort" data-sort="title">Title</span>
<span class="sort" data-sort="description">Description</span> <span class="sort" data-sort="description">Description</span>
</th> </th>
<th> <th><span class="sort" data-sort="status">Status</span></th>
<span class="sort" data-sort="corpus">Corpus</span> and<br> <th></th>
<span class="sort" data-sort="query">Query</span>
</th>
<th>{# Actions #}</th>
</tr> </tr>
</thead> </thead>
<tbody class="list"> <tbody class="list"></tbody>
<tr class="show-if-only-child">
<td colspan="5">
<span class="card-title"><i class="material-icons left">folder</i>Nothing here...</span>
<p>No query results yet imported.</p>
</td>
</tr>
</tbody>
</table> </table>
<ul class="pagination paginationBottom"></ul> <ul class="pagination paginationBottom"></ul>
</div> </div>
<div class="card-action right-align"> <div class="card-action right-align">
<a class="waves-effect waves-light btn" href="{{ url_for('corpora.add_query_result') }}">Add query result<i class="material-icons right">file_upload</i></a> <p><a class="modal-trigger waves-effect waves-light btn" href="#" data-target="new-job-modal"><i class="material-icons left">add</i>New job</a></p>
</div> </div>
</div> </div>
</div> <div id="new-job-modal" class="modal">
</div> <div class="modal-content">
</div> <h4>Select a service</h4>
<div class="row">
<div class="col s12" id="jobs"> <div class="col s12 m4">
<h3>My Jobs</h3> <div class="card-panel center-align hoverable">
<p>A job is the execution of a service provided by nopaque. You can create any number of jobs and let them be processed simultaneously.</p> <br>
<div class="card"> <a href="{{ url_for('services.service', service='file-setup') }}" class="btn-floating btn-large file-setup-color darken waves-effect waves-light" style="transform: scale(2);">
<div class="card-content"> <i class="material-icons service" data-service="file-setup"></i>
<div class="input-field"> </a>
<i class="material-icons prefix">search</i> <p>&nbsp;</p>
<input id="search-job" class="search" type="search"></input> <p class="file-setup-color-text"><b>File setup</b></p>
<label for="search-job">Search job</label> <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> <a href="{{ url_for('services.service', service='file-setup') }}" class="waves-effect waves-light btn file-setup-color darken">Create Job</a>
<ul class="pagination paginationTop"></ul> </div>
<table class="highlight">
<thead>
<tr>
<th><span class="sort" data-sort="service">Service</span></th>
<th>
<span class="sort" data-sort="title">Title</span>
<span class="sort" data-sort="description">Description</span>
</th>
<th><span class="sort" data-sort="status">Status</span></th>
<th></th>
</tr>
</thead>
<tbody class="list"></tbody>
</table>
<ul class="pagination paginationBottom"></ul>
</div>
<div class="card-action right-align">
<p><a class="modal-trigger waves-effect waves-light btn" href="#" data-target="new-job-modal"><i class="material-icons left">add</i>New job</a></p>
</div>
</div>
<div id="new-job-modal" class="modal">
<div class="modal-content">
<h4>Select a service</h4>
<div class="row">
<div class="col s12 m4">
<div class="card-panel center-align hoverable">
<br>
<a href="{{ url_for('services.service', service='file-setup') }}" class="btn-floating btn-large file-setup-color darken waves-effect waves-light" style="transform: scale(2);">
<i class="material-icons service" data-service="file-setup"></i>
</a>
<p>&nbsp;</p>
<p class="file-setup-color-text"><b>File setup</b></p>
<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>
<a href="{{ url_for('services.service', service='file-setup') }}" class="waves-effect waves-light btn file-setup-color darken">Create Job</a>
</div> </div>
</div> <div class="col s12 m4">
<div class="col s12 m4"> <div class="card-panel center-align hoverable">
<div class="card-panel center-align hoverable"> <br>
<br> <a href="{{ url_for('services.service', service='ocr') }}" class="btn-floating btn-large ocr-color darken waves-effect waves-light" style="transform: scale(2);">
<a href="{{ url_for('services.service', service='ocr') }}" class="btn-floating btn-large ocr-color darken waves-effect waves-light" style="transform: scale(2);"> <i class="material-icons service" data-service="ocr"></i>
<i class="material-icons service" data-service="ocr"></i> </a>
</a> <p>&nbsp;</p>
<p>&nbsp;</p> <p class="ocr-color-text"><b>Optical Character Recognition</b></p>
<p class="ocr-color-text"><b>Optical Character Recognition</b></p> <p class="light">nopaque converts your image data – like photos or scans – into text data through a process called OCR. This step enables you to proceed with further computational analysis of your documents.</p>
<p class="light">nopaque converts your image data – like photos or scans – into text data through a process called OCR. This step enables you to proceed with further computational analysis of your documents.</p> <a href="{{ url_for('services.service', service='ocr') }}" class="waves-effect waves-light btn ocr-color darken">Create Job</a>
<a href="{{ url_for('services.service', service='ocr') }}" class="waves-effect waves-light btn ocr-color darken">Create Job</a> </div>
</div> </div>
</div> <div class="col s12 m4">
<div class="col s12 m4"> <div class="card-panel center-align hoverable">
<div class="card-panel center-align hoverable"> <br>
<br> <a href="{{ url_for('services.service', service='nlp') }}" class="btn-floating btn-large nlp-color darken waves-effect waves-light" style="transform: scale(2);">
<a href="{{ url_for('services.service', service='nlp') }}" class="btn-floating btn-large nlp-color darken waves-effect waves-light" style="transform: scale(2);"> <i class="material-icons service" data-service="nlp"></i>
<i class="material-icons service" data-service="nlp"></i> </a>
</a> <p>&nbsp;</p>
<p>&nbsp;</p> <p class="nlp-color-text"><b>Natural Language Processing</b></p>
<p class="nlp-color-text"><b>Natural Language Processing</b></p> <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>
<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> <a href="{{ url_for('services.service', service='nlp') }}" class="waves-effect waves-light btn nlp-color darken">Create Job</a>
<a href="{{ url_for('services.service', service='nlp') }}" class="waves-effect waves-light btn nlp-color darken">Create Job</a> </div>
</div> </div>
</div>
</div>
<div class="modal-footer">
<a href="#!" class="modal-close waves-effect waves-light btn-flat">Close</a>
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer">
<a href="#!" class="modal-close waves-effect waves-light btn-flat">Close</a>
</div>
</div> </div>
</div> </div>
{% endblock %}
{% block scripts %}
{{ super() }}
<script type="module"> <script type="module">
import {RessourceList} from '../../static/js/nopaque.lists.js'; import {RessourceList} from '../../static/js/nopaque.lists.js';
let corpusList = new RessourceList("corpora", nopaque.corporaSubscribers, "Corpus"); let corpusList = new RessourceList("corpora", nopaque.corporaSubscribers, "Corpus");
let jobList = new RessourceList("jobs", nopaque.jobsSubscribers, "Job"); let jobList = new RessourceList("jobs", nopaque.jobsSubscribers, "Job");
let queryResultList = new RessourceList("query-results", nopaque.queryResultsSubscribers, "QueryResult"); let queryResultList = new RessourceList("query-results", nopaque.queryResultsSubscribers, "QueryResult");
</script> </script>
{% endblock scripts %}
{% endblock %}
{% extends "nopaque.html.j2" %} {% extends "nopaque.html.j2" %}
{% import 'materialize/wtf.html.j2' as wtf %}
{% set parallax = True %}
{% block page_content %} {% block page_content %}
<div class="section white"> <div class="section white">
...@@ -157,19 +156,19 @@ ...@@ -157,19 +156,19 @@
<div class="card-content"> <div class="card-content">
<span class="card-title">Log in</span> <span class="card-title">Log in</span>
{{ login_form.hidden_tag() }} {{ login_form.hidden_tag() }}
{{ M.render_field(login_form.user, material_icon='person') }} {{ wtf.render_field(login_form.user, material_icon='person') }}
{{ M.render_field(login_form.password, material_icon='vpn_key') }} {{ wtf.render_field(login_form.password, material_icon='vpn_key') }}
<div class="row" style="margin-bottom: 0;"> <div class="row" style="margin-bottom: 0;">
<div class="col s6 left-align"> <div class="col s6 left-align">
<a href="{{ url_for('auth.reset_password_request') }}">Forgot your password?</a> <a href="{{ url_for('auth.reset_password_request') }}">Forgot your password?</a>
</div> </div>
<div class="col s6 right-align"> <div class="col s6 right-align">
{{ M.render_field(login_form.remember_me) }} {{ wtf.render_field(login_form.remember_me) }}
</div> </div>
</div> </div>
</div> </div>
<div class="card-action right-align"> <div class="card-action right-align">
{{ M.render_field(login_form.submit, material_icon='send') }} {{ wtf.render_field(login_form.submit, material_icon='send') }}
</div> </div>
</form> </form>
</div> </div>
......
{% extends "nopaque.html.j2" %} {% extends "nopaque.html.j2" %}
{% block page_content %} {% block page_content %}
<div class="col s12"> <div class="container">
<div class="card" id="beta-launch"> <div class="row">
<div class="card-content"> <div class="col s12">
<span class="card-title">nopaque's beta launch</span> <h1>{{ title }}</h1>
<p>Dear users</p> </div>
<br> <div class="col s12">
<p>A few days ago we went live with nopaque. Right now nopaque is still in its Beta phase. So some bugs are to be expected. If you encounter any bugs or some feature is not working as expected please send as an email using the feedback button at the botton of the page in the footer!</p> <div class="card" id="beta-launch">
<p>We are happy to help you with any issues and will use the feedback to fix all mentioned bugs!</p> <div class="card-content">
<span class="card-title">nopaque's beta launch</span>
<p>Dear users</p>
<br>
<p>A few days ago we went live with nopaque. Right now nopaque is still in its Beta phase. So some bugs are to be expected. If you encounter any bugs or some feature is not working as expected please send as an email using the feedback button at the botton of the page in the footer!</p>
<p>We are happy to help you with any issues and will use the feedback to fix all mentioned bugs!</p>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
This diff is collapsed.
{% extends "nopaque.html.j2" %} {% extends "nopaque.html.j2" %}
{% block page_content %} {% block page_content %}
<div class="container">
<div class="row">
<div class="col s12">
<h1>{{ title }}</h1>
</div>
<div class="col s12"> <div class="col s12">
<p>With the usage of the nopaque platform you declare your acceptance of the General Terms of Use and that you have taken note of the legal framework and the data protection declaration.</p> <p>With the usage of the nopaque platform you declare your acceptance of the General Terms of Use and that you have taken note of the legal framework and the data protection declaration.</p>
</div> </div>
<div class="col s12"> <div class="col s12">
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<span class="card-title">§ 1 Scope</span> <span class="card-title">§ 1 Scope</span>
<p>The General Terms of Use for the nopaque platform apply to everyone who uses the system as an authorised user in the sense of <b>§ 2</b> (1) of the General Terms of Use. By using the system and with your consent you accept these terms of use.</p> <p>The General Terms of Use for the nopaque platform apply to everyone who uses the system as an authorised user in the sense of <b>§ 2</b> (1) of the General Terms of Use. By using the system and with your consent you accept these terms of use.</p>
</div>
</div>
</div> </div>
</div>
</div>
<div class="col s12"> <div class="col s12">
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<span class="card-title">§ 2 Right of use</span> <span class="card-title">§ 2 Right of use</span>
<p>(1) The nopaque platform is available to users exclusively for the purposes of teaching and research. Any other use, especially for business, commercial is not permitted. The following groups shall be entitled to use the nopaque platform:</p> <p>(1) The nopaque platform is available to users exclusively for the purposes of teaching and research. Any other use, especially for business, commercial is not permitted. The following groups shall be entitled to use the nopaque platform:</p>
<ul class="browser-default"> <ul class="browser-default">
<li>students, teaching staff and employees at Bielefeld University</li> <li>students, teaching staff and employees at Bielefeld University</li>
<li>external researchers from outside the University Bielefeld</li> <li>external researchers from outside the University Bielefeld</li>
</ul> </ul>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>(2) The use of the system is free of charge.</p> <p>(2) The use of the system is free of charge.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>(3) The duration of the right of use ends with the deletion of the user account by the user (see <b>§ 7</b>)</p> <p>(3) The duration of the right of use ends with the deletion of the user account by the user (see <b>§ 7</b>)</p>
</div>
</div>
</div> </div>
</div>
</div>
<div class="col s12"> <div class="col s12">
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<span class="card-title">§ 3 Purpose of the Services</span> <span class="card-title">§ 3 Purpose of the Services</span>
<p>nopaque custom-built web application which serves as a platform for preprocessing and analysing digital copies of various text based research data (books, letters, etc.) in different files and formats. nopaque converts image data – like photos or scans – into text data through OCR making it machine readable. This step enables to proceed with further computational analysis of the documents. By means of computational linguistic data processing (tokenization, lemmatization, part-of-speech tagging and named-entity recognition) nopaque extracts additional information from texts.</p> <p>nopaque custom-built web application which serves as a platform for preprocessing and analysing digital copies of various text based research data (books, letters, etc.) in different files and formats. nopaque converts image data – like photos or scans – into text data through OCR making it machine readable. This step enables to proceed with further computational analysis of the documents. By means of computational linguistic data processing (tokenization, lemmatization, part-of-speech tagging and named-entity recognition) nopaque extracts additional information from texts.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>(1) Change of service</p> <p>(1) Change of service</p>
<p>The provider of the nopaque platform is entitled to change and supplement the scope of functions of nopaque without prior notice. This could result from a thematic and scientific reorientation of the project.</p> <p>The provider of the nopaque platform is entitled to change and supplement the scope of functions of nopaque without prior notice. This could result from a thematic and scientific reorientation of the project.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>(2) Support</p> <p>(2) Support</p>
<p>On nopaque, a contact form is available. As far as possible the SFB 1288 INF staff will try to provide user support.</p> <p>On nopaque, a contact form is available. As far as possible the SFB 1288 INF staff will try to provide user support.</p>
</div>
</div>
</div> </div>
</div>
</div>
<div class="col s12"> <div class="col s12">
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<span class="card-title">§ 4 Obligations of the User</span> <span class="card-title">§ 4 Obligations of the User</span>
<p>(1) The system is suitable for normal security requirements. Data with a high need for protection (e.g. health data) may not be stored or processed in the nopaque platform.</p> <p>(1) The system is suitable for normal security requirements. Data with a high need for protection (e.g. health data) may not be stored or processed in the nopaque platform.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>(2) Users of nopaque are responsible for their own entered contents. The uploading of illegal content, especially content that violates criminal, personal, data protection or copyright regulations (including § 60a) is not permitted.</p> <p>(2) Users of nopaque are responsible for their own entered contents. The uploading of illegal content, especially content that violates criminal, personal, data protection or copyright regulations (including § 60a) is not permitted.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>(3) Users undertake to indemnify Bielefeld University from all claims by third parties based on the data they use and to reimburse Bielefeld University for any costs incurred by the latter due to possible infringements of rights. This also includes the costs incurred by Bielefeld University in defending itself against such claims in and out of court.</p> <p>(3) Users undertake to indemnify Bielefeld University from all claims by third parties based on the data they use and to reimburse Bielefeld University for any costs incurred by the latter due to possible infringements of rights. This also includes the costs incurred by Bielefeld University in defending itself against such claims in and out of court.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>(4) Exclusion from use</p> <p>(4) Exclusion from use</p>
<p>Bielefeld University is entitled to immediately block access to the service if there are reasonable grounds to suspect that the stored data is unlawful (e.g upload harmful files via file upload) and/or violates the rights of third parties. Other infringements of the provisions of these Terms of Use, in particular the obligations under §6 also entitle Bielefeld University to block the user. Bielefeld University shall immediately notify the user of the block and the reason for the block. The block must be lifted as soon as the suspicion is invalidated.</p> <p>Bielefeld University is entitled to immediately block access to the service if there are reasonable grounds to suspect that the stored data is unlawful (e.g upload harmful files via file upload) and/or violates the rights of third parties. Other infringements of the provisions of these Terms of Use, in particular the obligations under §6 also entitle Bielefeld University to block the user. Bielefeld University shall immediately notify the user of the block and the reason for the block. The block must be lifted as soon as the suspicion is invalidated.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>(5) Usage of Data</p> <p>(5) Usage of Data</p>
<p>The data stored by the user on the storage space intended for him may be legally protected, the responsibility for the processing of the data from these points of view lies solely with the user. By using nopaque, the user grants Bielefeld the right to process the data with the corresponding tools. At all times during processing in nopaque, data remains in the user's private storage location and will not passed on to third parties.</p> <p>The data stored by the user on the storage space intended for him may be legally protected, the responsibility for the processing of the data from these points of view lies solely with the user. By using nopaque, the user grants Bielefeld the right to process the data with the corresponding tools. At all times during processing in nopaque, data remains in the user's private storage location and will not passed on to third parties.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>(6) Release of Bielefeld University from Third-Party Claims</p> <p>(6) Release of Bielefeld University from Third-Party Claims</p>
<p>The user is responsible for the data stored by him/her in nopaque. Furthermore he/she is responsible for entering and maintaining the data and information required to use nopaque.</p> <p>The user is responsible for the data stored by him/her in nopaque. Furthermore he/she is responsible for entering and maintaining the data and information required to use nopaque.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>The user is obliged to indemnify Bielefeld University against all claims by third parties based on the data stored by him/her and to reimburse Bielefeld University for any costs incurred as a result of possible legal infringements. This also includes the costs incurred by Bielefeld University for extrajudicial and judicial defense against these claims.</p> <p>The user is obliged to indemnify Bielefeld University against all claims by third parties based on the data stored by him/her and to reimburse Bielefeld University for any costs incurred as a result of possible legal infringements. This also includes the costs incurred by Bielefeld University for extrajudicial and judicial defense against these claims.</p>
</div>
</div>
</div> </div>
</div>
</div>
<div class="col s12"> <div class="col s12">
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<span class="card-title">§ 5 Liability of Bielefeld University</span> <span class="card-title">§ 5 Liability of Bielefeld University</span>
<p>Claims for damages against Bielefeld University are excluded irrespective of the legal grounds. Bielefeld University shall not be liable for loss of data and information or other „indirect“ damages, e.g. loss of profit, loss of production, or other indirect damages. Bielefeld University shall not be liable for the loss of data to the extent that the damage is due to the fact that the user has failed to back up the data and thereby ensure that lost data can be restored with justifiable effort.</p> <p>Claims for damages against Bielefeld University are excluded irrespective of the legal grounds. Bielefeld University shall not be liable for loss of data and information or other „indirect“ damages, e.g. loss of profit, loss of production, or other indirect damages. Bielefeld University shall not be liable for the loss of data to the extent that the damage is due to the fact that the user has failed to back up the data and thereby ensure that lost data can be restored with justifiable effort.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>nopaque is available in accordance with normal operational care based on the "Best Effort" practice. No liability is assumed for the consequences of failures or errors of the nopaque platform. Bielefeld University does not guarantee that the systems will run error-free and without interruption at all times. Bielefeld University accepts no responsibility for technical quality. Nor is it liable for the content, in particular for the accuracy, completeness, and timeliness of information to which it merely provides access for use.</p> <p>nopaque is available in accordance with normal operational care based on the "Best Effort" practice. No liability is assumed for the consequences of failures or errors of the nopaque platform. Bielefeld University does not guarantee that the systems will run error-free and without interruption at all times. Bielefeld University accepts no responsibility for technical quality. Nor is it liable for the content, in particular for the accuracy, completeness, and timeliness of information to which it merely provides access for use.</p>
</div>
</div>
</div> </div>
</div>
</div>
<div class="col s12"> <div class="col s12">
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<span class="card-title">§ 6 Data Protection</span> <span class="card-title">§ 6 Data Protection</span>
<p>Information on the handling of personal data during the operation of the service can be found in the separate data protection policy.</p> <p>Information on the handling of personal data during the operation of the service can be found in the separate data protection policy.</p>
</div>
</div>
</div> </div>
</div>
</div>
<div class="col s12"> <div class="col s12">
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<span class="card-title">§ 7 Duration and Termination</span> <span class="card-title">§ 7 Duration and Termination</span>
<p>The user may terminate the use nopaque by deleting his/her account at any time without giving reasons. After deletion of the account, all users‘ data will be automatically deleted and access to the service blocked. This does not affect the user's right to delete data under data protection law.</p> <p>The user may terminate the use nopaque by deleting his/her account at any time without giving reasons. After deletion of the account, all users‘ data will be automatically deleted and access to the service blocked. This does not affect the user's right to delete data under data protection law.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
<p>Bielefeld University may exclude the user from using the service without notice for an important reason. Important reasons include, in particular, repeated violations of the provisions of these Terms of Use or of applicable laws.</p> <p>Bielefeld University may exclude the user from using the service without notice for an important reason. Important reasons include, in particular, repeated violations of the provisions of these Terms of Use or of applicable laws.</p>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% block doc %}
<!DOCTYPE html>
<html{% block html_attribs %}{% endblock html_attribs %}>
{% block html %}
<head>
{% block head %}
<title>{% block title %}{{title|default}}{% endblock title %}</title>
{% block metas %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% endblock metas %}
{% block styles %}
<link href="{{ url_for('static', filename='css/material_design_icons.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/materialize.min.css') }}" media="screen,projection" rel="stylesheet">
{% endblock styles %}
{% endblock head %}
</head>
<body{% block body_attribs %}{% endblock body_attribs %}>
{% block body %}
{% block navbar %}
{% endblock navbar %}
{% block sidenav %}
{% endblock sidenav %}
{% block content %}
{% endblock content %}
{% block scripts %}
<script src="{{ url_for('static', filename='js/materialize.min.js') }}"></script>
{% endblock scripts %}
{% endblock body %}
</body>
{% endblock html %}
</html>
{% endblock doc %}
{% macro render_field(field) %}
{% if field.type == 'BooleanField' %}
{{ render_boolean_field(field, *args, **kwargs) }}
{% elif field.type == 'DecimalRangeField' %}
{{ render_decimal_range_field(field, *args, **kwargs) }}
{% elif field.type == 'SubmitField' %}
{{ render_submit_field(field, *args, **kwargs) }}
{% elif field.type in ['FileField', 'MultipleFileField'] %}
{{ render_file_field(field, *args, **kwargs) }}
{% else %}
{% if 'class_' in kwargs and 'validate' not in kwargs['class_'] %}
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' validate'}) %}
{% else %}
{% set tmp = kwargs.update({'class_': 'validate'}) %}
{% endif %}
{{ render_generic_field(field, *args, **kwargs) }}
{% endif %}
{% endmacro %}
{% macro render_boolean_field(field) %}
{% set label = kwargs.pop('label', True) %}
<div class="switch">
{% if 'material_icon' in kwargs %}
<i class="material-icons prefix">{{ kwargs.pop('material_icon') }}</i>
{% endif %}
<label>
{{ field(*args, **kwargs) }}
<span class="lever"></span>
{% if label %}
{{ field.label.text }}
{% endif %}
</label>
{% for error in field.errors %}
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
{% endmacro %}
{% macro render_file_field(field) %}
{% set placeholder = kwargs.pop('placeholder', '') %}
<div class="file-field input-field">
<div class="btn">
<span>{{ field.label.text }}</span>
{{ field(*args, **kwargs) }}
</div>
<div class="file-path-wrapper">
<input class="file-path validate" type="text" placeholder="{{ placeholder }}">
</div>
{% for error in field.errors %}
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
{% endmacro %}
{% macro render_generic_field(field) %}
{% if field.type == 'TextAreaField' and 'materialize-textarea' not in kwargs['class_'] %}
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' materialize-textarea'}) %}
{% elif field.type == 'IntegerField' %}
{% set tmp = kwargs.update({'type': 'number'}) %}
{% endif %}
{% set label = kwargs.pop('label', True) %}
<div class="input-field">
{% if 'material_icon' in kwargs %}
<i class="material-icons prefix">{{ kwargs.pop('material_icon') }}</i>
{% endif %}
{{ field(*args, **kwargs) }}
{% if label %}
{{ field.label }}
{% endif %}
{% for error in field.errors %}
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
</div>
{% endmacro %}
{% macro render_submit_field(field) %}
{% if 'class_' in kwargs and 'btn' not in kwargs['class_'] %}
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' btn'}) %}
{% else %}
{% set tmp = kwargs.update({'class_': 'btn'}) %}
{% endif %}
{% if 'waves-effect' not in kwargs['class_'] %}
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' waves-effect'}) %}
{% endif %}
{% if 'waves-light' not in kwargs['class_'] %}
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' waves-light'}) %}
{% endif %}
<button class="{{ kwargs['class_'] }}"
id="{{ field.id }}"
name="{{ field.name }}"
type="submit"
value="{{ field.label.text }}"
{% if 'style' in kwargs %}
style="{{ kwargs.pop('style') }}"
{% endif %}>
{{ field.label.text }}
{% if 'material_icon' in kwargs %}
<i class="material-icons right">{{ kwargs.pop('material_icon') }}</i>
{% endif %}
</button>
{% endmacro %}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment