Skip to content

Commit a78b266

Browse files
committed
add logic for "Empty activities", when there are no upcoming or featured events, the blocks on the homepage will not be rendered as well.
1 parent da41a05 commit a78b266

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

layouts/partials/landingpage/activityfeed.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!-- Activity Feed -->
22
{{ with .Params.Activity_Feed}}
33
<!-- Featured activities -->
4+
{{ if .featured_activities}}
45
<section class="activitifeed-section pb-5 mt-5" id="featured">
56
<div class="container border-bottom-gradient rounded-lg" style="background-color:#deecf7;">
67
<div class="row align-items-center">
@@ -70,9 +71,10 @@ <h3 class="mb-2" style="color: #005aa7;">{{$item.title}}</h3>
7071
</div>
7172
</div>
7273
</section>
74+
{{ end }}
7375
<!-- /Featured Activities -->
74-
7576
<!-- Items -->
77+
{{ if .activities }}
7678
<section class="activitifeed-section pt-5 mt-2" id="events">
7779
<div class="container border-bottom-gradient rounded-lg" style="background-color:#deecf7;">
7880
<div class="row align-items-center">
@@ -135,6 +137,7 @@ <h4 class="my-4 ml-4 color-blue">
135137
</div>
136138
</div>
137139
</section>
140+
{{ end}}
138141
<!-- /Items -->
139142
{{ end }}
140143
<!-- /Activity Feed -->

tina/collections/pages/home.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ export default {
198198
description: "tag",
199199
},
200200
],
201+
description: "Leave empty to hide the featured activities",
201202
},
202203
{
203204
label: "View more featured button text",
@@ -271,6 +272,7 @@ export default {
271272
],
272273
},
273274
],
275+
description: "Leave empty to hide the activities",
274276
},
275277
{
276278
label: "View more items button text",

tina/tina-lock.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)