Skip to content

Commit aa74db9

Browse files
Ducicautnapischtim
authored andcommitted
feat: added blocks to communities templates
1 parent f2254a0 commit aa74db9

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

invenio_communities/templates/semantic-ui/invenio_communities/details/header.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
class="ui container fluid page-subheader-outer with-submenu rel-pt-2 ml-0-mobile mr-0-mobile">
6262
<div class="ui container relaxed grid page-subheader mr-0-mobile ml-0-mobile">
6363
<div class="row pb-0">
64+
{%- block subheader_metadata %}
6465
<div
6566
class="sixteen wide mobile sixteen wide tablet eleven wide computer column">
6667
<div
@@ -130,6 +131,8 @@
130131
</div>
131132
</div>
132133
</div>
134+
{%- endblock subheader_metadata %}
135+
{%- block subheader_buttons %}
133136
<div
134137
class="sixteen wide mobile sixteen wide tablet five wide computer right aligned middle aligned column">
135138
{{ button_for_membership(community_ui) }}
@@ -153,11 +156,11 @@
153156
{{ _("Manage community") }}
154157
</a>
155158
{% endif %}
156-
157159
</div>
158-
160+
{%- endblock subheader_buttons %}
159161
</div>
160162
<div class="ui divider mobile only"></div>
163+
{%- block subheader_menu %}
161164
<div
162165
class="ui container secondary pointing stackable menu page-subheader pl-0 pr-0 theme-primary">
163166
{% if community_menu_active %}
@@ -172,5 +175,6 @@
172175
{% endfor %}
173176
{% endif %}
174177
</div>
178+
{%- endblock subheader_menu %}
175179
</div>
176180
</div>

invenio_communities/templates/semantic-ui/invenio_communities/frontpage.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ <h1 class="ui header">
3232
</p>
3333
</div>
3434
</div>
35+
{%- block searchbar %}
3536
<div class="two column stackable row">
3637
<div class="eight wide tablet five wide computer column mt-auto mb-auto">
3738
<form action="{{ url_for('invenio_communities.communities_search') }}" class="ui form">
@@ -62,10 +63,12 @@ <h1 class="ui header">
6263
</div>
6364
{% endif %}
6465
</div>
66+
{%- endblock searchbar %}
6567
<div class="ui divider hidden"></div>
6668
</div>
6769
</div>
6870
<div class="ui container communities-frontpage rel-mt-3 rel-mb-2">
71+
{%- block user_communities %}
6972
{% if current_user.is_authenticated %}
7073
<div class="flex">
7174
<h2 class="ui header mb-0 align-self-center">{{_('My communities')}}</h2>
@@ -76,6 +79,8 @@ <h2 class="ui header mb-0 align-self-center">{{_('My communities')}}</h2>
7679
<div class="ui divider hidden"></div>
7780
<div id="user-communities" class="rel-mb-2"></div>
7881
{% endif %}
82+
{%- endblock user_communities %}
83+
{%- block new_communities %}
7984
<div class="ui divider"></div>
8085
<div class="flex">
8186
<h2 class="ui header mb-0 align-self-center">{{ _('New communities') }}</h2>
@@ -85,5 +90,6 @@ <h2 class="ui header mb-0 align-self-center">{{ _('New communities') }}</h2>
8590
</div>
8691
<div class="ui divider hidden"></div>
8792
<div id="new-communities"></div>
93+
{%- endblock new_communities %}
8894
</div>
8995
{%- endblock page_body %}

invenio_communities/templates/semantic-ui/invenio_communities/search.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
<div class="ui container fluid page-subheader-outer compact ml-0-mobile mr-0-mobile">
2121
<div class="ui container community-search page-subheader flex align-items-center justify-space-between">
2222
<h1 class="ui large header m-0">{{_("Communities")}}</h1>
23-
23+
{%- block new_community_button %}
2424
{% if permissions.can_create %}
2525
<a class="ui button positive left labeled icon m-0" href="{{ config.COMMUNITIES_ROUTES['new'] }}">
2626
<i class="plus icon" aria-hidden="true"></i>
2727
{{ _('New community') }}
2828
</a>
2929
{% endif %}
30+
{%- endblock new_community_button %}
3031
</div>
3132
</div>
3233
<div id="communities-search" class="rel-mt-2"

0 commit comments

Comments
 (0)