4
\$\begingroup\$

For a few reasons I had to use EJS on a specific page in my Express project. This was previously like 13 lines of code with MustacheJS and a small JSON file. But now that it is hard-coded, it is a monstrous 289 lines of code (not counting lines in the includes). What can I do here?

<!doctype html>
<html class="no-js" lang="en">
  <head>
    <% include includes/default-head %>

    <title>BruxZir Solid Zirconia Crowns &amp; Bridges - Before &amp; After Case Gallery</title>
    <meta name="description" content="BruxZir Solid Zirconia crowns &amp; bridges are monolithic zirconia restorations fabricated using the precision of CAD/CAM. BruxZir has no porcelain overlay, which makes it virtually chip proof. Prescribe BruxZir instead of metal occlusal PFMs and cast gold restorations. Its virtually unbreakable states makes it an ideal restoration for bruxers and grinders." />
    <meta name="keywords" content="zirconia crowns, zirconia restoration, zirconium crowns, zirconia dentistry, all-zirconia, zirconia dental crown, dental zirconia, zirconium dental, zirconia ceramic, zirconia bridges, dental bridge, tooth crowns, bruxing solution, grinding solution, clenching solution" />
  </head>

  <body>
    <div class="container">
      <% include includes/header %>

        <div class="block push">
        <div id="mainContent" class="row">
          <div class="large-12 columns">
            <h1>Before &amp; After Case Gallery</h1>

                        <div class="casesContainer">            
                            <div class="caseTitle">
                        <span class="caseNumber">Case</span>
                        <div class="wrap">
                            <span class="caseBack" onclick='mySwipe.prev()'>Back</span>
                            <span class="caseForward" onclick='mySwipe.next()'>Forward</span>
                        </div>
                            </div>

                            <div id='caseSlider' class='swipe'>
                          <div class='swipe-wrap'>
<!-- case 1 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/1_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/1_a_300.jpg" />
                                            </div>
                                            <div class="descriptionContainer">
                                                <p><strong>Before:</strong> This patient had an endodontic procedure through this lower molar PFM crown. The patient had never been particularly happy about the gray hue of the PFM, and he didn't like having a hole at the top of the crown, even though it was patched with composite.</p>
                                                <p><strong>After:</strong> as concerned as the patient was about the esthetics of the new crown, I was more concerned with the strength of the restoration I would be placing on this lower first molar. According to lab statistics, crowns on first molars fracture more than any other crown, so I chose a BruxZir<sup>&reg;</sup> Shaded crown for its combination of strength and esthetics. Nearly all of the more than 200 Authorized BruxZir Labs now exclusively use the BruxZir Shaded material.</p>
                                            </div>
                                        </div>
                                    </div>
<!-- case 2 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/2_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/2_a_300.jpg" />
                                            </div>
                                            <div class="descriptionContainer">
                                                <p><strong>Before:</strong> This patient had an existing all-ceramic crown that was a little too translucent for this endodontically treated central incisor. Despite being bonded with an opaque resin cement, it was allowing some of the dark prep shade through an otherwise esthetic crown. I placed this crown, and I remember how gorgeous it was outside the mouth. After three years, however, the patient wanted to try a different restoration.</p>
                                                <p><strong>After:</strong> The patient wanted to switch the crown to something that would block out the dark stump shade, while still being an all-ceramic material. I decided to try a BruxZir<sup>&reg;</sup> crown, which I have seen block out the darkest of preps, especially when the margin is placed 0.5mm subgingivally. While perhaps not as esthetic as the previous restoration, the BruxZir shaded crown succeeds in blocking out the undesirable prep shade, which was the patient's chief complaint.</p>
                                            </div>
                                        </div>
                                    </div>                                  
<!-- case 3 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/3_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/3_a_300.jpg" />
                                            </div>
                                            <div class="descriptionContainer">
                                                <p>This patient had a lingual fracture of the ceramic fused to zirconia restoration on tooth #8 and it needed replacement. The tooth had a previous root canal with a tooth colored build-up. BruxZir provided a natural looking result due to its unique translucent effect.</p>
                                            </div>  
                                        </div>
                                    </div>
<!-- case 4 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/4_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/4_a_300.jpg" />
                                            </div>  
                                            <div class="descriptionContainer">  
                                                <p>The BruxZir crowns were done on tooth #8 and #9. As you can see in the non-retracted before photo, the patient had two pre-existing high value PFM's. As I cut through them the copings appeared to be base metal. When you look at the condition of the gingiva in the before photo, was this possibly a base metal allergy? It helped with my decision to go with BruxZir all-ceramic (solid zirconia) crowns.</p>
                                            </div>  
                                        </div>                                  
                                    </div>
<!-- case 4lateral -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/4lateral_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/4lateral_a_300.jpg" />
                                            </div>      
                                            <div class="descriptionContainer">      
                                                <p>As you view the crowns in the lateral smile view, you will notice that flat facial profiles of these crowns.</p>
                                            </div>      
                                        </div>  
                                    </div>                                      
<!-- case 4lateral2 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/4lateral2_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/4lateral2_a_300.jpg" />
                                            </div>  
                                            <div class="descriptionContainer">      
                                                <p>This is much more difficult to achieve with bi-layered restorations such as porcelain fused to metal or porcelain fused to zirconia. Since a BruxZir zirconia restoration is monolithic (one layer), it is much easier to achieve desirable contours.</p>
                                            </div>  
                                        </div>  
                                    </div>                                  
<!-- case 5 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/5_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/5_a_300.jpg" />
                                            </div>  
                                            <div class="descriptionContainer">      
                                                <p>A broken composite inlay was replaced with a high strength BruxZir inlay. BruxZir can be used for inlays and onlays, as well as crowns &amp; bridges.</p>
                                            </div>  
                                        </div>  
                                    </div>                  
