feature: add test instance notification

This commit is contained in:
David Eckhard
2021-03-31 10:21:03 +02:00
committed by Mojib Wali
parent c4f80c42a1
commit 8425d410f2
4 changed files with 42 additions and 3 deletions

View File

@@ -247,3 +247,24 @@ svg:not(:root) {
span.home-inline{
white-space: nowrap;
}
.test-instance-side-sticky{
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;
z-index: 100000;
}

View File

@@ -17,7 +17,9 @@ INVENIO_THEME_TUGRAZ_DEFAULT_VALUE = _("TU Graz Repository")
INVENIO_THEME_TUGRAZ_BASE_TEMPLATE = "invenio_theme_tugraz/base.html"
"""TU Graz Default base template"""
INVENIO_THEME_TUGRAZ_ACCOUNT_BASE = "invenio_theme_tugraz/accounts/accounts_base.html"
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"
@@ -29,6 +31,9 @@ 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."""
# Invenio-theme
# ============
# See https://invenio-theme.readthedocs.io/en/latest/configuration.html
@@ -67,7 +72,9 @@ THEME_SITENAME = _("Repository")
SECURITY_LOGIN_USER_TEMPLATE = "invenio_theme_tugraz/accounts/login_user.html"
"""Login template"""
SECURITY_REGISTER_USER_TEMPLATE = "invenio_theme_tugraz/accounts/register_user.html"
SECURITY_REGISTER_USER_TEMPLATE = (
"invenio_theme_tugraz/accounts/register_user.html"
)
"""Sigup template"""
# Invenio-I18N

View File

@@ -56,6 +56,12 @@
{%- endblock head %}
</head>
<body ng-csp {% if body_css_classes %} class="{{ body_css_classes|join(' ') }}"{% endif %}{% if g.ln %} lang="{{ g.ln.split('_', 1)[0]|safe }}"{% if rtl_direction %} {{ rtl_direction|safe }}{% endif %}{% endif %} itemscope itemtype="http://schema.org/WebPage" data-spy="scroll" data-target=".scrollspy-target">
{% if not config.INVENIO_THEME_TUGRAZ_PRODUCTION %}
<div class="test-instance-top-sticky">
<h4>Test Instance</h4>
<p>This is the test instance of the TU Graz Repository. Feel free to test everything and make changes as you wish.</p>
</div>
{% endif %}
{%- block body %}
{%- block browserupgrade %}
<!--[if lt IE 8]>

View File

@@ -6,9 +6,14 @@
details.
#}
{% if not config.INVENIO_THEME_TUGRAZ_PRODUCTION %}
<div class="test-instance-top-sticky">
<h4>Test Instance</h4>
<p>This is the test instance of the TU Graz Repository. Feel free to test everything and make changes as you wish.</p>
</div>
{% endif %}
<header>
{%- block navbar %}
<nav>
{%- block navbar_header %}