mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Merge content into main package
This commit is contained in:
parent
2dc630e877
commit
ea6ccae76a
@ -34,8 +34,6 @@ def create_app():
|
||||
app.register_blueprint(admin_blueprint, url_prefix='/admin')
|
||||
from .auth import auth as auth_blueprint
|
||||
app.register_blueprint(auth_blueprint, url_prefix='/auth')
|
||||
from .content import content as content_blueprint
|
||||
app.register_blueprint(content_blueprint, url_prefix='/content')
|
||||
from .corpora import corpora as corpora_blueprint
|
||||
app.register_blueprint(corpora_blueprint, url_prefix='/corpora')
|
||||
from .errors import errors as errors_blueprint
|
||||
|
@ -1,5 +0,0 @@
|
||||
from flask import Blueprint
|
||||
|
||||
|
||||
content = Blueprint('content', __name__)
|
||||
from . import views # noqa
|
@ -1,14 +0,0 @@
|
||||
from flask import render_template
|
||||
from . import content
|
||||
|
||||
|
||||
@content.route('/about_faq')
|
||||
def about_faq():
|
||||
return render_template('content/about_faq.html.j2',
|
||||
title='About Nopaqe and FAQ')
|
||||
|
||||
|
||||
@content.route('/news_launch')
|
||||
def news_launch():
|
||||
return render_template('content/news_launch.html.j2',
|
||||
title='')
|
@ -20,25 +20,21 @@ def index():
|
||||
title='nopaque')
|
||||
|
||||
|
||||
@main.route('/about_and_faq')
|
||||
def about_and_faq():
|
||||
return render_template('main/about_and_faq.html.j2', title='About and faq')
|
||||
|
||||
|
||||
@main.route('/dashboard')
|
||||
@login_required
|
||||
def dashboard():
|
||||
return render_template('main/dashboard.html.j2', title='Dashboard')
|
||||
|
||||
|
||||
@main.route('/poster', methods=['GET', 'POST'])
|
||||
def poster():
|
||||
login_form = LoginForm(prefix='login-form')
|
||||
if login_form.validate_on_submit():
|
||||
user = User.query.filter_by(username=login_form.user.data).first()
|
||||
if user is None:
|
||||
user = User.query.filter_by(email=login_form.user.data).first()
|
||||
if user is not None and user.verify_password(login_form.password.data):
|
||||
login_user(user, login_form.remember_me.data)
|
||||
return redirect(url_for('main.dashboard'))
|
||||
flash('Invalid email/username or password.')
|
||||
return render_template('main/poster.html.j2', login_form=login_form,
|
||||
title='Poster')
|
||||
|
||||
@main.route('/news')
|
||||
def news():
|
||||
return render_template('main/news.html.j2', title='News')
|
||||
|
||||
|
||||
@main.route('/privacy_policy')
|
||||
@ -51,4 +47,5 @@ def privacy_policy():
|
||||
@main.route('/terms_of_use')
|
||||
def terms_of_use():
|
||||
return render_template('main/terms_of_use.html.j2',
|
||||
title='General Terms of Use of the platform nopaque') # noqa
|
||||
title='General Terms of Use of the platform '
|
||||
'nopaque')
|
||||
|
@ -1,25 +0,0 @@
|
||||
{% extends "nopaque.html.j2" %}
|
||||
|
||||
{% block page_content %}
|
||||
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Beta Launch of nopaque!</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>
|
||||
|
||||
{% endblock %}
|
@ -256,4 +256,4 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
15
web/app/templates/main/news.html.j2
Normal file
15
web/app/templates/main/news.html.j2
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends "nopaque.html.j2" %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="col s12">
|
||||
<div class="card" id="beta-launch">
|
||||
<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>
|
||||
{% endblock %}
|
@ -147,9 +147,7 @@
|
||||
<ul class="right">
|
||||
{% if current_user.is_authenticated %}
|
||||
<li>
|
||||
<a id="nav-notifications"
|
||||
class="dropdown-trigger no-autoinit"
|
||||
href="#!" data-target="nav-notifications-dropdown">
|
||||
<a id="nav-notifications" class="dropdown-trigger no-autoinit" href="{{ url_for('main.news') }}" data-target="nav-notifications-dropdown">
|
||||
<span class="hide-on-small-only">News</span>
|
||||
<i class="material-icons right">notifications</i>
|
||||
</a>
|
||||
@ -191,7 +189,7 @@
|
||||
<!-- Dropdown menus for the navbar -->
|
||||
<div id="nav-notifications-dropdown" class="dropdown-content">
|
||||
<li>
|
||||
<a href="{{ url_for('content.news_launch') }}"><i class="material-icons">error_outline</i>Beta Launch!</a>
|
||||
<a href="{{ url_for('main.news', _anchor='beta-launch') }}"><i class="material-icons">error_outline</i>nopaque's beta launch</a>
|
||||
</li>
|
||||
</div>
|
||||
<ul id="nav-account-dropdown" class="dropdown-content">
|
||||
@ -286,7 +284,7 @@
|
||||
<span>© 2020 Bielefeld University</span>
|
||||
</div>
|
||||
<div class="col s12 m9 right-align">
|
||||
<a class="btn-small blue waves-effect waves-light" href="{{ url_for('content.about_faq') }}"><i class="left material-icons">info_outline</i>About/FAQ</a>
|
||||
<a class="btn-small blue waves-effect waves-light" href="{{ url_for('main.about_and_faq') }}"><i class="left material-icons">info_outline</i>About and faq</a>
|
||||
<a class="btn-small pink waves-effect waves-light" href="mailto:{{ config.NOPAQUE_CONTACT }}?subject={{ config.NOPAQUE_MAIL_SUBJECT_PREFIX }} Contact"><i class="left material-icons">rate_review</i>Contact</a>
|
||||
<a class="btn-small green waves-effect waves-light" href="mailto:{{ config.NOPAQUE_CONTACT }}?subject={{ config.NOPAQUE_MAIL_SUBJECT_PREFIX }} Feedback"><i class="left material-icons">feedback</i>Feedback</a>
|
||||
<a class="btn-small orange waves-effect waves-light" href="https://gitlab.ub.uni-bielefeld.de/sfb1288inf/opaque"><i class="left material-icons">code</i>GitLab</a>
|
||||
|
Loading…
Reference in New Issue
Block a user