diff --git a/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/theme.js b/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/theme.js index 85c1217..e810e99 100644 --- a/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/theme.js +++ b/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/theme.js @@ -1,4 +1,5 @@ import $ from 'jquery'; +import 'semantic-ui-css'; $(function() { let scriptNode = document.createElement("hidden"); //needed for zammad script @@ -17,6 +18,13 @@ $(function() { }); }); + +$('.ui.sticky.test-instance') + .sticky({ + context: 'body' + }) +; + export function toggleVisibility(id) { var element = document.getElementById(id); var isHided = element.style.display === "none"; 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 index bfc2f3e..98948af 100644 --- 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 @@ -248,23 +248,9 @@ span.home-inline{ white-space: nowrap; } -.test-instance-side-sticky{ +.test-instance{ text-align: center; - position: fixed; - width: 10%; - left: 5%; - top: 20%; - background-color: @outlineColor; - border: solid @tugrazRed; - z-index: 100000; -} - -.test-instance-top-sticky{ - text-align: center; - position: sticky; - width: 100%; - top: 0%; - background-color: @outlineColor; - border: solid @tugrazRed; + background-color: @notificationBackground; + border: solid @notificationBorder 1px; z-index: 100000; } 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 index ba57844..495f73f 100644 --- 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 @@ -51,7 +51,7 @@ -//account (signin, signup) specific +// account (signin, signup) specific @primaryFormAccounts : #fff; @formAccountsInputPlaceholder : silver; @fieldInputSelectionBackground: #50a2ce; @@ -67,3 +67,7 @@ // input @outlineColor: #85B7D9; + +// notification +@notificationBackground: #fffaf3; +@notificationBorder: #e2d5c2; \ No newline at end of file diff --git a/invenio_theme_tugraz/config.py b/invenio_theme_tugraz/config.py index 9a266ca..dafa3e5 100644 --- a/invenio_theme_tugraz/config.py +++ b/invenio_theme_tugraz/config.py @@ -31,8 +31,12 @@ INVENIO_THEME_TUGRAZ_LOGIN_IMG = "images/login_logo.png" INVENIO_THEME_TUGRAZ_CONTACT_FORM = False """Enable/Disable Contact form.""" -INVENIO_THEME_TUGRAZ_PRODUCTION = False -"""Production environment.""" +THEME_TUGRAZ_PRODUCTION = False +"""Production environment. + + Can also be set as an environment variable in a .env file. Then the name + has to be 'INVENIO_THEME_TUGRAZ_PRODUCTION'. +""" # Invenio-theme # ============ diff --git a/invenio_theme_tugraz/ext.py b/invenio_theme_tugraz/ext.py index 7f03490..1a8ad4d 100644 --- a/invenio_theme_tugraz/ext.py +++ b/invenio_theme_tugraz/ext.py @@ -34,5 +34,5 @@ class InvenioThemeTugraz(object): def init_config(self, app): """Initialize configuration.""" for k in dir(config): - if k.startswith("INVENIO_THEME_TUGRAZ_"): + if k.startswith("INVENIO_THEME_TUGRAZ_") or k.startswith("THEME_TUGRAZ_"): app.config.setdefault(k, getattr(config, k)) 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 6adaf55..3e2ddb9 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 @@ -56,10 +56,10 @@ {%- endblock head %}
- {% if not config.INVENIO_THEME_TUGRAZ_PRODUCTION %} -This is the test instance of the TU Graz Repository. Feel free to test everything and make changes as you wish.
+{{_ ("This is the test instance of the TU Graz Repository. Feel free to test everything and make changes as you wish.")}}
This is the test instance of the TU Graz Repository. Feel free to test everything and make changes as you wish.
+{{_ ("This is the test instance of the TU Graz Repository. Feel free to test everything and make changes as you wish.")}}