Skip to content

Commit

Permalink
ui: Add community_uploads macro
Browse files Browse the repository at this point in the history
  • Loading branch information
carlinmack committed Feb 6, 2024
1 parent e5a6699 commit 3745aa7
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
#}

{% extends "invenio_communities/details/base.html" %}
{%- from "invenio_communities/macros/community_uploads.html" import community_uploads -%}

{%- set title = community.metadata.title -%}
{% set active_community_header_menu_item= 'home' %}

{%- block page_body %}
{{ super() }}
<div class="ui rel-m-2 rel-pt-1">
{{hero_section(heading=community.theme.heading,subheading=community.theme.subheading)}}
{{ community_uploads() }}
{{how_it_works()}}
</div>
{%- endblock page_body -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{#
Copyright (C) 2024 CERN

Invenio App RDM is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.
#}

{% macro community_uploads(
title="Recent uploads",
fetch_url=""
)
%}
<div id="records-list" data-fetch-url="{{ fetch_url }}" data-title="{{ title }}"
class="ui stackable container rel-mt-2">

<h2 class="ui header">{{ title }}</h2>
<div class="ui divider"></div>

<div class="ui fluid equal width stackable grid">
{% for n in range(3) %}
<div class="column">
<div class="ui placeholder">
<div class="header">
<div class="line"></div>
<div class="line"></div>
</div>
<div class="paragraph">
<div class="line"></div>
<div class="line"></div>
</div>
<div class="header">
<div class="line"></div>
</div>
<div class="paragraph">
<div class="short line"></div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>

{% endmacro %}

0 comments on commit 3745aa7

Please sign in to comment.