mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	More Streamlining
This commit is contained in:
		
							
								
								
									
										6
									
								
								app/templates/_base/dropdowns.html.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								app/templates/_base/dropdowns.html.j2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
{% if current_user.is_authenticated %}
 | 
			
		||||
<ul class="dropdown-content" id="nav-account-dropdown-content">
 | 
			
		||||
  <li><a href="{{ url_for('settings.settings') }}"><i class="material-icons left">settings</i>Settings</a></li>
 | 
			
		||||
  <li><a href="{{ url_for('auth.logout') }}"><i class="material-icons left">logout</i>Log out</a></li>
 | 
			
		||||
</ul>
 | 
			
		||||
{% endif %}
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
 | 
			
		||||
      {# nopaque logo+wordmark #}
 | 
			
		||||
      <a href="{{ url_for('main.index') }}" class="brand-logo center" style="height: 100%;">
 | 
			
		||||
        <img src="{{ url_for('static', filename='images/nopaque-logo+wordmark.png') }}" alt="" class="py-3" style="height: 100%;">
 | 
			
		||||
        <img src="{{ url_for('static', filename='images/nopaque_-_logo+wordmark.png') }}" alt="" class="py-3" style="height: 100%;">
 | 
			
		||||
      </a>
 | 
			
		||||
 | 
			
		||||
      {# right items #}
 | 
			
		||||
@@ -19,7 +19,7 @@
 | 
			
		||||
        {# avatar, username and email #}
 | 
			
		||||
        {# shown for authenticated users #}
 | 
			
		||||
        <li style="height: 100%;">
 | 
			
		||||
          <a href="#!" class="dropdown-trigger no-autoinit" data-target="nav-more-dropdown" id="nav-more-dropdown-trigger" style="height: 100%;">
 | 
			
		||||
          <a href="#!" class="dropdown-trigger no-autoinit" data-target="nav-account-dropdown-content" id="nav-account-dropdown-trigger" style="height: 100%;">
 | 
			
		||||
            <img src="{{ url_for('users.user_avatar', user_id=current_user.id) }}" alt="" class="left circle py-3 mr-1" style="height: 100%;">
 | 
			
		||||
            {{ current_user.username }} ({{ current_user.email }})
 | 
			
		||||
          </a>
 | 
			
		||||
@@ -27,18 +27,14 @@
 | 
			
		||||
        {% else %}
 | 
			
		||||
        {# log in and register items #}
 | 
			
		||||
        {# shown for unauthenticated users on all devices #}
 | 
			
		||||
        <li {% if request.path == url_for('auth.login') %}class="active"{% endif %}><a href="{{ url_for('auth.login') }}"><i class="material-icons left">login</i>Log in</a></li>
 | 
			
		||||
        <li {% if request.path == url_for('auth.register') %}class="active"{% endif %}><a href="{{ url_for('auth.register') }}"><i class="material-icons left">assignment</i>Register</a></li>
 | 
			
		||||
        <li {% if request.path == url_for('auth.login') %}class="active"{% endif %}>
 | 
			
		||||
          <a href="{{ url_for('auth.login') }}"><i class="material-icons left">login</i>Log in</a>
 | 
			
		||||
        </li>
 | 
			
		||||
        <li {% if request.path == url_for('auth.register') %}class="active"{% endif %}>
 | 
			
		||||
          <a href="{{ url_for('auth.register') }}"><i class="material-icons left">assignment</i>Register</a>
 | 
			
		||||
        </li>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
      </ul>
 | 
			
		||||
    </div>
 | 
			
		||||
  </nav>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% if current_user.is_authenticated %}
 | 
			
		||||
<ul class="dropdown-content" id="nav-more-dropdown">
 | 
			
		||||
  <li><a href="{{ url_for('settings.settings') }}"><i class="material-icons left">settings</i>Settings</a></li>
 | 
			
		||||
  <li><a href="{{ url_for('auth.logout') }}"><i class="material-icons left">logout</i>Log out</a></li>
 | 
			
		||||
</ul>
 | 
			
		||||
{% endif %}
 | 
			
		||||
 
 | 
			
		||||
@@ -10,11 +10,6 @@
 | 
			
		||||
    </div>
 | 
			
		||||
  </li>
 | 
			
		||||
 | 
			
		||||
  {# fake-navbar #}
 | 
			
		||||
  {# shown for large devices #}
 | 
			
		||||
  <li class="primary-color z-depth-1 hide-on-med-and-down" style="height: 64px;">
 | 
			
		||||
  </li>
 | 
			
		||||
 | 
			
		||||
  {# general items #}
 | 
			
		||||
  {# {% if current_user.can('USE_API') %}
 | 
			
		||||
  <li>
 | 
			
		||||
@@ -78,18 +73,22 @@
 | 
			
		||||
  {# administration items #}
 | 
			
		||||
  {% if current_user.can('ADMINISTRATE') %}
 | 
			
		||||
  <li><div class="divider"></div></li>
 | 
			
		||||
  <li><a class="subheader">Administration</a></li>
 | 
			
		||||
  <li>
 | 
			
		||||
    <a class="waves-effect" href="{{ url_for('admin.admin') }}"><i class="material-icons">admin_panel_settings</i>Administration</a>
 | 
			
		||||
    <a class="waves-effect" href="{{ url_for('admin.corpora') }}"><i class="nopaque-icons">I</i>Corpora</a>
 | 
			
		||||
  </li>
 | 
			
		||||
  <li>
 | 
			
		||||
    <a class="waves-effect" href="{{ url_for('admin.users') }}"><i class="material-icons">manage_accounts</i>Users</a>
 | 
			
		||||
  </li>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
 | 
			
		||||
  {# account items #}
 | 
			
		||||
  <li><div class="divider"></div></li>
 | 
			
		||||
  <li><a class="subheader">Account</a></li>
 | 
			
		||||
  <li>
 | 
			
		||||
  <li class="hide-on-large-only"><div class="divider"></div></li>
 | 
			
		||||
  <li class="hide-on-large-only"><a class="subheader">Account</a></li>
 | 
			
		||||
  <li class="hide-on-large-only">
 | 
			
		||||
    <a class="waves-effect" href="{{ url_for('settings.settings') }}"><i class="material-icons">settings</i>Settings</a>
 | 
			
		||||
  </li>
 | 
			
		||||
  <li>
 | 
			
		||||
  <li class="hide-on-large-only">
 | 
			
		||||
    <a class="waves-effect" href="{{ url_for('auth.logout') }}"><i class="material-icons">logout</i>Log out</a>
 | 
			
		||||
  </li>
 | 
			
		||||
</ul>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,10 @@
 | 
			
		||||
{% extends "materialize/base.html.j2" %}
 | 
			
		||||
 | 
			
		||||
{% block html_attribs %} lang="en"{% endblock html_attribs %}
 | 
			
		||||
{% if title is not defined %}
 | 
			
		||||
{% set title = 'nopaque' %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{% block html_attribs %}lang="en"{% endblock html_attribs %}
 | 
			
		||||
 | 
			
		||||
{% block head %}
 | 
			
		||||
{{ super() }}
 | 
			
		||||
@@ -32,6 +36,12 @@
 | 
			
		||||
{% block main_attribs %} class="background-color"{% endblock main_attribs %}
 | 
			
		||||
{% block main %}
 | 
			
		||||
{% block page_content %}{% endblock page_content %}
 | 
			
		||||
<div id="dropdowns">
 | 
			
		||||
  {% block dropdowns %}
 | 
			
		||||
  {% include "_base/dropdowns.html.j2" %}
 | 
			
		||||
  {% endblock dropdowns %}
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="modals">
 | 
			
		||||
  {% block modals %}
 | 
			
		||||
  {% include "_base/modals.html.j2" %}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,14 @@
 | 
			
		||||
{% if title is not defined %}
 | 
			
		||||
{% set title = 'Title' %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{% block doc %}
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html{% block html_attribs %}{% endblock html_attribs %}>
 | 
			
		||||
<html {% block html_attribs %}{% endblock html_attribs %}>
 | 
			
		||||
  {% block html %}
 | 
			
		||||
  <head>
 | 
			
		||||
    {% block head %}
 | 
			
		||||
    <title>{% block title %}{{title|default}}{% endblock title %}</title>
 | 
			
		||||
    <title>{% block title %}{{ title }}{% endblock title %}</title>
 | 
			
		||||
 | 
			
		||||
    {% block metas %}
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
			
		||||
@@ -16,9 +20,9 @@
 | 
			
		||||
    {% endblock styles %}
 | 
			
		||||
    {% endblock head %}
 | 
			
		||||
  </head>
 | 
			
		||||
  <body{% block body_attribs %}{% endblock body_attribs %}>
 | 
			
		||||
  <body {% block body_attribs %}{% endblock body_attribs %}>
 | 
			
		||||
    {% block body %}
 | 
			
		||||
    <header{% block header_attribs %}{% endblock header_attribs %}>
 | 
			
		||||
    <header {% block header_attribs %}{% endblock header_attribs %}>
 | 
			
		||||
      {% block header %}
 | 
			
		||||
      {% block navbar %}
 | 
			
		||||
      {% endblock navbar %}
 | 
			
		||||
@@ -27,11 +31,11 @@
 | 
			
		||||
      {% endblock header %}
 | 
			
		||||
    </header>
 | 
			
		||||
 | 
			
		||||
    <main{% block main_attribs %}{% endblock main_attribs %}>
 | 
			
		||||
    <main {% block main_attribs %}{% endblock main_attribs %}>
 | 
			
		||||
      {% block main %}{% endblock main %}
 | 
			
		||||
    </main>
 | 
			
		||||
 | 
			
		||||
    <footer{% block footer_attribs %}{% endblock footer_attribs %}>
 | 
			
		||||
    <footer {% block footer_attribs %}{% endblock footer_attribs %}>
 | 
			
		||||
      {% block footer %}{% endblock footer %}
 | 
			
		||||
    </footer>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -23,13 +23,12 @@
 | 
			
		||||
            <i class="material-icons caret">keyboard_arrow_right</i>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="collapsible-body">
 | 
			
		||||
            <div style="overflow: auto;">
 | 
			
		||||
            <div class="clearfix">
 | 
			
		||||
              <p class="left"><i class="material-icons">public</i></p>
 | 
			
		||||
              <p class="left" style="margin-left: 10px;">
 | 
			
		||||
              <p class="left ml-1">
 | 
			
		||||
                Public status<br>
 | 
			
		||||
                <span class="light">Choose whether your profile is visible to other users.</span>
 | 
			
		||||
              </p>
 | 
			
		||||
              <br class="hide-on-med-and-down">
 | 
			
		||||
              <div class="switch right">
 | 
			
		||||
                <label>
 | 
			
		||||
                  <input {% if user.is_public %}checked{% endif %} id="profile-is-public-switch" type="checkbox">
 | 
			
		||||
@@ -37,9 +36,9 @@
 | 
			
		||||
                </label>
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div style="overflow: auto;">
 | 
			
		||||
            <div class="clearfix">
 | 
			
		||||
              <p class="left"><i class="material-icons">badge</i></p>
 | 
			
		||||
              <p class="left" style="margin-left: 10px;">
 | 
			
		||||
              <p class="left ml-1">
 | 
			
		||||
                Public data<br>
 | 
			
		||||
                <span class="light">Choose which data is visible on your profile.</span>
 | 
			
		||||
              </p>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user