diff --git a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/accounts.less b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/accounts.less new file mode 100644 index 0000000..dea9997 --- /dev/null +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/accounts.less @@ -0,0 +1,156 @@ +/* + * Copyright (C) 2020 TUGRAZ. + * 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. + */ + +.cover-page { + //text-align: center; + background-color: #ffffff; +} + +#login-tug-logo { + & g { + fill: #e4154b; + } +} + +#login-tug-logo:hover { + & g { + fill: #231f20; + } +} + +.accounts-link { + margin: 5%; + color: #fff; + border: 1px solid #fff; + background-color: transparent; +} + +.accounts-link :hover { + font-size: smaller !important; + color: white; + background-color: #000000 !important; +} + +.tu-button-style button { + cursor: pointer; + border: 1px solid #fff; + background-color: transparent; + height: 29px; + color: #fff; + font-family: "Source Sans Pro"; + font-weight: 300; + font-size: 16px; +} +.tu-button-style button:hover { + cursor: pointer; + color: white; + background-color: #000000 !important; +} + +.field { + text-align: left !important; + & i { + color: #fff !important; + } + & label { + display: flex !important; + font-weight: 300 !important; + color: white !important; + } + & input { + border: 0px none !important; + padding: 0px !important; + border-bottom: 1px solid white !important; + background-color: transparent !important; + color: white !important; + border-radius: 0 !important; + width: 100% !important; + } + & input::placeholder { + opacity: 1 !important; + color: silver !important; + } + & th { + display: block; + } + & td { + display: inline-block; + } +} + +.field > input::selection { + background: #50a2ce; +} + +.accounts-header { + font-weight: 300 !important; +} + +/*** +login and sign-up pages form background color +*/ +.sign-form { + background-color: #245b78 !important; + padding: 0 !important; + height: 100%; +} + +.tug-button-login { + display: flex; + align-items: center; + fill: #e4154b; +} +.tug-button-login :hover { + fill: #000000; +} +.login-page-button { + margin: 5%; + text-align: center !important; + & a { + padding: 5px; + text-decoration: underline !important; + cursor: pointer; + } + & a:hover { + background-color: #000; + color: #fff !important; + text-decoration: none; + } +} + +.login-page-button-white { + color: #fff !important; + font-family: "Source Sans Pro"; + font-size: initial; +} + +.login-page-button-black { + color: #000 !important; + font-family: "Source Sans Pro"; + font-size: initial; +} + +.form-margin { + margin: 15%; +} + +/*** +allowing to switch columns on the sign-up page on the small screen +*/ +.switch-grid { + display: flex; +} + +@media (max-width: 767px) { + #switch_left { + order: 2; + } + #switch_right { + order: 1; + } +} diff --git a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/theme.less b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/theme.less index 1fcb52a..61e27f1 100644 --- a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/theme.less +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/theme.less @@ -12,6 +12,7 @@ @import "overrides"; @import "frontpage"; @import "macros"; +@import "accounts"; @import (css) url("https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap"); diff --git a/invenio_theme_tugraz/config.py b/invenio_theme_tugraz/config.py index b8b6c6a..b213c6e 100644 --- a/invenio_theme_tugraz/config.py +++ b/invenio_theme_tugraz/config.py @@ -19,6 +19,9 @@ INVENIO_THEME_TUGRAZ_BASE_TEMPLATE = 'invenio_theme_tugraz/base.html' INVENIO_THEME_TUGRAZ_ICON = 'images/icon_use.png' """icon used in login page""" +INVENIO_THEME_TUGRAZ_LOGIN_IMG = 'images/login_logo.png' +"""TU Logo for forms""" + # Invenio-theme # ============ # See https://invenio-theme.readthedocs.io/en/latest/configuration.html @@ -52,6 +55,10 @@ THEME_SITENAME = _('Repository') # Invenio-accounts # ============ # See https://invenio-accounts.readthedocs.io/en/latest/configuration.html + +COVER_TEMPLATE = 'invenio_theme_tugraz/accounts/accounts_base.html' +"""Cover page template for login and sign up pages.""" + SECURITY_LOGIN_USER_TEMPLATE = 'invenio_theme_tugraz/accounts/login.html' """Login template""" diff --git a/invenio_theme_tugraz/static/images/login_logo.png b/invenio_theme_tugraz/static/images/login_logo.png new file mode 100644 index 0000000..7d5747a Binary files /dev/null and b/invenio_theme_tugraz/static/images/login_logo.png differ diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html new file mode 100644 index 0000000..e7fb619 --- /dev/null +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html @@ -0,0 +1,76 @@ +{# + Copyright (C) 2020 TUGRAZ + 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. +#} + +{{ webpack['invenio-theme-tugraz-theme.css'] }} + +{% extends config.THEME_BASE_TEMPLATE %} + + +{%- block body %} +
+ {%- block flashmessages %} + {%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%} + {{ flashed_messages() }} + {%- endblock flashmessages %} +
+ {% block page_header %} +
+ + {%- block brand %} + {%- if config.THEME_LOGO %} + + + + + {%- elif config.THEME_SITENAME %} + + {{ _(config.THEME_SITENAME) }} + + {% endif %} + {%- endblock brand %} +
+ {% endblock page_header %} +
+ {%- block page_body %} + {%- endblock page_body %} + {% block page_footer %} + {% endblock page_footer %} +
+ {%- endblock body %} diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login.html index a4e5c5b..1f53894 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login.html @@ -1,74 +1,76 @@ {# Copyright (C) 2020 TUGRAZ - Copyright (C) 2020 mojib wali. + 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 "invenio_theme/page_cover.html" %} +{%- extends config.COVER_TEMPLATE %} {% from "invenio_accounts/_macros.html" import render_field, form_errors %} {% block page_body %} -
-
- +
+
+
+

{{ _('Log In') }}

+
+
{%- block form_header %} -

{{ _('Log in to account') }}

+ {%- endblock form_header %} - {%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %} - -
-
- - {% trans type='TUG' %} Log in with {{ type }}{% endtrans %} - + + {%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %} + +
+ Or +
+ {%- endif %} + + + {%- block form_outer %} + {%- with form = 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) }} +
+
- -
- + + {%- endwith %} + {%- endblock form_outer %} + + {%- block registerable %} + {%- if security.registerable %} + + {%- endif %} + {%- endblock registerable %} -
- Or + {%- block recoverable %} + {%- if security.recoverable %} + {%- endif %} - - {%- block form_outer %} - {%- with form = 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) }} - -
- {%- endwith %} - {%- endblock form_outer %} - - + {%- endblock recoverable %}
- - {%- block registerable %} - {%- if security.registerable %} -
- {% trans sitename=config.ACCOUNTS_SITENAME %}New to {{ sitename }}?{% endtrans %} - {{ _('Sign Up') }} -
- {%- endif %} - {%- endblock registerable %} +
- - {%- block recoverable %} - {%- if security.recoverable %} - {{ _('Forgot password?') }} - {%- endif %} - {%- endblock recoverable %} -{% endblock page_body %} +
+{% endblock page_body %} \ No newline at end of file diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html index 3e2b9b7..e4d23d9 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html @@ -1,55 +1,86 @@ {# -*- coding: utf-8 -*- - This file is part of Invenio. - Copyright (C) 2015-2020 CERN. + Copyright (C) 2020 TUGRAZ + Copyright (C) 2020 mojib wali + Copyright (C) 2020 Nikita Lvov Invenio 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.ACCOUNTS_COVER_TEMPLATE %} +{%- extends config.COVER_TEMPLATE %} {% from "invenio_accounts/_macros.html" import render_field, form_errors %} {% block page_body %} +
+
+
+

{{ _('Create an Account') }}

+
+ +
+
+

{{ _('Citeable. Discoverable.') }}

+

{{ _('Uploads get a Digital Object Identifier (DOI) to make them easily and uniquely citeable.')}} +

{{ _('Communities.') }}

+

{{ _('Accept or reject uploads to your own community (e.g workshops, EU projects, institutions or entire disciplines).') }} +

{{ _('Trusted Research Data Management') }}

+

{{ _('Built on top of TU Graz expertise in managing of the research data from the Graz University of Technology.') }} +

+
+

{{ _('Already have an account?') }}

+
+ + {%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %} + + {%- endif %} +
+
-
-
- - - {%- block form_header %} -

- {% trans sitename=config.ACCOUNTS_SITENAME %}Sign up for an {{ sitename }} account!{% endtrans %} -

- {%- endblock form_header %} - - {%- with form = register_user_form %} -
+
+
+ {%- block form_header %} + + {%- block form_outer %} + {%- endblock form_outer %} + {%- endblock form_header %} + {%- with form = register_user_form %} + {{ form_errors(form) }} {{ form.hidden_tag() }} {%- block registration_form_fields scoped %} - {{ render_field(form.email, icon="user 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 %}
{{ form.recaptcha() }}
{%- endif %} - - +
+ +
+ {%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %} + + {%- endif %} - {%- endwith %} - + {%- endwith %} +
-
- {{ _('Already have an account?') }} - {{ _('Log In') }} -
+
{% endblock page_body %}