<!-- case 6 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/6_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/6_a_300.jpg" />
                                            </div>  
                                            <div class="descriptionContainer">  
                                                <p>This patient fractured off the distolingual cusp. A monolithic BruxZir Zirconia crown was placed.</p>
                                            </div>  
                                        </div>  
                                    </div>                                  
<!-- case 7 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/7_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/7_a_300.jpg" />
                                            </div>
                                            <div class="descriptionContainer">      
                                                <p>When a patient generates enough occlusal force to break a PFM, BruxZir is a great choice as a replacement crown.</p>
                                            </div>  
                                        </div>  
                                    </div>
<!-- case 8 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/8_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/8_a_300.jpg" />
                                            </div>  
                                            <div class="descriptionContainer">  
                                                <p>This patient fractured a porcelain all-ceramic crown on the second molar and chipped the first molar. Both crowns were replaced with BruxZir.</p>
                                            </div>
                                        </div>  
                                    </div>                                  
<!-- case 9 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/9_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/9_a_300.jpg" />
                                            </div>
                                            <div class="descriptionContainer">  
                                                <p>The patient had always disliked the metal occlusal on this PFM. When it became necessary to replace it, tooth-colored BruxZir was chosen.</p>
                                            </div>
                                        </div>  
                                    </div>                                  
<!-- case 10 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/10_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/10_a_300.jpg" />
                                            </div>
                                            <div class="descriptionContainer">      
                                                <p>An endodontically treated tooth had a fractured mesial marginal ridge and multiple fractures. A monolithic BruxZir zirconia crown was placed.</p>
                                            </div>
                                        </div>  
                                    </div>                                  
<!-- case 11 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/11_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/11_a_300.jpg" />
                                            </div>  
                                            <div class="descriptionContainer">  
                                                <p>This endodontically treated molar had a large amalgam and several fractures, necessitating a full-coverage BruxZir crown.</p>
                                            </div>
                                        </div>  
                                    </div>                                  
<!-- case 12 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/12_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/12_a_300.jpg" />
                                            </div>  
                                            <div class="descriptionContainer">
                                                <p>This patient had chipped the distal surface of this PFM. It was replaced with a high-strength BruxZir crown.</p>
                                            </div>  
                                        </div>
                                    </div>                                      
<!-- case 13 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/13_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/13_a_300.jpg" />
                                            </div>      
                                            <div class="descriptionContainer">  
                                                <p>When this patient required an onlay to replace a broken cusp, cast gold was suggested but the patient declined. BruxZir was used instead due to its impressive strength and improved esthetics.</p>
                                            </div>      
                                        </div>  
                                    </div>
<!-- case 14 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/14_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/14_a_300.jpg" />
                                            </div>      
                                            <div class="descriptionContainer">      
                                                <p>This female patient presented with a predominantly cast metal bridge, which her dentist prescribed after she fractured the porcelain on each of the abutment teeth on the previous restoration. The patient always disliked how it looked and desired a more esthetic, long-term option. Because her PFM restorations had fractured before, a high-strength BruxZir Solid Zirconia bridge was prescribed. It provides the patient with the best combination of strength and esthetics.</p>
                                            </div>      
                                        </div>  
                                    </div>
<!-- case 15 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/15_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/15_a_300.jpg" />
                                            </div>  
                                            <div class="descriptionContainer">      
                                                <p>The patient presented with a fractured Maryland bridge. He ruled out implants because it would require a large bone graft. Instead, a digital impression (IOS FastScan) was taken to fabricate a conventional BruxZir bridge.</p>
                                            </div>  
                                        </div>  
                                    </div>
<!-- case 16 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/16_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/16_a_300.jpg" />
                                            </div>      
                                            <div class="descriptionContainer">      
                                                <p>This patient had a number of existing PFM restorations in the anterior, but teeth #8 and #9 had a previous root canal and lingual fracture next to the access openings. It was decided that the best option was a full-coverage anterior BruxZir crown.</p>
                                            </div>      
                                        </div>  
                                    </div>
<!-- case 17 -->
                                    <div>
                                        <div class="casesContainer">
                                            <div class="imagesContainer">
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/17_b_300.jpg" />
                                                <img src="/images/content/images-bruxzir-zirconia-dental-crown/cases/17_a_300.jpg" />
                                            </div>  
                                            <div class="descriptionContainer">      
                                                <p>As you can see in the after photos, the BruxZir bridge has acceptable esthetics, although it won't be mistaken for IPS Empress anytime soon! Because BruxZir is virtually unbreakable and because the patient had already broken two PFM bridges in the past, this was the most appealing solution.</p>
                                            </div>  
                                        </div>  
                                    </div>

                            </div> <!-- swipeWrap -->
                        </div> <!-- caseSlider -->     
                        </div> <!-- casesContainer -->

                    </div> <!-- end of columns -->
                </div> <!-- end of row -->  
            </div> <!-- end of block -->

            <% include includes/footer %>
        </div>
        <% include includes/default-scripts %>

        <script src="/javascripts/swipe.js"></script>
        <script>
            var elem = document.getElementById('caseSlider');
            window.mySwipe = Swipe(elem, {
            startSlide: 0,
            // auto: 3000,
            // continuous: true,
            // disableScroll: true,
            // stopPropagation: true,
            // callback: function(index, element) {},
            // transitionEnd: function(index, element) {}
            });
        </script>

  </body>
</html> 
\$\endgroup\$
3
\$\begingroup\$

Sorry to tell you, but unfortunately it is near impossible to dry html in itself if you want to keep the elements in the same way.

As far as I can see, you already use only the minimum amount of elements.

Move on, your code is fine

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.