From 9ce6dbab75f7164e7fd79162cf21502a6062397d Mon Sep 17 00:00:00 2001 From: Karolina Przerwa Date: Fri, 9 Feb 2024 15:36:03 +0100 Subject: [PATCH] community theme: add frontpage template --- site/zenodo_rdm/redirector.py | 2 +- .../details/home/index.html | 100 ++++++++++++++++++ 2 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 templates/themes/horizon/invenio_communities/details/home/index.html diff --git a/site/zenodo_rdm/redirector.py b/site/zenodo_rdm/redirector.py index 74c8cc6f..526f6964 100644 --- a/site/zenodo_rdm/redirector.py +++ b/site/zenodo_rdm/redirector.py @@ -103,7 +103,7 @@ def communities_home_view_function(): return target elif community.theme and community.theme.get("enabled", False): # If theme is enabled, redirect to the home page of the community - return url_for("invenio_communities.communities_home", **values) + return url_for("invenio_app_rdm_communities.communities_home", **values) else: # If theme is not enabled and no query parameters, redirect to records page of the community return url_for("invenio_app_rdm_communities.communities_detail", **values) diff --git a/templates/themes/horizon/invenio_communities/details/home/index.html b/templates/themes/horizon/invenio_communities/details/home/index.html new file mode 100644 index 00000000..05bf6b28 --- /dev/null +++ b/templates/themes/horizon/invenio_communities/details/home/index.html @@ -0,0 +1,100 @@ +{# -*- coding: utf-8 -*- + + This file is part of Invenio. + Copyright (C) 2024 CERN. + + Invenio 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 "invenio_communities/details/base.html" %} +{% from "zenodo_rdm/macros/record_item.html" import record_item %} + +{%- set title = community.metadata.title -%} +{% set active_community_header_menu_item= 'home' %} + +{%- block page_body %} + {{ super() }} +
+
+
+
+

Trusted repository for European research + projects

+

Builtin compliance with EU open science + policy

+
+ +
+
+ + {% if records %} +
+

{{ title }}

+
+ +
+ {% for record in records %} +
    + {{ record_item(record=record) }} +
+ {% endfor %} +
+
+ {% endif %} + +
+
+
+

{{ _('How it works?') }}

+
+
+
+
+
+

{{ _('1. Request Community') }}

+
+
+

{{ _('2. Invite Partners') }}

+
+
+

{{ _('3. Publish FAIR') }}

+
+
+ +
+
+
+ +
+{%- endblock page_body -%}