I'm a newer developer and have just started on this project and I've been trying to avoid copy-pasting code wherever I can and make the page be built as dynamically as possible, so that when someone comes along and wants to add features here or there, they don't have to add code into 20 different places. So far it's going well, but I feel as if I'm doing it TOO much or that maybe there's another solution.
I've been tasked with creating a legend for a map webapp (GIS).
The way I see it, I have two options.
Hard-code in a bunch of HTML elements that represent each legend entry and they will have the images, labels, and descriptions for each entry all hard-coded in.
I'm sure people have encountered this issue before, and I'm encountering a lot of similar design questions throughout this project. It's starting to get messy. I have a lot of different parts being dynamically generated, but all of the code from before I got here is all hard-coded in.