i've been doing html page has lot of repetitive stuff (kinda). there way minimize kind of template? here code:
<div class="float-left-area"> <div class="inner-left"> <label for="picture1"> <div id="pic1" class="sidebar-item"> <img src="eslcc_logo2.png" alt="eslcc logo" style="float:left;" class="size"> <p align="right">1</p> </div> </label> <input id="picture1" type="checkbox" name="picture" data-pic="pic1" value="1" onclick="selectpicture(this)"> <hr /> <label for="picture2"> <div id="pic2" class="sidebar-item"> <img src="imac_2.jpg" style="float:left;" class="size" alt="imac"> <p align="right">5</p> </div> </label> <input id="picture2" type="checkbox" name="picture" data-pic="pic2" value="5" onclick="selectpicture(this)"> <hr /> <label for="picture3"> <div id="pic3" class="sidebar-item"> <img src="coding_img.png" style="float:left;" class="size" alt="coding image"> <p align="right">10</p> </div> </label> <input id="picture3" type="checkbox" name="picture" data-pic="pic3" value="10" onclick="selectpicture(this)"> <hr /> <label for="picture4"> <div id="pic4" class="sidebar-item"> <img src="ariane_6.jpg" style="float:left;" class="size" alt="ariane 6"> <p align="right">20</p> </div> </label> <input id="picture4" type="checkbox" name="picture" data-pic="pic4" value="20" onclick="selectpicture(this)"> <hr /> </div> </div>
unfortunately there no pure html solution.
i suggest "template-engine" written in javascript (js)
here´s overview popular engines. https://www.sitepoint.com/overview-javascript-templating-engines/
of course, can server side scripting languages php, asp etc. advantage database support. can output data in while loop. , of course server side scripting languages have template-engines, too.
Comments
Post a Comment