Skip to content

Commit

Permalink
Limit to 10 Arena images to improve Ecograder score (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
melnyczuk authored Dec 16, 2022
1 parent 9e7656e commit 3fa2c4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/_data/arena.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ const getArenaChannels = async (channelId) => {
const newChannel = arena.channel(id);
// get all content for this channel
const content = await getAllContent(newChannel, per, length);
// get thumbnail urls for image blocks in this channel
// get thumbnail urls for image blocks in this channel (limited to 10 images)
const images = content.reverse()
.filter(b => !!b.image)
.map(b => b.image.thumb.url);
.map(b => b.image.thumb.url)
.slice(0, 10);
// get channel description (if present)
const description = metadata && metadata.description;
// get channel url
Expand Down
1 change: 1 addition & 0 deletions src/_includes/assets/css/components.blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
max-height: 3.75rem;
padding-bottom: 0.625rem;
padding-right: 0.625rem;
min-height: 60px; /* match to height of images to stop "pop" */
}

.block__arrow {
Expand Down

0 comments on commit 3fa2c4d

Please sign in to comment.