Everyone knows HTML is old-skool. All those elements, bleurgh. Boring names, boring properties. And they aren’t dynamic – they just describe content! Clearly they are unfit for use in Modern Web Applications.
Yo peeps (not hello world)
Easy! Whenever your model changes your element updates automagically. This should be enough for you to write a Facebook killer, but there’s more!
Want to update the
div property in your
div model? No problem!
<div [div@] ?div="div.div"></div>
Tells inDIVisible to turn the element into an input field. That’s right! No need for pesky
And this attribute:
div.div property with the value the user enters. It couldn’t be easier!
What’s that? You need a checkbox? Piffle:
<div [div/] ?div="div.div"></div>
/? It looks like a tick, which is like a checkbox. Radio buttons are like this:
<div [div.] ?div="div.div"></div>
And if you want a button, just do this;
But buttons *do* stuff, right? What you need is to call a function.
inDIVisible is a functional framework/library, too. You can invoke functions like this:
Just handle the click event (there aren’t any other events worth handling) you want to respond to like this:
Then name the function you want to run:
Need to handle loops? Behold:
<div #div="div.div" *div></div>
That cheeky little
* tells inDIVisible to repeat the element for each item in the model.
And how about showing and hiding elements? It’s as easy as this to show the element only if the element is truthy:
<div #div="div.div" +div></div>
And you do this to hide the element only if the element is falsy:
<div #div="div.div" -div></div>
CLI is a Command Line Interface. But inDIVisible is better than that, so it has CLA – Command Line Awsomeness. Type commands like this in your bishbashbosh shell to make cool stuff happen:
div div /div divdiv-div
Honestly, why are you still here? Use it now, you bunch of hipster sheep.
No-one downloads anything now, so there’s no link to any files. Instead you should type one of these commands, whichever one is going to work for you:
grunt install inDIVisible gulp install inDIVisible snort install inDIVisible sniffle install inDIVisible fart install inDIVisible bower install inDIVisible bowel install inDIVisible flump install inDIVisible twerk install inDIVisible plonk install inDIVisible
Then build it and run it. I’ll leave you to figure out those commands, because I have to go drink some organic kale and quinoa juice.