duanegero / CoachDee-Website

HTML and CSS code for my coaching website
0 stars 0 forks source link

Violation of DRY in HTML files #2

Closed elias117 closed 1 week ago

elias117 commented 2 months ago

You have a violation of the DRY principle in your HTML files.

They are all using the nav bar code:

<nav class="nav-2 second-nav">
    <ul>
         <li><a href="https://ymcahfx.ca/panthers/" target="_blank">PANTHERS</a></li>
         <li><a href="mailto:duane.gero@halifax.ymca.ca" target="_blank">EMAIL ME</a></li>
         <li><a href="https://www.mbans.ca/" target="_blank">M.B.A</a></li>
         <li><a href="https://basketballnovascotia.ca/">BASKETBALL NOVA SCOTIA</a></li>
    </ul>
</nav>

I suggest you put this repeated code in a single HTML file and reference it everywhere you need to use it. This way if you need to make additions or changes to this repeated code you can do so in one spot.

The same can be said by all common elements such as the footer of each HTML page.

duanegero commented 2 months ago

Yes i've noticed that, i'll have to dig in and look to find a solution, i'm not exactly sure how to reference from other HTML pages.