diff --git a/MANIFEST.in b/MANIFEST.in index f22e827..f741613 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -39,4 +39,5 @@ recursive-include invenio_theme_tugraz *.js recursive-include invenio_theme_tugraz *.png recursive-include invenio_theme_tugraz *.scss recursive-include invenio_theme_tugraz *.svg +recursive-include invenio_theme_tugraz *.less recursive-include tests *.py 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 new file mode 100644 index 0000000..c3994da --- /dev/null +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/footer.less @@ -0,0 +1,29 @@ +/* + * 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. + */ + + #footer { + color: #fff; + + &.footer-bottom { + background-color: #E4154B; + padding-top: 15px; + padding-bottom: 15px; + font-weight: 300; + font-size: 14px; + + a { + text-decoration: none; + color: #ffffffd6; + font-weight: 600; + + &:hover, &:focus { + color: #ffffff; + } + } + } + } diff --git a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/header.less b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/header.less new file mode 100644 index 0000000..6be0bee --- /dev/null +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/header.less @@ -0,0 +1,237 @@ +/* + * 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. + */ + + #int-menu-q-home-icon { + width: 18px; + height: 18px; + vertical-align: top; + fill: red; + + } + + /*****logo section******/ + .affiliation-spacer{ + display: table-cell; + vertical-align: middle; + width: 100%; + } + + .affiliation-logo { + display: table-cell; + padding: 0 50px 0 0; + vertical-align: middle; + white-space: nowrap; + } + .affiliation { + background-color: white; + display: table; + margin: 0 auto 80px; + max-width: 1060px; + width: 100%; + text-decoration: none; + + } + + .affiliation-text { + display: table-cell; + font-size: 17px; + padding: 0 0 0 50px; + vertical-align: middle; + white-space: nowrap; + } + + .affiliation-logo-claim { + display: inline-block; + font-size: 12px; + letter-spacing: 2px; + line-height: 17px; + padding: 0 17px 0 0; + text-align: right; + vertical-align: top; + } + + a { + color: inherit; + text-decoration: none; + transition: background-color 0.15s ease 0s, color 0.15s ease 0s; + } + /*****END logo section******/ + + + + .short-menu { + display: table; + height: 49px; + width: 100%; + } + .short-menu-left { + border-right: 1px solid black; + display: table-cell; + text-align: right; + width: 50%; + } + .short-menu-right { + display: table-cell; + vertical-align: top; + width: 50%; + color:#000000; + } + .short-menu-left-search { + display: inline-block; + margin: 12px 9px 6px 0; + color:#000000; + } + .short-menu-right-h { + cursor: pointer; + display: inline-block; + margin: 12px 0 6px 9px; + padding: 5px; + } + + .short-menu-right-main-menu { + display: inline-block; + margin-right: 3px; + vertical-align: top; + width: 21px; + } + svg:not(:root) { + overflow: hidden; + } + + + + /***********MAIN menu*************/ + .header { + min-width: 0; + + position: relative; + width: 100%; + //height: 100%; + } + + .main-menu-box { + box-sizing: border-box; + display: table; + margin: 0 auto; + max-width: 1060px; + padding: 9px 50px 8px; + text-align: left; + width: 100%; + } + + .main-menu-entry { + display: table-cell; + text-align: center; + } + .main-menu-entry a { + box-decoration-break: clone; + padding: 5px 8px; + } + + .main-menu-entry a:hover{ + background-color: #000000; + color: #ffffff; + text-decoration: none; + } + + .affiliation-text a:hover{ + background-color: #000000; + color: #ffffff; + text-decoration : none; + } + + .affiliation-logo :hover{ + text-decoration: none; + } + + .short-menu-right :hover{ + background-color: #000000; + color: #ffffff; + } + + .main-menu { + border-bottom: 1px solid #000; + box-sizing: border-box; + height: 39px; + margin-top: -1px; + overflow: hidden; + transition: height 0.3s linear 0s; + } + + @media (max-width: 767.9px){ + .main-menu { + height: auto; + } + } + + @media (max-width: 767.9px){ + .main-menu-entry { + display: table-row; + + line-height: 1.9em; + } + } + + @media screen and (max-width: 767.9px){ + #int-header-logo-img { + width: 200px; + height: 75px; + } + } + + @media screen and (max-width: 767.9px){ + #int-header-logo { + padding: 50px 0; + text-align: center; + }} + + @media screen and (max-width: 767.9px){ + .affiliation{ + margin: 0; + text-align: center; + + } + .affiliation-text{ + display: none; + } + .affiliation-logo-claim{ + display: none; + } + + .affiliation-spacer{ + display: none; + } + + } + + @media (max-width: 767.9px){ + .main-menu-box { + margin-top:15px; + width: 100%; + text-align: center; + } + } + + .int-menu-q-open-icon { + width: 14px; + vertical-align: middle; + margin-left: 5px; + } + + /*********************Custom overrides**********************/ + /** Login with SAML**/ + .col a{ + cursor: pointer; + } + + /**** hyperlink hover color ****/ + a:focus, + a:hover { + color:#E4154B; + text-decoration:underline + } diff --git a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/overrides.less b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/overrides.less new file mode 100644 index 0000000..f1bcd5a --- /dev/null +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/overrides.less @@ -0,0 +1,57 @@ +/* + * 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. + */ + +/* On hover color changed +* from #0377cd +* to #E4154B +*/ +.section-content-white-bg a:hover, +.section-content-white-bg a:focus, +.section-content-light-bg a:hover, +.section-content-light-bg a:focus, +.hp-blog-section a:hover, +.hp-blog-section a:focus { + color: #E4154B; +} + +/* +* Logos background frontpage. +* from rgba(173, 206, 224, 0.52) +* to #ffffff +*/ +.section-content-light-bg { + background-color: #ffffff; +} + + /* +* section title. +* from #0377cd +* to #000000 +*/ +.section-title { +color: #000000; +} + +/*** +login background color +from : rgba(13,95,137,.8) +To #ffffff +*/ +.cover-page { + //text-align: center; + background-color: #ffffff; +} + +/*** +login & sigup page title +from : #0377cd +To #000000 +*/ +.panel-free-title { + color: #000000; +} 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 new file mode 100644 index 0000000..eff8101 --- /dev/null +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/theme.less @@ -0,0 +1,20 @@ +/* + * 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. + */ + +@import "header"; +@import "footer"; +@import "overrides"; + + +/*** +**TODO: +** test overriding variables. +***/ + +//@import "../invenio_app_rdm/theme"; +//@import "variables"; \ No newline at end of file diff --git a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/variables.less b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/variables.less new file mode 100644 index 0000000..0208aaa --- /dev/null +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/variables.less @@ -0,0 +1,17 @@ +/* + * 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. + */ + +/*** +**TODO: +** test overriding variables. +***/ + +//@import "../invenio_app_rdm/variables.less"; + +//@navbar_background_image: unset; +//@navbar_background_color: #ffffff; \ No newline at end of file diff --git a/invenio_theme_tugraz/config.py b/invenio_theme_tugraz/config.py index c0bb350..a6feb08 100644 --- a/invenio_theme_tugraz/config.py +++ b/invenio_theme_tugraz/config.py @@ -10,9 +10,6 @@ from flask_babelex import gettext as _ -# TODO: This is an example file. Remove it if your package does not use any -# extra configuration variables. - INVENIO_THEME_TUGRAZ_DEFAULT_VALUE = 'foobar' """Default value for the application.""" @@ -23,12 +20,6 @@ INVENIO_THEME_TUGRAZ_BASE_TEMPLATE = 'invenio_theme_tugraz/base.html' # Theme Logo THEME_LOGO = 'images/tug_logo.png' -# Instance's theme entrypoint file. Path relative to the ``assets/`` folder. -INSTANCE_THEME_FILE = './scss/invenio_tugraz_theme/theme.scss' - -# Instance's search theme entrypoint file. Path under `assets` folder. -INSTANCE_SEARCH_THEME_FILE = './scss/invenio_tugraz_theme/search/theme.scss' - # Custom header.html THEME_HEADER_TEMPLATE = 'invenio_theme_tugraz/header.html' @@ -38,6 +29,8 @@ THEME_FRONTPAGE_TEMPLATE = 'invenio_theme_tugraz/frontpage.html' # Login page SECURITY_LOGIN_USER_TEMPLATE = 'invenio_theme_tugraz/accounts/login.html' +THEME_HEADER_LOGIN_TEMPLATE = 'invenio_theme_tugraz/accounts/header_login.html' + # footer template THEME_FOOTER_TEMPLATE = 'invenio_theme_tugraz/footer.html' @@ -57,3 +50,20 @@ BABEL_DEFAULT_TIMEZONE = 'Europe/Vienna' I18N_LANGUAGES = [ ('de', _('German')) ] + +# Invenio-APP-RDM +# ============= +SEARCH_UI_HEADER_TEMPLATE = 'invenio_theme_tugraz/header.html' +"""Search page's header template.""" + +# SEARCH_UI_SEARCH_TEMPLATE = 'invenio_theme_tugraz/search/search.html' +"""Search page's base template.""" + +# DEPOSITS_FORMS_BASE_TEMPLATE = 'invenio_app_rdm/deposits/forms/deposits.html' +"""Deposits form page's base template.""" + +DEPOSITS_HEADER_TEMPLATE = 'invenio_theme_tugraz/header.html' +"""Deposits header page's template.""" + +# DEPOSITS_UPLOADS_TEMPLATE = 'invenio_app_rdm/deposits/uploads.html' +"""Deposits user's uploads page template.""" diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html new file mode 100644 index 0000000..b9405bd --- /dev/null +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html @@ -0,0 +1,44 @@ +{%- if config.ACCOUNTS %} + +{%- if not current_user.is_authenticated %} + +
+ + Login + + + + + + +
+ +{%- else %} +{%- if config.USERPROFILES %} + + + + {{ current_user.email }} + + + + +{{_('Logout')}} + + + + + + + +{%- endif %} +{%- endif %} +{%- endif %} \ No newline at end of file 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 f8c5dea..d807867 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login.html @@ -7,66 +7,52 @@ details. #} - {%- extends config.ACCOUNTS_COVER_TEMPLATE %} +{%- extends "invenio_theme/page_cover.html" %} +{% from "invenio_accounts/_macros.html" import render_field, form_errors %} - {% from "invenio_accounts/_macros.html" import render_field, form_errors %} +{% block page_body %} +
+
+ + {%- block form_header %} +

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

