mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-22 20:51:58 +00:00
Improvements for the sign-up and login pages (#80)
* improvements to the login and sign up pages * margin fixes
This commit is contained in:
@@ -52,7 +52,8 @@
|
|||||||
background-color: #000000 !important;
|
background-color: #000000 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.field {
|
.form-accounts {
|
||||||
|
margin: 15%;
|
||||||
text-align: left !important;
|
text-align: left !important;
|
||||||
& i {
|
& i {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
@@ -135,10 +136,6 @@ login and sign-up pages form background color
|
|||||||
font-size: initial;
|
font-size: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-margin {
|
|
||||||
margin: 15%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
allowing to switch columns on the sign-up page on the small screen
|
allowing to switch columns on the sign-up page on the small screen
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
{#
|
{# Copyright (C) 2020 TUGRAZ Copyright (C) 2020 mojib wali Copyright (C) 2020
|
||||||
Copyright (C) 2020 TUGRAZ
|
Nikita Lvov invenio-theme-tugraz is free software; you can redistribute it
|
||||||
Copyright (C) 2020 mojib wali
|
and/or modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
Copyright (C) 2020 Nikita Lvov
|
details. #} {%- extends config.COVER_TEMPLATE %} {% from
|
||||||
|
"invenio_accounts/_macros.html" import render_field, form_errors %} {% block
|
||||||
invenio-theme-tugraz is free software; you can redistribute it and/or
|
page_body %}
|
||||||
modify it under the terms of the MIT License; see LICENSE file for more
|
|
||||||
details.
|
|
||||||
#}
|
|
||||||
{%- extends config.COVER_TEMPLATE %}
|
|
||||||
{% from "invenio_accounts/_macros.html" import render_field, form_errors %}
|
|
||||||
|
|
||||||
{% block page_body %}
|
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui centered grid">
|
<div class="ui centered grid">
|
||||||
<div class="centered row">
|
<div class="centered row">
|
||||||
@@ -18,59 +11,65 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="sign-form">
|
<div class="sign-form">
|
||||||
{%- block form_header %}
|
{%- block form_header %}
|
||||||
<img class="ui fluid image" src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_LOGIN_IMG)}}">
|
<img
|
||||||
|
class="ui fluid image"
|
||||||
|
src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_LOGIN_IMG)}}"
|
||||||
|
/>
|
||||||
{%- endblock form_header %}
|
{%- endblock form_header %}
|
||||||
|
|
||||||
<!--Login with SSO-->
|
<!--Login with SSO-->
|
||||||
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
|
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
|
||||||
<div class="login-page-button">
|
<div class="login-page-button">
|
||||||
<a href="{{ url_for('sso_saml.sso', idp='idp') }}" class="inverted tiny image label login-page-button-white">
|
<a
|
||||||
{% trans type='TUGRAZ' %} Login with {{ type }}{% endtrans %}
|
href="{{ url_for('sso_saml.sso', idp='idp') }}"
|
||||||
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px">
|
class="inverted tiny image label login-page-button-white"
|
||||||
</a>
|
>
|
||||||
</div>
|
{% trans type='TUGRAZ' %} Login with {{ type }}{% endtrans %}
|
||||||
<div class="ui inverted horizontal divider">
|
<img
|
||||||
Or
|
src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}"
|
||||||
</div>
|
height="20px"
|
||||||
{%- endif %}
|
/>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="ui inverted horizontal divider">Or</div>
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
<!--Login form-->
|
<!--Login form-->
|
||||||
{%- block form_outer %}
|
{%- block form_outer %} {%- with form = login_user_form %}
|
||||||
{%- with form = login_user_form %}
|
<form
|
||||||
<form class="ui big form form-margin" action="{{ url_for_security('login') }}" method="POST" name="login_user_form">
|
class="ui big form form-accounts"
|
||||||
<!--TODO: remove inline style-->
|
action="{{ url_for_security('login') }}"
|
||||||
{{ form.hidden_tag() }}
|
method="POST"
|
||||||
{{ form_errors(form) }}
|
name="login_user_form"
|
||||||
{{ render_field(form.email, icon="user icon", autofocus=True, errormsg=False) }}
|
>
|
||||||
{{ render_field(form.password, icon="lock icon", errormsg=False) }}
|
{{ form.hidden_tag() }} {{ form_errors(form) }} {{
|
||||||
<div class="tu-button-style">
|
render_field(form.email, icon="user icon", autofocus=True,
|
||||||
<button type="submit" class="accounts-link">
|
errormsg=False) }} {{ render_field(form.password, icon="lock icon",
|
||||||
{{ _('Log In') }}
|
errormsg=False) }}
|
||||||
</button>
|
<div class="tu-button-style centered row">
|
||||||
|
<button type="submit" class="accounts-link">{{ _('Log In') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{%- endwith %}
|
{%- endwith %} {%- endblock form_outer %} {%- block registerable %} {%- if
|
||||||
{%- endblock form_outer %}
|
security.registerable %}
|
||||||
|
|
||||||
{%- block registerable %}
|
|
||||||
{%- if security.registerable %}
|
|
||||||
<div class="column login-page-button">
|
|
||||||
<a class="inverted tiny login-page-button-white" href="{{ url_for('security.register') }}">{{ _('Sign Up ') }}
|
|
||||||
<i class="user plus icon"></i></a>
|
|
||||||
</div>
|
|
||||||
{%- endif %}
|
|
||||||
{%- endblock registerable %}
|
|
||||||
|
|
||||||
{%- block recoverable %}
|
|
||||||
{%- if security.recoverable %}
|
|
||||||
<div class="column login-page-button">
|
<div class="column login-page-button">
|
||||||
<a class="inverted tiny login-page-button-white" href="{{ url_for('security.forgot_password') }}">{{ _('Reset Password') }}
|
<a
|
||||||
<i class="unlock alternate icon"></i></a>
|
class="inverted tiny login-page-button-white"
|
||||||
|
href="{{ url_for('security.register') }}"
|
||||||
|
>{{ _('Sign Up ') }} <i class="user plus icon"></i
|
||||||
|
></a>
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %} {%- endblock registerable %} {%- block recoverable %} {%- if
|
||||||
{%- endblock recoverable %}
|
security.recoverable %}
|
||||||
|
<div class="column login-page-button">
|
||||||
|
<a
|
||||||
|
class="inverted tiny login-page-button-white"
|
||||||
|
href="{{ url_for('security.forgot_password') }}"
|
||||||
|
>{{ _('Reset Password') }} <i class="unlock alternate icon"></i
|
||||||
|
></a>
|
||||||
|
</div>
|
||||||
|
{%- endif %} {%- endblock recoverable %}
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-bottom: 10px;"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock page_body %}
|
{% endblock page_body %}
|
||||||
|
|||||||
@@ -50,33 +50,34 @@
|
|||||||
{%- endblock form_outer %}
|
{%- endblock form_outer %}
|
||||||
{%- endblock form_header %}
|
{%- endblock form_header %}
|
||||||
{%- with form = register_user_form %}
|
{%- with form = register_user_form %}
|
||||||
<form class="ui big form"action="{{ url_for_security('login') }}" method="POST" name="login_user_form" style="margin: 15%">
|
<form class="ui big form form-accounts" action="{{ url_for_security('register') }}" method="POST" name="register_user_form">
|
||||||
{{ form_errors(form) }}
|
{{ form_errors(form) }}
|
||||||
{{ form.hidden_tag() }}
|
{{ form.hidden_tag() }}
|
||||||
{%- block registration_form_fields scoped %}
|
{%- block registration_form_fields scoped %}
|
||||||
{{ render_field(form.email, icon="envelope icon", autofocus=True, errormsg=False) }}
|
{{ render_field(form.email, icon="envelope icon", autofocus=True, errormsg=False) }}
|
||||||
{{ render_field(form.password, icon="lock icon", errormsg=False) }}
|
{{ render_field(form.password, icon="lock icon", errormsg=False) }}
|
||||||
{%- if form.password_confirm %}
|
{%- if form.password_confirm %}
|
||||||
{{ render_field(form.password_confirm, icon="lock icon", errormsg=False) }}
|
{{ render_field(form.password_confirm, icon="lock icon", errormsg=False) }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endblock registration_form_fields %}
|
{%- endblock registration_form_fields %}
|
||||||
|
|
||||||
{%- if form.recaptcha %}
|
{%- if form.recaptcha %}
|
||||||
<div class="grouped fields">{{ form.recaptcha() }}</div>
|
<div class="grouped fields">{{ form.recaptcha() }}</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<div class="tu-button-style centered row">
|
<div class="tu-button-style centered row">
|
||||||
<button type="submit" class="accounts-link">
|
<button type="submit" class="accounts-link ui fluid large signup submit"">
|
||||||
{{ _('Sign Up') }}
|
{{ _('Sign Up') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
|
|
||||||
<div class="centered row login-page-button">
|
|
||||||
<a class="login-page-button-white" href="{{ url_for('sso_saml.sso', idp='idp') }}">{{ _('Sign up with TUGRAZ ') }}
|
|
||||||
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{%- endif %}
|
|
||||||
</form>
|
</form>
|
||||||
{%- endwith %}
|
{%- endwith %}
|
||||||
|
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
|
||||||
|
<div class="centered row login-page-button">
|
||||||
|
<a class="login-page-button-white" href="{{ url_for('sso_saml.sso', idp='idp') }}">{{ _('Sign up with TUGRAZ ') }}
|
||||||
|
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{%- endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user