Frontend - Platform - Look into using `.pug` for the templates
In the past few years I've developed a strong hatred for HTML
, I find it's overly verbose when it doesn't need to be, especially with how much certain codebases rely on tailwind
css utils, I find templates are becoming harder and harder to read, ever since I started using .pug/jade I've been in love with it.
Here's a very simple example of how it can simplify a template:
Pug
ul
li Home
li About
li Contact
HTML
<ul>
<li>Home</li>
<li>About</li>
<li>Contact</li>
</ul>
Not only does it cut down on a bunch of redundant code, it also allows for a lot of functionality that HTML
just doesn't have... I present to you mixins
mixin card(title, description, image)
.card
img(src=image, alt=title)
.card-body
h3= title
p= description
button.btn Learn More
+card("Pug Templating", "A powerful way to write HTML efficiently.", "pug-logo.png")
+card("Web Development", "Build scalable and dynamic web applications.", "web-dev.png")
+card("JavaScript", "Enhance your pages with interactive elements.", "js-logo.png")
There's quite a bit more take a gander at the docs for more info
fyi @2955053f if you think it's worth implementing I'll treat this issue as the action issue.
Edited by Liam Mcmanus