Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v12 compatibility #298

Merged
merged 9 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8, 3.9]
python-version: [3.9, "3.10"]
requirements-level: [pypi]
db-service: [postgresql13]
search-service: [opensearch2]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
/*
* Copyright (C) 2020-2021 Graz University of Technology.
* Copyright (C) 2020-2023 Graz University of Technology.
*
* 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: @footerGrey;

/*background-image: url("/static/images/footer.jpg");*/
-webkit-background-size: 100% 100%;
-moz-background-size: 100% 100%;
-o-background-size: 100% 100%;
background-size: 100% 100%;
min-height: 100%;
/* the following 2 lines are a hack for IE6 */
height: auto !important;
height: 100%;
width: 100%;
background-attachment: fixed;

&.footer-bottom {
background-color: @footerBottomBackground;
Expand All @@ -39,7 +29,7 @@
color: @tugrazRed;
}
}

// remove blue focus outline if clicked with mouse
&:focus:not(:focus-visible) {
outline-style: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ pre {
&.metadata-only {
background-color: @accessRightMetadata;
}

}

@font-face {
Expand All @@ -166,3 +165,15 @@ pre {
font-weight: 400;
font-style: italic;
}

/**
* mainly for the overview. maybe this should be written more specific to apply
* only for the overview use case.
*/
.ui.segment:first-child {
margin-top: 1em;
}

.ui.equal.height .ui.segment {
height: 100%;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Graz University of Technology
* Copyright (C) 2020-2023 Graz University of Technology
*
* 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.
Expand All @@ -26,14 +26,3 @@
.identifiers {
display: inline;
}

// // align badges to the right
// .ui.items > .item .extra.labels-actions {
// float: right;
// width: auto;

// // remove action buttons from search results
// .ui.small.compact.right.floated.button {
// display: none;
// }
// }
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,14 @@
.nowrap-link {
white-space: nowrap;
}

.ui.label.schema {
border: 1px solid #bfb5b5;
}

.random-records-frontpage {}

.random-records-frontpage .grid .column {
width: 380px !important;
padding: 14px !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
@accessRightClosed : @accessRightEmbargoed;
@accessRightMetadata : #2185D0;

@schema: #17b3f3;

// primary colors TU Graz
@tugrazBlack: #231f20;
@tugrazRed : #e4154b;
Expand Down
4 changes: 2 additions & 2 deletions invenio_theme_tugraz/config.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020-2021 Graz University of Technology.
# Copyright (C) 2020-2023 Graz University of Technology.
#
# 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.

"""invenio module for TUGRAZ theme."""

from flask_babelex import gettext as _
from invenio_i18n import gettext as _

INVENIO_THEME_TUGRAZ_DEFAULT_VALUE = _("TU Graz Repository")
"""Default value for the application."""
Expand Down
9 changes: 2 additions & 7 deletions invenio_theme_tugraz/search.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020-2021 Graz University of Technology.
# Copyright (C) 2020-2023 Graz University of Technology.
#
# 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
Expand All @@ -9,7 +9,6 @@
"""Frontpage records."""

from invenio_search.api import RecordsSearch
from invenio_search.engine import dsl


class FrontpageRecordsSearch(RecordsSearch):
Expand All @@ -18,8 +17,4 @@ class FrontpageRecordsSearch(RecordsSearch):
class Meta:
"""Default index and filter for frontpage search."""

index = "rdmrecords-records"
default_filter = dsl.Q(
"query_string",
query=("access.record:public " "AND versions.is_latest:true"),
)
index = "global-search"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
147 changes: 78 additions & 69 deletions invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html
Original file line number Diff line number Diff line change
@@ -1,85 +1,94 @@
{#
Copyright (C) 2020-2021 Graz University of Technology.
Copyright (C) 2020-2023 Graz University of Technology.

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.
#}

<!DOCTYPE html>
<html{% if html_css_classes %} class="{{ html_css_classes|join(' ') }}"{% endif %} lang="{{ current_i18n.locale.language|safe }}" dir="{{ current_i18n.locale.text_direction }}">
<html lang="{{ current_i18n.locale.language|safe }}" dir="{{ current_i18n.locale.text_direction }}">
<head>
{%- block head %}
{%- block head_meta %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{%- if description %}<meta name="description" content="{{ description }}" />{% endif %}
{%- if keywords %}<meta name="keywords" content="{{ keywords }}" />{% endif %}
{%- if config.get('THEME_GOOGLE_SITE_VERIFICATION', None) %}
{%- for google_id in config.THEME_GOOGLE_SITE_VERIFICATION %}
<meta name="google-site-verification" content="{{google_id}}"/>
{%- endfor %}
{%- endif %}
{%- endblock head_meta %}
{%- block head_title %}
{%- set title = title or _(config.THEME_SITENAME) or _('Invenio') %}
<title>{{title}}</title>
{%- endblock head_title %}
{%- block head_links %}
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}"/>
{%- if keywords %}<link rel="canonical" href="{{ canonical_url }}"/>{% endif %}
{%- block head_links_langs %}
{%- if alternate_urls %}
{%- for alt_ln, alternate_url in alternate_urls.items() %}
<link rel="alternate" hreflang="{{ alt_ln }}" href="{{ alternate_url }}"/>
{%- endfor %}
{%- endif %}
{%- endblock %}
{%- block head_apple_icons %}
{%- for size in [144, 114, 72, 57] %}
{%- set icon_name = 'apple-touch-icon-%d-precomposed.png' | format(size) %}
<link rel="apple-touch-icon-precomposed" sizes="{{ size }}x{{ size }}" href="{{ url_for('static', filename=icon_name) }}"/>
{%- endfor %}
{%- endblock head_apple_icons %}
{%- endblock head_links %}
{%- block header %}{% endblock header %}
{%- block css %}
{{ webpack['theme.css'] }}
{{ webpack['invenio-theme-tugraz-theme.css'] }}
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
{%- endblock css %}
{%- block head_meta %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

{%- if description %}
<meta name="description" content="{{ description }}" />
{% endif %}

{%- if keywords %}
<meta name="keywords" content="{{ keywords }}" />
{% endif %}

{%- if config.get("THEME_GOOGLE_SITE_VERIFICATION", None) %}
{%- for google_id in config.THEME_GOOGLE_SITE_VERIFICATION %}
<meta name="google-site-verification" content="{{google_id}}"/>
{%- endfor %}
{%- endif %}
{%- endblock head_meta %}

{%- block head_title %}
{%- set title = title or _(config.THEME_SITENAME) or _("Invenio") %}
<title>{{title}}</title>
{%- endblock head_title %}

{%- block head_links %}
<link rel="shortcut icon" href="{{ url_for("static", filename="favicon.ico") }}"/>

{%- if keywords %}
<link rel="canonical" href="{{ canonical_url }}"/>
{% endif %}

{%- block head_links_langs %}
{%- if alternate_urls %}
{%- for alt_ln, alternate_url in alternate_urls.items() %}
<link rel="alternate" hreflang="{{ alt_ln }}" href="{{ alternate_url }}"/>
{%- endfor %}
{%- endif %}
{%- endblock %}
{%- endblock head_links %}

{%- block header %}{% endblock header %}

{%- block css %}
{{ webpack["theme.css"] }}
{{ webpack["invenio-theme-tugraz-theme.css"] }}
{%- endblock css %}
{%- 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">

<body itemscope itemtype="http://schema.org/WebPage" data-spy="scroll" data-target=".scrollspy-target">
{%- block body %}
{%- block browserupgrade %}
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
{%- endblock browserupgrade %}
{%- block body_inner %}
{%- block page_header %}
{% include config.THEME_HEADER_TEMPLATE %}
{%- endblock page_header %}
{%- block page_body %}
{% include "invenio_theme/body.html" %}
{%- endblock page_body %}

{%- block page_footer %}
{% include config.THEME_FOOTER_TEMPLATE %}
{%- endblock page_footer %}

{%- endblock body_inner %}
{%- block javascript %}
{% include config.THEME_JAVASCRIPT_TEMPLATE %}
{%- endblock javascript %}
{%- block trackingcode %}{% include config.THEME_TRACKINGCODE_TEMPLATE %}
{%- endblock %}
{%- block browserupgrade %}
<!--[if lt IE 10]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
{%- endblock browserupgrade %}

{%- block body_inner %}
{%- block page_header %}
{% include config.THEME_HEADER_TEMPLATE %}
{%- endblock page_header %}

{%- block page_body %}
{% include "invenio_theme/body.html" %}
{%- endblock page_body %}

{%- block page_footer %}
{% include config.THEME_FOOTER_TEMPLATE %}
{%- endblock page_footer %}
{%- endblock body_inner %}

{%- block javascript %}
{% include config.THEME_JAVASCRIPT_TEMPLATE %}
{%- endblock javascript %}

{%- block trackingcode %}
{% include config.THEME_TRACKINGCODE_TEMPLATE %}
{%- endblock %}
{%- endblock body %}
</body>
</html>
Expand Down
23 changes: 15 additions & 8 deletions invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{#
Copyright (C) 2020-2023 Graz University of Technology.

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.
#}

<ul>
<li><strong>{{_('Safe')}}</strong> &mdash; {{_('your research is stored safely for the future in TU Graz library for as long as TU Graz library exists.')}}</li>
<li><strong>{{_('Trusted')}}</strong> &mdash; {{_('built and operated by CERN and OpenAIRE to ensure that everyone can join in Open Science.')}}</li>
<li><strong>{{_('Citeable')}}</strong> &mdash; {{_('every upload is assigned a Digital Object Identifier (DOI), to make them citable and trackable.')}}</li>
<li><strong>{{_('No waiting time')}}</strong> &mdash; {{_('Uploads are made available online as soon as you hit publish, and your DOI is registered within seconds.')}}</li>
<li><strong>{{_('Open or closed')}}</strong> &mdash; {{_('Share e.g. anonymized clinical trial data with only medical professionals via our restricted access mode.')}}</li>
<li><strong>{{_('Versioning')}}</strong> &mdash; {{_("Easily update your dataset with our versioning feature.")}}</li>
<li><strong>{{_('Usage statisics')}}</strong> &mdash; {{_("All uploads display standards compliant usage statistics")}}</li>
</ul>
<li><strong>{{_("Safe") }}</strong> &mdash; {{_("your research is stored safely for the future in TU Graz library for as long as TU Graz library exists.") }}</li>
<li><strong>{{_("Trusted") }}</strong> &mdash; {{_("built and operated by CERN and OpenAIRE to ensure that everyone can join in Open Science.") }}</li>
<li><strong>{{_("Citeable") }}</strong> &mdash; {{_("every upload is assigned a Digital Object Identifier (DOI), to make them citable and trackable.") }}</li>
<li><strong>{{_("No waiting time") }}</strong> &mdash; {{_("Uploads are made available online as soon as you hit publish, and your DOI is registered within seconds.") }}</li>
<li><strong>{{_("Open or closed") }}</strong> &mdash; {{_("Share e.g. anonymized clinical trial data with only medical professionals via our restricted access mode.") }}</li>
<li><strong>{{_("Versioning") }}</strong> &mdash; {{_("Easily update your dataset with our versioning feature.") }}</li>
<li><strong>{{_("Usage statisics") }}</strong> &mdash; {{ _("All uploads display standards compliant usage statistics") }}</li>
</ul>
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{#
Copyright (C) 2020-2023 Graz University of Technology.

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.
#}

{%- extends config.INVENIO_THEME_TUGRAZ_BASE_TEMPLATE %}

{%- block page_body %}
<div class="ui container">
<h1 style="text-align: center;">comingsoon</h1>
</div>
<div class="ui container">
<h1 style="text-align: center;">comingsoon</h1>
</div>
{%- endblock %}
Loading
Loading