okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
250 stars 134 forks source link

Slice list fragment #784

Closed mpourismaiel closed 4 years ago

mpourismaiel commented 4 years ago

What this PR does / why we need it: Slice list fragment's code and separate it's different variants.

Which issue this PR fixes: fixes #783

Special notes for your reviewer: This is in line with #783 proposal. Please test the demo extensively since the code has changed quite a lot and even though I have tried to test it's every aspect, something might have skipped my eye.

Release note:

- Simplify fragment code base by separating different variants and modularizing them (list)
stp-ip commented 4 years ago

On a first look this seems like a reasonable approach, but I want to take another look later tomorrow and iterate especially on the ideas mapping to hugo modules.

stp-ip commented 4 years ago

As discussed. I think this additional layer of abstraction adds too much complexity in comparison to the reduction of code duplication. Different design framework might do different things and I think using helpers and per framework partials is the better way to go.

Awesome thought and happy you are coming up with new solutions and ideas.

Closing this in favor of duplication and a sub directory for each framework and a specific fragment call such as fragment = "tailwind/contact".

Let me, know if that doesn't match, what we discussed.