NPF JavaScript Library
I recently made a post about a library I’m building for theme developers who don’t know JS or don’t know enough JS to create themes with the NPF object. Read here.
I’ve been developing my library (Paradigm) and adding more features to it - I have not released it yet, still a bit of work to do, plus I identified a bug on Tumblr’s part with the NPF object breaking out of script tags.
2 new things:
I have removed the use of blocks: {! block:start !}{! block:end !} instead {? value ?} is doing all the hard work as these two different things did do exactly the same thing.
I have added logic blocks:
If logic block:
{% if value %} do stuff {% endif %} logic blocks cannot be nested at the moment and are very simple, they’re not intended for complex operations.
Each logic block:
{% each {? value ?} as {? val ?} %}
iterate array {% endeach %}
The code screenshots above are default blocks, theme developers will be able to define their own interpolation blocks. I hope to start releasing some documentation soon.












