patternhtmlMinor
Using EJS for a web page
Viewed 0 times
ejspageforusingweb
Problem
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?
```
BruxZir Solid Zirconia Crowns & Bridges - Before & After Case Gallery
Before & After Case Gallery
Case
Back
Forward
Before: 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.
After: 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® 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.
```
BruxZir Solid Zirconia Crowns & Bridges - Before & After Case Gallery
Before & After Case Gallery
Case
Back
Forward
Before: 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.
After: 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® 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.
Solution
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
As far as I can see, you already use only the minimum amount of elements.
Move on, your code is fine
Context
StackExchange Code Review Q#38730, answer score: 3
Revisions (0)
No revisions yet.