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;
|
||||
}
|
||||
|
||||
.field {
|
||||
.form-accounts {
|
||||
margin: 15%;
|
||||
text-align: left !important;
|
||||
& i {
|
||||
color: #fff !important;
|
||||
@@ -135,10 +136,6 @@ login and sign-up pages form background color
|
||||
font-size: initial;
|
||||
}
|
||||
|
||||
.form-margin {
|
||||
margin: 15%;
|
||||
}
|
||||
|
||||
/***
|
||||
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 Nikita Lvov
|
||||
|
||||
invenio-theme-tugraz is free software; you can redistribute it and/or
|
||||
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 %}
|
||||
{# Copyright (C) 2020 TUGRAZ Copyright (C) 2020 mojib wali Copyright (C) 2020
|
||||
Nikita Lvov invenio-theme-tugraz is free software; you can redistribute it
|
||||
and/or 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 centered grid">
|
||||
<div class="centered row">
|
||||
@@ -18,59 +11,65 @@
|
||||
</div>
|
||||
<div class="sign-form">
|
||||
{%- 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 %}
|
||||
|
||||
<!--Login with SSO-->
|
||||
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
|
||||
<div class="login-page-button">
|
||||
<a href="{{ url_for('sso_saml.sso', idp='idp') }}" class="inverted tiny image label login-page-button-white">
|
||||
{% trans type='TUGRAZ' %} Login with {{ type }}{% endtrans %}
|
||||
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px">
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui inverted horizontal divider">
|
||||
Or
|
||||
</div>
|
||||
{%- endif %}
|
||||
<!--Login with SSO-->
|
||||
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
|
||||
<div class="login-page-button">
|
||||
<a
|
||||
href="{{ url_for('sso_saml.sso', idp='idp') }}"
|
||||
class="inverted tiny image label login-page-button-white"
|
||||
>
|
||||
{% trans type='TUGRAZ' %} Login with {{ type }}{% endtrans %}
|
||||
<img
|
||||
src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}"
|
||||
height="20px"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui inverted horizontal divider">Or</div>
|
||||
{%- endif %}
|
||||
|
||||
<!--Login form-->
|
||||
{%- block form_outer %}
|
||||
{%- with form = login_user_form %}
|
||||
<form class="ui big form form-margin" action="{{ url_for_security('login') }}" method="POST" name="login_user_form">
|
||||
<!--TODO: remove inline style-->
|
||||
{{ form.hidden_tag() }}
|
||||
{{ form_errors(form) }}
|
||||
{{ render_field(form.email, icon="user icon", autofocus=True, errormsg=False) }}
|
||||
{{ render_field(form.password, icon="lock icon", errormsg=False) }}
|
||||
<div class="tu-button-style">
|
||||
<button type="submit" class="accounts-link">
|
||||
{{ _('Log In') }}
|
||||
</button>
|
||||
{%- block form_outer %} {%- with form = login_user_form %}
|
||||
<form
|
||||
class="ui big form form-accounts"
|
||||
action="{{ url_for_security('login') }}"
|
||||
method="POST"
|
||||
name="login_user_form"
|
||||
>
|
||||
{{ form.hidden_tag() }} {{ form_errors(form) }} {{
|
||||
render_field(form.email, icon="user icon", autofocus=True,
|
||||
errormsg=False) }} {{ render_field(form.password, icon="lock icon",
|
||||
errormsg=False) }}
|
||||
<div class="tu-button-style centered row">
|
||||
<button type="submit" class="accounts-link">{{ _('Log In') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
{%- endwith %}
|
||||
{%- endblock form_outer %}
|
||||
|
||||
{%- 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 %}
|
||||
{%- endwith %} {%- endblock form_outer %} {%- block registerable %} {%- if
|
||||
security.registerable %}
|
||||
<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>
|
||||
<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 recoverable %}
|
||||
{%- endif %} {%- endblock registerable %} {%- block recoverable %} {%- if
|
||||
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 style="margin-bottom: 10px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock page_body %}
|
||||
</div>
|
||||
{% endblock page_body %}
|
||||
|
||||
@@ -50,33 +50,34 @@
|
||||
{%- endblock form_outer %}
|
||||
{%- endblock form_header %}
|
||||
{%- 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.hidden_tag() }}
|
||||
{%- block registration_form_fields scoped %}
|
||||
{{ render_field(form.email, icon="envelope icon", autofocus=True, errormsg=False) }}
|
||||
{{ render_field(form.password, icon="lock icon", errormsg=False) }}
|
||||
{%- if form.password_confirm %}
|
||||
{{ render_field(form.password_confirm, icon="lock icon", errormsg=False) }}
|
||||
{%- endif %}
|
||||
{{ render_field(form.email, icon="envelope icon", autofocus=True, errormsg=False) }}
|
||||
{{ render_field(form.password, icon="lock icon", errormsg=False) }}
|
||||
{%- if form.password_confirm %}
|
||||
{{ render_field(form.password_confirm, icon="lock icon", errormsg=False) }}
|
||||
{%- endif %}
|
||||
{%- endblock registration_form_fields %}
|
||||
|
||||
{%- if form.recaptcha %}
|
||||
<div class="grouped fields">{{ form.recaptcha() }}</div>
|
||||
{%- endif %}
|
||||
<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') }}
|
||||
</button>
|
||||
</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>
|
||||
{%- 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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user