mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-23 13:11:58 +00:00
fix: rename, set and use env variable
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
|
import 'semantic-ui-css';
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
let scriptNode = document.createElement("hidden"); //needed for zammad script
|
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) {
|
export function toggleVisibility(id) {
|
||||||
var element = document.getElementById(id);
|
var element = document.getElementById(id);
|
||||||
var isHided = element.style.display === "none";
|
var isHided = element.style.display === "none";
|
||||||
|
|||||||
@@ -248,23 +248,9 @@ span.home-inline{
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.test-instance-side-sticky{
|
.test-instance{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: fixed;
|
background-color: @notificationBackground;
|
||||||
width: 10%;
|
border: solid @notificationBorder 1px;
|
||||||
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;
|
z-index: 100000;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//account (signin, signup) specific
|
// account (signin, signup) specific
|
||||||
@primaryFormAccounts : #fff;
|
@primaryFormAccounts : #fff;
|
||||||
@formAccountsInputPlaceholder : silver;
|
@formAccountsInputPlaceholder : silver;
|
||||||
@fieldInputSelectionBackground: #50a2ce;
|
@fieldInputSelectionBackground: #50a2ce;
|
||||||
@@ -67,3 +67,7 @@
|
|||||||
|
|
||||||
// input
|
// input
|
||||||
@outlineColor: #85B7D9;
|
@outlineColor: #85B7D9;
|
||||||
|
|
||||||
|
// notification
|
||||||
|
@notificationBackground: #fffaf3;
|
||||||
|
@notificationBorder: #e2d5c2;
|
||||||
@@ -31,8 +31,12 @@ INVENIO_THEME_TUGRAZ_LOGIN_IMG = "images/login_logo.png"
|
|||||||
INVENIO_THEME_TUGRAZ_CONTACT_FORM = False
|
INVENIO_THEME_TUGRAZ_CONTACT_FORM = False
|
||||||
"""Enable/Disable Contact form."""
|
"""Enable/Disable Contact form."""
|
||||||
|
|
||||||
INVENIO_THEME_TUGRAZ_PRODUCTION = False
|
THEME_TUGRAZ_PRODUCTION = False
|
||||||
"""Production environment."""
|
"""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
|
# Invenio-theme
|
||||||
# ============
|
# ============
|
||||||
|
|||||||
@@ -34,5 +34,5 @@ class InvenioThemeTugraz(object):
|
|||||||
def init_config(self, app):
|
def init_config(self, app):
|
||||||
"""Initialize configuration."""
|
"""Initialize configuration."""
|
||||||
for k in dir(config):
|
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))
|
app.config.setdefault(k, getattr(config, k))
|
||||||
|
|||||||
@@ -56,10 +56,10 @@
|
|||||||
{%- endblock head %}
|
{%- endblock head %}
|
||||||
</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">
|
<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 %}
|
{% if not config.THEME_TUGRAZ_PRODUCTION %}
|
||||||
<div class="test-instance-top-sticky">
|
<div class="ui sticky test-instance">
|
||||||
<h4>Test Instance</h4>
|
<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>
|
<p>{{_ ("This is the test instance of the TU Graz Repository. Feel free to test everything and make changes as you wish.")}}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- block body %}
|
{%- block body %}
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
details.
|
details.
|
||||||
#}
|
#}
|
||||||
|
|
||||||
{% if not config.INVENIO_THEME_TUGRAZ_PRODUCTION %}
|
{% if not config.THEME_TUGRAZ_PRODUCTION %}
|
||||||
<div class="test-instance-top-sticky">
|
<div class="ui sticky test-instance">
|
||||||
<h4>Test Instance</h4>
|
<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>
|
<p>{{_ ("This is the test instance of the TU Graz Repository. Feel free to test everything and make changes as you wish.")}}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user