From f65dbf93425fef4d847ade15e5729b143d04c636 Mon Sep 17 00:00:00 2001 From: mb-wali <44528277+mb-wali@users.noreply.github.com> Date: Fri, 4 Sep 2020 11:58:22 +0200 Subject: [PATCH] base template for login and signup # Login & Signup templates invenio rdm default template for login and signup is using account_base template. in order to create our own these steps are taken: * Created base template for ```invenio-theme-tugraz```. * Created account base template which has only extended ```navbar``` from the header template. * Assigned the account_base template to the login and signup templates. * updated ```config.py``` with new variables for base template and account_base template. --- .../less/invenio_theme_tugraz/footer.less | 5 +- .../less/invenio_theme_tugraz/login.less | 3 + .../less/invenio_theme_tugraz/theme.less | 2 +- invenio_theme_tugraz/config.py | 11 +- .../accounts/accounts_base.html | 141 ++++++++++-------- .../invenio_theme_tugraz/accounts/login.html | 75 ---------- .../accounts/login_user.html | 70 +++++++++ .../accounts/register_user.html | 94 ++++-------- .../templates/invenio_theme_tugraz/base.html | 78 +++++++++- .../invenio_theme_tugraz/header.html | 18 +-- .../invenio_theme_tugraz/navbar.html | 88 +++++------ 11 files changed, 328 insertions(+), 257 deletions(-) create mode 100644 invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/login.less delete mode 100644 invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login.html create mode 100644 invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html 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') %} +{{ _('Uploads get a Digital Object Identifier (DOI) to make them easily and uniquely citeable.')}} -
{{ _('Accept or reject uploads to your own community (e.g workshops, EU projects, institutions or entire disciplines).') }} -
{{ _('Built on top of TU Graz expertise in managing of the research data from the Graz University of Technology.') }} -
-