+ {%- endblock form_header %} - {% block panel %} -
-
-
- - {%- block form_header %} -

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

- - - {%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH == 'True' %} - - -

— OR —

- - {%- endif %} - - - - - {%- endblock form_header %} - {%- block form_outer %} + + {%- block form_outer %} {%- with form = login_user_form %} -
- {{form.hidden_tag()}} - {{form_errors(form)}} - {{ render_field(form.email, icon="fa fa-user", autofocus=True, errormsg=False) }} - {{ render_field(form.password, icon="fa fa-lock", errormsg=False) }} - -
+
+ {{ 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 form_outer %} + - {%- block registerable %} - {%- if security.registerable %} - - {%- endif %} - {%- endblock %}
- - - + {%- block registerable %} + {%- if security.registerable %} +
+ {% trans sitename=config.ACCOUNTS_SITENAME %}New to {{ sitename }}?{% endtrans %} + {{ _('Sign Up') }} +
+ {%- endif %} + {%- endblock registerable %}
- {% endblock panel %} + + {%- block recoverable %} + {%- if security.recoverable %} + {{ _('Forgot password?') }} + {%- endif %} + {%- endblock recoverable %} +{% endblock page_body %} \ No newline at end of file diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html index 4ac2c8a..1f99b70 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html @@ -7,20 +7,24 @@ details. #} +{%- block css %} + +{{ webpack['invenio-theme-tugraz-theme.css'] }} +{%- endblock %} +
-
-
-
- -
-
- {% trans invenio_rdm="http://inveniosoftware.org/products/rdm" %}Powered by InvenioRDM{% endtrans %} -
+
+
+ {% trans invenio_rdm="http://inveniosoftware.org/products/rdm" %}Powered by InvenioRDM{% endtrans %} +
+
+
diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage.html index 6bd0691..6dbb5c1 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage.html @@ -7,59 +7,114 @@ details. #} - {%- extends "invenio_theme/frontpage.html" %} +{%- extends "semantic-ui/invenio_theme/frontpage.html" %} - {%- block page_header %} - {%- include "invenio_theme_tugraz/header_frontpage.html" %} - {%- endblock page_header %} +{%- block page_header %} +{%- include "invenio_theme_tugraz/header_frontpage.html" %} +{%- endblock page_header %} +{%- block page_body %} - {%- block head_links %} - {{ super() }} - - {%- endblock head_links %} +{%- block first_section%} +{%- endblock first_section%} - {%- block page_body %} - - -
-
- Brought to you by -
-
- - - - -
+{%- block second_section%} +
+ Brought to you by +
+
+
+ -
-
- - - - -
+ -
-
- - - - -
+ -
-
- - - - -
+
-
- - {%- endblock %} +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+
+
+{%- endblock second_section%} +{%- endblock page_body%} \ No newline at end of file diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html index cffb120..f36de52 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html @@ -8,298 +8,238 @@ #} -
+
- {%- block navbar %} -
+
\ No newline at end of file diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/header_frontpage.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/header_frontpage.html index 138d670..509f6ac 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/header_frontpage.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/header_frontpage.html @@ -8,38 +8,46 @@ #} - {%- extends config.THEME_HEADER_TEMPLATE %} +{%- extends config.THEME_HEADER_TEMPLATE %} - {#- Remove search field from top bar on frontpage #} - {%- block navbar_search %}{% endblock %} +{#- Remove search field from top bar on frontpage #} +{%- block navbar_search %}{% endblock %} - {%- block navbar_inner %} - {{super()}} - {%- block frontpage_search %} -