creativecommons/cc-resource-archive

[Feature] Remove unnecessary liquid if conditions

Closed this issue · 3 comments

Problem

There a few if statements in listing.html that have absolutely no use.

Description

Lines 123,124,125 and 133
Screenshot 2023-04-08 at 12 01 48 PM

Lines 146,147,148 and 156
Screenshot 2023-04-08 at 12 08 57 PM

The variables topicfilter,languagefilter and mediumfilter here are not initialized anywhere, so they will always be null and these conditions will always be true.
Ideally, these lines were supposed to filter the resources cards based on the value stored in the variables topicfilter,languagefilter and mediumfilter. Since these variables are not initialized anywhere, these conditions become useless.
Filter process is now done using display: block & none over resource cards, so these statements have no use.

Additional context

To reproduce this, just delete these statements and verify the functionality of the website.

Implementation

  • I would be interested in implementing this feature.

Hi @Xaid-vfx can I help you in this if you don't mind assign me I will try to complete.

@Samim-Aktar-coder it's not yet approved

Hi, I removed the the unnecessary liquid if conditions and created a pull request #211
Please review.