diff --git a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/footer.less b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/footer.less index 65b57ad..d3ab161 100644 --- a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/footer.less +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/footer.less @@ -45,4 +45,7 @@ .spacer{ margin-top: 10px; - } \ No newline at end of file + } + .spacer-long{ + margin-top: 20px; +} \ No newline at end of file diff --git a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/login.less b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/login.less new file mode 100644 index 0000000..e66326d --- /dev/null +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/login.less @@ -0,0 +1,3 @@ +.ui.inverted.header{ + color:#000; +} \ No newline at end of file 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 61e27f1..aee4b23 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,7 +12,7 @@ @import "overrides"; @import "frontpage"; @import "macros"; -@import "accounts"; +@import "login"; @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 b213c6e..af3b8ff 100644 --- a/invenio_theme_tugraz/config.py +++ b/invenio_theme_tugraz/config.py @@ -14,7 +14,11 @@ INVENIO_THEME_TUGRAZ_DEFAULT_VALUE = 'foobar' """Default value for the application.""" INVENIO_THEME_TUGRAZ_BASE_TEMPLATE = 'invenio_theme_tugraz/base.html' -"""Default base template for the demo page.""" +"""TU Graz Default base template""" + +INVENIO_THEME_TUGRAZ_ACCOUNT_BASE = \ + 'invenio_theme_tugraz/accounts/accounts_base.html' +"""TU Graz Default account base template""" INVENIO_THEME_TUGRAZ_ICON = 'images/icon_use.png' """icon used in login page""" @@ -56,14 +60,15 @@ THEME_SITENAME = _('Repository') # ============ # See https://invenio-accounts.readthedocs.io/en/latest/configuration.html -COVER_TEMPLATE = 'invenio_theme_tugraz/accounts/accounts_base.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' +SECURITY_LOGIN_USER_TEMPLATE = 'invenio_theme_tugraz/accounts/login_user.html' """Login template""" SECURITY_REGISTER_USER_TEMPLATE = \ 'invenio_theme_tugraz/accounts/register_user.html' +"""Sigup template""" # Invenio-I18N # ============ 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 index e7fb619..a62604b 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html @@ -1,76 +1,89 @@ {# Copyright (C) 2020 TUGRAZ - Copyright (C) 2020 Nikita Lvov + Copyright (C) 2020 mojib wali. 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'] }} + + + + {%- block head %} + {%- block head_meta %} + + + + {%- if description %}{% endif %} + {%- if keywords %}{% endif %} + {%- if config.get('THEME_GOOGLE_SITE_VERIFICATION', None) %} + {%- for google_id in config.THEME_GOOGLE_SITE_VERIFICATION %} + + {%- endfor %} + {%- endif %} + {%- endblock head_meta %} + {%- block head_title %} + {%- set title = title or _(config.THEME_SITENAME) or _('Invenio') %} + {{title}} + {%- endblock head_title %} + {%- block head_links %} + + {%- if keywords %}{% endif %} + {%- block head_links_langs %} + {%- if alternate_urls %} + {%- for alt_ln, alternate_url in alternate_urls.items() %} + + {%- endfor %} + {%- endif %} + {%- endblock %} + {%- block head_apple_icons %} + {%- for size in [144, 114, 72, 57] %} + {%- set icon_name = 'apple-touch-icon-%d-precomposed.png' | format(size) %} + + {%- endfor %} + {%- endblock head_apple_icons %} + {%- endblock head_links %} + {%- block header %}{% endblock header %} + {%- block css %} + {{ webpack['theme.css'] }} + {{ webpack['invenio-theme-tugraz-theme.css'] }} + + + {%- endblock css %} + {%- endblock head %} + + + {%- block body %} + {%- block browserupgrade %} + + {%- endblock browserupgrade %} + {%- block body_inner %} -{% extends config.THEME_BASE_TEMPLATE %} + {%- block navbar_header %} + {%- include "invenio_theme_tugraz/navbar.html" %} + {%- endblock navbar_header %} + + {# + {%- block page_header %} + {% include config.THEME_HEADER_TEMPLATE %} + {%- endblock page_header %} + #} - -{%- 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 %} +{% include "invenio_theme/body.html" %} {%- endblock page_body %} - {% block page_footer %} - {% endblock page_footer %} -
- {%- endblock body %} + {%- endblock body_inner %} + {%- block javascript %} +{% include config.THEME_JAVASCRIPT_TEMPLATE %} + {%- endblock javascript %} + {%- block trackingcode %}{% include config.THEME_TRACKINGCODE_TEMPLATE %} + {%- endblock %} + {%- 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 deleted file mode 100644 index a62e903..0000000 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login.html +++ /dev/null @@ -1,75 +0,0 @@ -{# 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 %} -
-
-
-

{{ _('Log In') }}

-
-
- {%- block form_header %} - - {%- endblock form_header %} - - - {%- 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 %} {%- block recoverable %} {%- if - security.recoverable %} - - {%- endif %} {%- endblock recoverable %} -
-
-
-{% endblock page_body %} diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html new file mode 100644 index 0000000..f67d276 --- /dev/null +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html @@ -0,0 +1,70 @@ +{# + Copyright (C) 2020 TUGRAZ + Copyright (C) 2020 mojib wali. + + 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.INVENIO_THEME_TUGRAZ_ACCOUNT_BASE %} + + +{% from "invenio_accounts/_macros.html" import render_field, form_errors %} +{% block page_body %} +
+
+ +
+ + + {%- block registerable %} + {%- if security.registerable %} +
+ {% trans sitename=config.ACCOUNTS_SITENAME %}New to {{ sitename }}?{% endtrans %} + {{ _('Sign Up') }} +
+ {%- endif %} + {%- endblock registerable %} +
+ + {%- block recoverable %} + {%- if security.recoverable %} + + {%- endif %} + {%- endblock recoverable %} +
+{% 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 226f8b1..a82c137 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,60 +1,36 @@ -{# -*- coding: utf-8 -*- - +{# Copyright (C) 2020 TUGRAZ - Copyright (C) 2020 mojib wali - Copyright (C) 2020 Nikita Lvov + Copyright (C) 2020 mojib wali. - 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. + 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 %} + +{% extends config.INVENIO_THEME_TUGRAZ_ACCOUNT_BASE %} + {% 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 %} - - {%- block form_outer %} - {%- endblock form_outer %} - {%- endblock form_header %} - {%- with form = register_user_form %} -
+ {%- block form_header %} + + {%- endblock form_header %} + + {%- with form = 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.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) }} @@ -64,24 +40,20 @@ {%- if form.recaptcha %}
{{ form.recaptcha() }}
{%- endif %} -
- -
+ +
- {%- endwith %} - {%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %} - - {%- endif %} -
+ {%- endwith %} +
+
+ {{ _('Already have an account?') }} + {{ _('Log In') }} +
-{% endblock page_body %} +{% endblock page_body %} \ No newline at end of file diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html index 6192899..5400342 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html @@ -7,7 +7,83 @@ details. #} -{% extends config.BASE_TEMPLATE %} + + + + {%- block head %} + {%- block head_meta %} + + + + {%- if description %}{% endif %} + {%- if keywords %}{% endif %} + {%- if config.get('THEME_GOOGLE_SITE_VERIFICATION', None) %} + {%- for google_id in config.THEME_GOOGLE_SITE_VERIFICATION %} + + {%- endfor %} + {%- endif %} + {%- endblock head_meta %} + {%- block head_title %} + {%- set title = title or _(config.THEME_SITENAME) or _('Invenio') %} + {{title}} + {%- endblock head_title %} + {%- block head_links %} + + {%- if keywords %}{% endif %} + {%- block head_links_langs %} + {%- if alternate_urls %} + {%- for alt_ln, alternate_url in alternate_urls.items() %} + + {%- endfor %} + {%- endif %} + {%- endblock %} + {%- block head_apple_icons %} + {%- for size in [144, 114, 72, 57] %} + {%- set icon_name = 'apple-touch-icon-%d-precomposed.png' | format(size) %} + + {%- endfor %} + {%- endblock head_apple_icons %} + {%- endblock head_links %} + {%- block header %}{% endblock header %} + {%- block css %} + {{ webpack['theme.css'] }} + {{ webpack['invenio-theme-tugraz-theme.css'] }} + + + {%- endblock css %} + {%- endblock head %} + + + {%- block body %} + {%- block browserupgrade %} + + {%- endblock browserupgrade %} + {%- block body_inner %} + {%- block page_header %} +{% include config.THEME_HEADER_TEMPLATE %} + {%- endblock page_header %} + {%- block page_body %} +{% include "invenio_theme/body.html" %} + {%- endblock page_body %} + + {%- block page_footer %} +{% include config.THEME_FOOTER_TEMPLATE %} + {%- endblock page_footer %} + + {%- endblock body_inner %} + {%- block javascript %} +{% include config.THEME_JAVASCRIPT_TEMPLATE %} + {%- endblock javascript %} + {%- block trackingcode %}{% include config.THEME_TRACKINGCODE_TEMPLATE %} + {%- endblock %} + {%- endblock body %} + + diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html index 6b893cc..fe8a38e 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html @@ -12,10 +12,11 @@ {%- block navbar %} - + {%- endblock navbar %} + {%- block flashmessages %} {%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%} {{ flashed_messages() }} {%- endblock %} +{# {%- block breadcrumbs %} {%- include "invenio_theme/breadcrumbs.html" %} {%- endblock breadcrumbs %} - +#} \ No newline at end of file diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html index 854b9dd..ced0db4 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html @@ -7,44 +7,48 @@ details. #} - -
-
-
-
+
\ No newline at end of file